I've tried to use the QUESTION.stepinfo object, but I only get null when I try to access it.
Do I have to enable this somewhere that it is actually filled with data?
The QUESTION.stepinfo variable is new in CodeRunner V4, which was pushed to the Moodle plugin repository in March this year. So I'm guessing you're still running an older version of CodeRunner?
I'm currently running Moodle 3.8, Coderunner 3.7.4, and a Jobe 1.6.0 on Ubuntu 18.04 LTS 64 bit.
Certainly I hope nothing breaks. I try always to maintain forward compatibility. No-one has reported any issues to me. The only two things that come to mind are:
- You will also need to install the latest version of the behaviour plugin adaptive_adapted_for_coderunner, if you want the stepinfo to work.
- If you're editing questions that use UI-plugins other than Ace, and you're passing parameters to the UI-plugin via the template_parameters field in the authoring form, you'll be required to move the parameters (with possible renaming) into a new ui_parameters entry field before you can save the questions. In-line documentation explains what is required. Existing questions will continue to run without change.
Regarding the practicalities of upgrading CoderRunner, and knowing if your questions all still work.
For every question you create, you should fill in the 'Answer' field, which should be a response that gets graded correct (and this will be checked if you keep the 'Validate on save' option switched on.
If you do this, then you can go to the admin screen for CodeRunner, and then to the 'bulk tester script', (or just go straight to the URL .../question/type/coderunner/bulktestindex.php.
That will test each of your questions by trying to grade the given 'Answer' and checking that gets 100%. Doing that is a pretty good confidence check that all your questions still work.
Thanks for this tip Tim, will definitely keep that in mind!
Thanks for your support!