Question type

Re: Question type

de yu peng -
Número de respuestas: 8

Right

Yes,It works when  cron.php executed in the fresh install. But not works in my website (update from old, executed  cron.php)

En respuesta a yu peng

Re: Question type

de Richard Lobb -

Good to hear.

The problem with your upgraded website is likely to be the moodle bug that's fixed in Moodle 5.02. However, please check:

  1. If you're logged in as an admin, click the Home link at the top then the Question Banks link, do you see a System Shared Question Bank?
  2. If you do see a System Shared Question Bank, click the link to it. Does it contain all the CodeRunner question types, with names beginning BUILTIN_PROTOTYPE... ? Please send a screenshot.

En respuesta a Richard Lobb

Re: Question type

de yu peng -
En respuesta a yu peng

Re: Question type

de Richard Lobb -
This is not what I expect at all. At the top level (courseid = 1) you should have a System shared question bank with the comment that it was created when the system was upgraded.
Screen shot of Moodle home page question bank.
You appear to have two course question banks instead. I don't understand how that happened unless you're using your home page as a course?

What's in those two course question banks (click each link in turn and paste a screenshot)?


En respuesta a Richard Lobb

Re: Question type

de yu peng -
I just don't know how to delete one. They look the same,I just cannot delete one.

Adjunto p10.jpg
Adjunto p9.jpg
En respuesta a yu peng

Re: Question type

de Richard Lobb -
There appears to be nothing in either of those question banks. And they're Course question banks, not System Shared question banks. 

Fankly I have no idea what's going on here. My only suggestion is that you manually increment the last digit of $plugin->version in /question/type/coderunner/version.php and let the system attempt to upgrade CodeRunner. That *should* create a system shared question bank (provided CRON is running) and add the question prototypes to it.

If (when?) that doesn't work (i.e. no system shared question bank is created), look in Site administration > Server > Tasks > Ad hoc tasks. There should be a CodeRunner task there. Did it succeed or fail? If it failed, is there are message about why?

Alternatively, maybe you should use one of your new fresh Moodle 5.0 servers and copy your courses across to that?
En respuesta a Richard Lobb

Re: Question type

de yu peng -
In fact,our school use moodle more than 20 years. We have 1100 courses ,they are more than 4T. So ,it's very hard to copy courses to the  new fresh Moodle .Thaks a lot for reply so much times. I wait for the next moodle version (maybe 5.0.2) to resolve these problem . Our last final exam use vpl for programming for this reason. But code runner has some special ,It's hard for us to abandon it.
En respuesta a yu peng

Re: Question type

de yu peng -
I have upgraded Moodle to 5.02,the issue not fixed...
p11
En respuesta a yu peng

Re: Question type

de Richard Lobb -

Firstly please check:

  1. That the CRON job for moodle is running.
  2. That no errors are being logged to the Apache2 (or nginx , if that's what you're using) error log when you attempt to create a new CodeRunner question. You should ensure that the "Debug messages" option in Site administration > Development > Debugging is set to "ALL" before this check.
  3. That there are no Failed Tasks being displayed in Site administration > Server > Ad hoc tasks. It would also pay to check for any anomalies in Site administration > Server > Scheduled tasks

If all those are OK, try the remedy suggested in the lost posting by @helmo-nico here: https://github.com/trampgeek/moodle-qtype_coderunner/issues/255#issuecomment-3183116731