Skip to content

Commit

Permalink
MDL-37804 assign: Return proper notice when submissions closed.
Browse files Browse the repository at this point in the history
MDL-38267 was returning the html page when it should have been adding to the list
of notices and returing false.
  • Loading branch information
Damyon Wiese committed Sep 12, 2013
1 parent 33f9a60 commit 7f43748
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions mod/assign/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -5145,7 +5145,8 @@ protected function process_save_submission(&$mform, &$notices) {
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();

Expand All @@ -5155,10 +5156,6 @@ protected function process_save_submission(&$mform, &$notices) {
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 {
Expand Down

0 comments on commit 7f43748

Please sign in to comment.