diff --git a/question/type/edit_question_form.php b/question/type/edit_question_form.php index a211b31d7ae60..b93e46ae4a558 100644 --- a/question/type/edit_question_form.php +++ b/question/type/edit_question_form.php @@ -656,7 +656,7 @@ public function validation($fromform, $files) { } // Default mark. - if ($fromform['defaultmark'] < 0) { + if (array_key_exists('defaultmark', $fromform) && $fromform['defaultmark'] < 0) { $errors['defaultmark'] = get_string('defaultmarkmustbepositive', 'question'); }