Can anyone help me fix the CodeRunner questions type drop down list? It will only show --> Undefined
here is a screenshot:
That particular dropdown is populated by finding all prototype questions within the current course context or any of its ancestors. So essentially the empty dropdown ("Undefined" is added as default entry) means there aren't any prototypes. That's odd, because when CodeRunner is installed the default set of built-in prototypes is installed in the system context, which is an ancestor of all courses. I can think of only two possibilities off the top of my head:
- Someone has deleted all the built-in prototypes.
- You're creating the CodeRunner question in some strange non-course context.
If you're a system administrator, open the question bank from some course context, and scroll to the bottom of the question category list, where you should find a System category. That should have a child category Top for system within which there should be CR_PROTOTYPES. There should be ~19 coderunner question prototypes in there.
Thank you for your advice, I have the administrator account and tried to navigate the location you are pointing to. However i could not locate CR_PROTOTYPES.
What should I do to resolve this issue?
here are some screenshots:
I also tried to install the newer version of CodeRunner, it displays an HTTP Error 500
Well at least we know why the menu shows no question types: there are no question prototypes!
I suggest for a start you find out what the HTTP 500 error is. You may want to turn up the debugging level on your server to the max (see https://docs.moodle.org/22/en/Debugging). Try the install again. Check what error message you get - if nothing on screen, check out /var/log/apache2/error.log.
I tried updating CodeRunner in the plugins page, there is an error saying Missing from disk!
As I clicked Install this update
After clicking continue button, I got the same error
Richard, may I ask for the original source zip file of CodeRunner? I will also try to reinstall the first version
Still hoping for a solution to this issue. Thanks!
I'd like to know what the HTTP ERROR 500 message is - it should be at the end of /var/log/apache2/errors.
I'm not sure what you mean by the "original source zip file". How is this different from the one in the plugin repository? At any rate, the complete source is available https://github.com/trampgeek/moodle-qtype_coderunner.
However, I get the feeling that there might have been some rather incautious deletions of code and/or question prototypes on this server, possibly as part of a Moodle version upgrade?! At any rate, I think we should move this discussion off this forum as I don't think it's likely to be helpful to anyone else. So please email me at firstname.lastname@example.org if you want to continue the discussion.
We followed your advice on upgrading our Moodle version 3.7 to the latest version 3.9.1 and it actually solved the problem. Also reinstalled CodeRunner and now runs smoothly with all the question type present on the drop down list.
I would like to thank you for your patience and for giving us a big help.
Thanks for letting us know things are all going again, Adrian. Good to hear!