Developers' Forum

prototype does not exist, or is non-unique, or is unavailable in this context

prototype does not exist, or is non-unique, or is unavailable in this context

by ashok raj -
Number of replies: 2

Hi Team,

I am facing error in Moodle - Code Runner Question Type

My Moodle version is 3.11 and my Code Runner version is 4.2.2

Everything was working fine earlier. But with effect from 1 July 2022 onwards i am facing the error. (I have NOT modified any plugins including Code runner and moodle version.


Error Description:

 If I click EDIT question from the question bank its showing the following error

This question was defined to be of type 'c_program' 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!



Also, none of the programming languages is loading in the Question type field. Earlier it contains many programming languages such as c_program, cpp_program, java_program, java_class etc

Note: There is NO issue with JOBE server

Please help me to resolve this issue.

Thanks in advance

In reply to ashok raj

Re: prototype does not exist, or is non-unique, or is unavailable in this context

by Richard Lobb -
It looks like someone has deleted all the CodeRunner question prototypes, which are in the system context. A systems administrator did this once on our main university Moodle server, presumably to "tidy things up"!

If you're a system administrator and you browse the question bank, you should see something like the following at the top level of the hierarchy:



There is exactly one prototype for each question type.

If a system administrator reinstalls the plugin, or updates it to the current Moodle 3x stable version on github, the prototypes will be reinstalled and your existing questions should all start working again. [NB: if upgrading, DO NOT install from the Master version on github, which is - or soon will be - for Moodle 4 only.]
In reply to Richard Lobb

Re: prototype does not exist, or is non-unique, or is unavailable in this context

by ashok raj -
Hello Richard,
Thank you very much. Actually my team mate has moved moved all the PROTOTYPES from TOP LEVEL to a sub category by mistake. After moving to SYSTEM TOP LEVEL. IT started working