"QUESTION.stepinfo" object is null

"QUESTION.stepinfo" object is null

de către Julian Kreiser-
Număr de răspunsuri: 6

Hey,

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?

Cheers, Julian

Ca răspuns la Julian Kreiser

Re: "QUESTION.stepinfo" object is null

de către Richard Lobb-

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?

Ca răspuns la Richard Lobb

Re: "QUESTION.stepinfo" object is null

de către Julian Kreiser-
Yes, you are correct. Thank you for the hint. I guess I could just upgrade to version 4 if nothing else will break while doing so.
I'm currently running Moodle 3.8, Coderunner 3.7.4, and a Jobe 1.6.0 on Ubuntu 18.04 LTS 64 bit.
Ca răspuns la Julian Kreiser

Re: "QUESTION.stepinfo" object is null

de către Richard Lobb-

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.
Ca răspuns la Richard Lobb

Re: "QUESTION.stepinfo" object is null

de către Tim Hunt-

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.

Ca răspuns la Richard Lobb

Re: "QUESTION.stepinfo" object is null

de către Julian Kreiser-
Everything went fine, a simple "git pull" for both repositories and a cron cleanup run did the trick.
Thanks for your support!