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.

Conflicts:

	mod/assign/locallib.php
This commit is contained in:
Damyon Wiese
2013-09-12 10:38:45 +08:00
parent 18cbf0db95
commit 43e1ed2cf3
+2 -5
View File
@@ -4033,7 +4033,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;
}
$data = new stdClass();
@@ -4042,10 +4043,6 @@ class assign {
return true;
}
if ($data = $mform->get_data()) {
if (!$this->submissions_open()) {
$notices[] = get_string('duedatereached', 'assign');
return false;
}
if ($this->get_instance()->teamsubmission) {
$submission = $this->get_group_submission($USER->id, 0, true);
} else {