diff -Naur standard_moodle/server/moodle/mod/assignment/lang/en/assignment.php my_moodle/server/moodle/mod/assignment/lang/en/assignment.php --- standard_moodle/server/moodle/mod/assignment/lang/en/assignment.php 2013-01-12 02:48:31.000000000 +0530 +++ my_moodle/server/moodle/mod/assignment/lang/en/assignment.php 2013-04-10 19:11:27.691045455 +0530 @@ -71,6 +71,7 @@ $string['draft'] = 'Draft'; $string['due'] = 'Assignment due'; $string['duedate'] = 'Due date'; +$string['duedateinvalid'] = 'Due date must be after the allow submission date.'; $string['duedateno'] = 'No due date'; $string['early'] = '{$a} early'; $string['editmysubmission'] = 'Edit my submission'; diff -Naur standard_moodle/server/moodle/mod/assignment/mod_form.php my_moodle/server/moodle/mod/assignment/mod_form.php --- standard_moodle/server/moodle/mod/assignment/mod_form.php 2013-01-12 02:48:31.000000000 +0530 +++ my_moodle/server/moodle/mod/assignment/mod_form.php 2013-04-10 19:12:54.399045479 +0530 @@ -120,6 +120,11 @@ // Allow plugin assignment types to do any extra validation after the form has been submitted $errors = parent::validation($data, $files); $errors = array_merge($errors, $this->get_assignment_instance()->form_validation($data, $files)); +if ($data['allowsubmissionsfromdate'] && $data['duedate']) { + if ($data['allowsubmissionsfromdate'] > $data['duedate']) { + $errors['duedate'] = get_string('duedateidation', 'assignment'); + print ""; + } + } return $errors; } }