MDL-42880 quiz settings: remove unnecessary disabledif rules.

These rules were causing problems in the case where the form was
sumitted with validation errors. In that case, the During the attempt ->
The attempt checkbox was becoming unset, and hence the other During the
attmept checkboxes became disabled, and the values were not saved.

Thanks to Sam Marshall for suggesting this fix.
This commit is contained in:
Tim Hunt
2013-11-18 15:37:15 +08:00
committed by Dan Poltawski
parent 02e45bf269
commit 8f74fa4366
+6 -4
View File
@@ -426,10 +426,12 @@ class mod_quiz_mod_form extends moodleform_mod {
}
}
$mform->disabledIf('correctness' . $whenname, 'attempt' . $whenname);
$mform->disabledIf('specificfeedback' . $whenname, 'attempt' . $whenname);
$mform->disabledIf('generalfeedback' . $whenname, 'attempt' . $whenname);
$mform->disabledIf('rightanswer' . $whenname, 'attempt' . $whenname);
if ($whenname != 'during') {
$mform->disabledIf('correctness' . $whenname, 'attempt' . $whenname);
$mform->disabledIf('specificfeedback' . $whenname, 'attempt' . $whenname);
$mform->disabledIf('generalfeedback' . $whenname, 'attempt' . $whenname);
$mform->disabledIf('rightanswer' . $whenname, 'attempt' . $whenname);
}
}
protected function preprocessing_review_settings(&$toform, $whenname, $when) {