-
Bug
-
Resolution: Fixed
-
Minor
-
2.3
-
MOODLE_23_STABLE
-
MOODLE_23_STABLE
-
Recent upgrade to Moodle 2.3. Set 'When time expires' to 'open attempts are submitted automatically'.
The cron job has been allowed to run for ~four hours and does not advance. As you trace it, the problem seems to hit an endless loop in 'question/engine/questionusage.php' in the loop (line 716):
while ($record && $record->qubaid == $qubaid && !is_null($record->slot)) {
$quba->questionattempts[$record->slot] =
question_attempt::load_from_records($records,
$record->questionattemptid, $quba->observer,
$quba->get_preferred_behaviour());
if ($records->valid())
else
{ $record = false; }}
When I have it spit out the value of '$record', it seems to end up in an endless loop caused by a missing question. It never leaves this loop. It sets $record to the same value forever, never able to leave the loop.
stdClass Object
(
[qubaid] => 26856
[contextid] => 15506
[component] => mod_quiz
[preferredbehaviour] => adaptivenopenalty
[questionattemptid] => 257042
[questionusageid] => 26856
[slot] => 12
[behaviour] => adaptivenopenalty
[questionid] => 0
[variant] => 1
[maxmark] => 1.0000000
[minfraction] => 0.0000000
[flagged] => 0
[questionsummary] => This question is missing. Unable to display anything.
[rightanswer] =>
[responsesummary] =>
[timemodified] => 0
[attemptstepid] =>
[sequencenumber] =>
[state] =>
[fraction] =>
[timecreated] =>
[userid] =>
[name] =>
[value] =>
)
It seems like the loop needs a check for missing questions.
Let me know if I can provide further information. Seems to be the same problem as: http://moodle.org/mod/forum/discuss.php?d=205668
- has a non-specific relationship to
-
MDL-34637 cron.php fails with detected coding error looking for quiz overdue quiz attempts
- Closed