diff --git a/question/type/edit_question_form.php b/question/type/edit_question_form.php index 9690d3d9a9e..22e37f0d455 100644 --- a/question/type/edit_question_form.php +++ b/question/type/edit_question_form.php @@ -673,7 +673,7 @@ abstract class question_edit_form extends question_wizard_form { } // Default mark. - if ($fromform['defaultmark'] < 0) { + if (array_key_exists('defaultmark', $fromform) && $fromform['defaultmark'] < 0) { $errors['defaultmark'] = get_string('defaultmarkmustbepositive', 'question'); }