allow testing of PHP5 or PHP 7 code from students?
dr-matt-smith opened this issue · 2 comments
currently the docs state that language_id 'php' is for PHP5
please could system by upgraded, so that PHP7 code can also be run/unit tested?
I believe your codebase has been refactored for PHP7 so am hoping this is pretty straightforward
I see Python has python2 and python3
since php is already in use, then perhaps 'php' would be for php5 and 'php7' would be for php 7?
many thanks if this is possible
I was going to write my own PHP Moodle quiz system, but am hoping CodeRunner will meet my requirements - but I've upgraded all my teaching to PHP7 so support for that is pretty important
CodeRunner looks like it really fills a need for code assessments via Moodle - I've high hopes from reading your docs so far
regards, .. matt ..
Hi Matt
The docs lie (fixed in the next push). Actually, the id 'php' refers to whatever version of PHP is installed on the Jobe server or, even more precisely, whatever you get when you launch /usr/bin/php. So if you follow the install instructions with Ubuntu 16.04 as a base, you'll get php7. On some other Linux distros you'll still get php5.
I don't think I want to support distinct versions of PHP on Jobe; I'll just stick with the one language ID and users can configure their Jobe servers how they like. Increasingly, anyway, CodeRunner question authors script their own question types in Python3, running the student code in a subprocess, which allows them to specify whatever language dialect and other options they may require.
One warning: the PHP question type in CodeRunner currently has a bug. It's trivial to fix (see my posting at the end of this forum discussion) or you can wait until I push version 3.1.3 later this week.
Richard