mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
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:
parent
33f9a60133
commit
7f43748f18
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user