Hi Sayee
The problem here is with the use of the "<?php" and "?>" tags. The template for the built-in PHP question type is currently
{{ STUDENT_ANSWER }}
define('SEPARATOR', '##');
{% for TEST in TESTCASES %}
{{ TEST.testcode }};
{% if not loop.last %}
echo SEPARATOR;
{% endif %}
{% endfor %}
@17943918#@>
For this to work, the student answer must start with <?php but should not include the closing tag. The test code should not use either opening or closing tags.
I think the template that Jupa was using was probably a simple per-test template (i.e. not a combinator). Something like
{{ STUDENT_ANSWER }}
{{ TEST.testcode }}
The documentation for the PHP question type is wrong, sorry. It applies to the above template not the current version.
Richard