MDL-5601 - restoring a course with a multianswer question sometimes causes an error() for a non-fatal contition. Change it to a notify, and everything seems to work. I don't really understand why, but this change does not make matters worse, so I am committing it. Thanks to Joseph Rezeau. Merged from MOODLE_16_STABLE.

This commit is contained in:
tjhunt 2006-10-03 17:57:16 +00:00
parent 54f306788a
commit 158e545945

View File

@ -535,7 +535,7 @@ class embedded_cloze_qtype extends default_questiontype {
$wrappedquestionid = $sequence[$seqnum-1];
// now we can find the question
if (!$wrappedquestion = get_record('question', 'id', $wrappedquestionid)) {
error("Can't find the subquestion $wrappedquestionid that is used as part $seqnum in cloze question $state->question");
notify("Can't find the subquestion $wrappedquestionid that is used as part $seqnum in cloze question $state->question");
}
// For multichoice question we need to recode the answer
if ($answer and $wrappedquestion->qtype == 'multichoice') {