Merge branch 'MDL-37804' of github.com:recreate/moodle
[moodle.git] / mod / assign / locallib.php
index 210994d..6dac5b7 100644 (file)
@@ -5119,6 +5119,10 @@ class assign {
             return true;
         }
         if ($data = $mform->get_data()) {
+            if (!$this->submissions_open()) {
+                $notices[] = get_string('duedatereached', 'assign');
+                return false;
+            }
             if ($instance->teamsubmission) {
                 $submission = $this->get_group_submission($USER->id, 0, true);
             } else {