diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index 37595105afe..450b25f9f5f 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -451,8 +451,8 @@ class assign { // Save changes button. $action = 'grade'; if ($this->process_save_grade($mform)) { - $message = get_string('gradingchangessaved', 'assign'); - $action = 'savegradingresult'; + $action = 'redirect'; + $nextpageparams['action'] = 'savegradingresult'; } } else { // Cancel button. @@ -488,6 +488,7 @@ class assign { redirect($nextpageurl); return; } else if ($action == 'savegradingresult') { + $message = get_string('gradingchangessaved', 'assign'); $o .= $this->view_savegrading_result($message); } else if ($action == 'quickgradingresult') { $mform = null;