Prototype Load Failure

Prototype Load Failure

de Daniyal Ahmad Rizaldhi -
Número de respuestas: 3

Hi,

i've facing a problem when i going to create/edit a CodeRunner question..

here is the screenshot :

a picture which show the error


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?

Thanks,


Daniyal.

En respuesta a Daniyal Ahmad Rizaldhi

Re: Prototype Load Failure

de Richard Lobb -

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!

or (for new questions) the question type you wish to create simply isn't present in the drop down. I assume you didn't get any errors like those?

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

BUILT_IN_PROTOTYPE_java_class

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:

http://<yoursite>/question/type/coderunner/bulktestindex.php
http://<yoursite>/question/type/coderunner/prototypeusageindex.php

Let me know what happens.

Richard

En respuesta a Richard Lobb

Re: Prototype Load Failure

de Daniyal Ahmad Rizaldhi -

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 :
duplicate prototype


So i deleted the duplicate prototypes.. and it's work like charm...

Thanks for solution, sir

Daniyal


En respuesta a Daniyal Ahmad Rizaldhi

Re: Prototype Load Failure

de Israel Acuña -
Hola

Tuve el mismo problema, también tenía algunos prototipos duplicados, pero al borrarlos seguía teniendo el mismo problema.

Creo que el problema se originó por restaurar un curso que utiliza coderunner antes de instalar este plugin

La solución fue la siguiente. (how i fixed it)

Borré el curso importado (después de haber instalado coderunner) y lo volví a restaurar. Ahora no tengo el problema mencionado