MDL-37804 assign: Return proper notice when submissions closed.

MDL-38267 was returning the html page when it should have been adding to the list
of notices and returing false.
This commit is contained in:
Damyon Wiese 2013-09-12 10:22:20 +08:00
parent 33f9a60133
commit 7f43748f18

View File

@ -5145,7 +5145,8 @@ class assign {
require_capability('mod/assign:submit', $this->context);
require_sesskey();
if (!$this->submissions_open()) {
return $this->view_student_error_message();
$notices[] = get_string('duedatereached', 'assign');
return false;
}
$instance = $this->get_instance();
@ -5155,10 +5156,6 @@ 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 {