Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-38279_24' of git://github.com/timhunt/moodle into M…

…OODLE_24_STABLE
  • Loading branch information...
commit 099b7986a509e889ccf065f9d91906d3356e4866 2 parents c694545 + a78c180
@damyon damyon authored
Showing with 7 additions and 0 deletions.
  1. +1 −0  lang/en/question.php
  2. +6 −0 question/type/edit_question_form.php
View
1  lang/en/question.php
@@ -90,6 +90,7 @@
$string['cwrqpfsnoprob'] = 'No question categories in your site are affected by the \'Random questions selecting questions from sub categories\' issue.';
$string['defaultfor'] = 'Default for {$a}';
$string['defaultinfofor'] = 'The default category for questions shared in context \'{$a}\'.';
+$string['defaultmarkmustbepositive'] = 'The default mark must be positive.';
$string['deletebehaviourareyousure'] = 'Delete behaviour {$a}: are you sure?';
$string['deletebehaviourareyousuremessage'] = 'You are about to completely delete the question behaviour {$a}. This will completely delete everything in the database associated with this question behaviour. Are you SURE you want to continue?';
$string['deletecoursecategorywithquestions'] = 'There are questions in the question bank associated with this course category. If you proceed, they will be deleted. You may wish to move them first, using the question bank interface.';
View
6 question/type/edit_question_form.php
@@ -654,6 +654,12 @@ public function validation($fromform, $files) {
&& empty($fromform['usecurrentcat']) && !$this->question->formoptions->canmove) {
$errors['currentgrp'] = get_string('nopermissionmove', 'question');
}
+
+ // Default mark.
+ if ($fromform['defaultmark'] < 0) {
+ $errors['defaultmark'] = get_string('defaultmarkmustbepositive', 'question');
+ }
+
return $errors;
}
Please sign in to comment.
Something went wrong with that request. Please try again.