From 082ad257761c1bfffe39b372690cb39e136dbf55 Mon Sep 17 00:00:00 2001 From: Jason Fowler Date: Thu, 12 Dec 2013 14:19:26 +0800 Subject: [PATCH] MDL-36984 Assign: Add redirect after saving grades --- mod/assign/locallib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index 673074f4a18..890edd519ba 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;