mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-78435 mod_assign: ensure due date is always after start date.
This commit is contained in:
parent
1b1a15a308
commit
70e5ff196a
@ -175,6 +175,7 @@ $string['submissionempty'] = 'Nothing was submitted';
|
||||
$string['submissionmodified'] = 'You have existing submission data. Please leave this page and try again.';
|
||||
$string['submissionmodifiedgroup'] = 'The submission has been modified by somebody else. Please leave this page and try again.';
|
||||
$string['duedatereached'] = 'The due date for this assignment has now passed';
|
||||
$string['duedateaftersubmissionvalidation'] = 'Due date must be after the allow submissions from date.';
|
||||
$string['duedatevalidation'] = 'Due date cannot be earlier than the allow submissions from date.';
|
||||
$string['editattemptfeedback'] = 'Edit the grade and feedback for attempt number {$a}.';
|
||||
$string['editonline'] = 'Edit online';
|
||||
|
@ -241,8 +241,8 @@ class mod_assign_mod_form extends moodleform_mod {
|
||||
$errors = parent::validation($data, $files);
|
||||
|
||||
if (!empty($data['allowsubmissionsfromdate']) && !empty($data['duedate'])) {
|
||||
if ($data['duedate'] < $data['allowsubmissionsfromdate']) {
|
||||
$errors['duedate'] = get_string('duedatevalidation', 'assign');
|
||||
if ($data['duedate'] <= $data['allowsubmissionsfromdate']) {
|
||||
$errors['duedate'] = get_string('duedateaftersubmissionvalidation', 'assign');
|
||||
}
|
||||
}
|
||||
if (!empty($data['cutoffdate']) && !empty($data['duedate'])) {
|
||||
|
@ -317,8 +317,8 @@ class assign_override_form extends moodleform {
|
||||
}
|
||||
|
||||
if (!empty($data['allowsubmissionsfromdate']) && !empty($data['duedate'])) {
|
||||
if ($data['duedate'] < $data['allowsubmissionsfromdate']) {
|
||||
$errors['duedate'] = get_string('duedatevalidation', 'assign');
|
||||
if ($data['duedate'] <= $data['allowsubmissionsfromdate']) {
|
||||
$errors['duedate'] = get_string('duedateaftersubmissionvalidation', 'assign');
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user