i've facing a problem when i going to create/edit a CodeRunner question..
here is the screenshot :
this problem happens when i'd upgrade Moodle from 3.5 to 3.6.
i'd tried to reinstall the CodeRunner plugin with latest version, but nothing change.
Has anyone seen this or know how to solve?
I don't have an immediate explanation for this. I've upgraded four sites to Moodle 3.6 with no problems.
The error message means that the Ajax request from the question author form to the Moodle server either couldn't find the requested prototype, namely that for the java_class question, or found more than one. But normally problems with prototypes are picked up earlier. Either you get a warning like
This question was defined to be of type 'java_class' but the prototype does not exist, or is non-unique, or is unavailable in this context. You should Cancel and try to (re)install the prototype. Proceed to edit only if you know what you are doing!
One thing that strikes me as odd is that it's looking for the prototype in the context of CourseId = 1. That is not the ID of a normal course - it's the System. So what context are you in when editing question? Usually you do that in context of a particular course. Editing questions in the system context should work OK, too, but I suspect this might be part of the problem in your case.
Apart from trying different contexts for editing/creating questions, I suggest you inspect the question bank as an administrator. You should be able to find the prototypes in a category System/Top for System/CR Prototypes. There should be exactly one of each prototype, with names like
Make sure no other copies of these prototypes are present anywhere, too.
Another thing which might possible cast some light on the subject is to run a couple of the administrator scripts to see if any interesting errors appear:
Let me know what happens.
The problem occurs after I'd import a course from another moodle site using backup/restore.
I tried to find the duplicate but i can't found it..
And with your guidance.. I guess i've found the duplicate...
When i check the question bank, there are duplicate prototypes. here is the screenshot :
So i deleted the duplicate prototypes.. and it's work like charm...
Thanks for solution, sir