mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-20636 make question upgrade more robust for incompatible question types.
This commit is contained in:
parent
e35ba43c91
commit
ffe4d23abd
@ -172,16 +172,6 @@ class question_engine_attempt_upgrader {
|
||||
}
|
||||
$this->logger->set_current_attempt_id(null);
|
||||
|
||||
if (empty($qas)) {
|
||||
$this->logger->log_assumption("All the question attempts for
|
||||
attempt {$attempt->id} at quiz {$attempt->quiz} were missing.
|
||||
Deleting this attempt", $attempt->id);
|
||||
// Somehow, all the question attempt data for this quiz attempt
|
||||
// was lost. (This seems to have happened on labspace.)
|
||||
// Delete the corresponding quiz attempt.
|
||||
return $this->delete_quiz_attempt($attempt->uniqueid);
|
||||
}
|
||||
|
||||
$questionorder = array();
|
||||
foreach (explode(',', $quiz->questions) as $questionid) {
|
||||
if ($questionid == 0) {
|
||||
@ -220,6 +210,7 @@ class question_engine_attempt_upgrader {
|
||||
|
||||
if (!array_key_exists($questionid, $qas)) {
|
||||
$missing[] = $questionid;
|
||||
$layout[$questionkeys[$questionid]] = $questionid;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user