Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-38397 question editing: only validate default mark if present.

Most qtypes have that field, but not all. multianswer is an example in core.
Also some contrib qtypes.
  • Loading branch information...
commit 3d8c5cb04496eb865583932cdbde8dfe5bcc779a 1 parent a812924
@timhunt timhunt authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  question/type/edit_question_form.php
View
2  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');
}
Please sign in to comment.
Something went wrong with that request. Please try again.