MDL-43929 question manual grading: keep comment when validation fails.

If the validation failed, so the manual grading page was re-displayed
with a validation error, then any comment that had just been typed in
was getting lost. This fixes that.
This commit is contained in:
Tim Hunt
2014-02-07 21:55:05 +00:00
parent 974c2cdc03
commit 1eb470fc42
3 changed files with 23 additions and 2 deletions
+1 -1
View File
@@ -192,7 +192,7 @@ abstract class question_behaviour {
return array();
}
$vars = array('comment' => PARAM_RAW);
$vars = array('comment' => PARAM_RAW, 'commentformat' => PARAM_INT);
if ($this->qa->get_max_mark()) {
$vars['mark'] = question_attempt::PARAM_MARK;
$vars['maxmark'] = PARAM_FLOAT;