From 7761e7b39af6994fad61d2ca4229864299340703 Mon Sep 17 00:00:00 2001 From: Ruslan Kabalin Date: Tue, 6 Mar 2012 14:50:55 +0000 Subject: [PATCH] MDL-31917 Improve assigment submission usability Say 'View' if assignment has been graded via gradebook and changing grades via submissions interface is not possible. --- mod/assignment/lib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php index 207386ecaa1..8f51fdd8517 100644 --- a/mod/assignment/lib.php +++ b/mod/assignment/lib.php @@ -1411,6 +1411,7 @@ class assignment_base { $offset = $page * $perpage; $strupdate = get_string('update'); $strgrade = get_string('grade'); + $strview = get_string('view'); $grademenu = make_grades_menu($this->assignment->grade); if ($ausers !== false) { @@ -1527,6 +1528,9 @@ class assignment_base { } $buttontext = ($auser->status == 1) ? $strupdate : $strgrade; + if ($final_grade->locked or $final_grade->overridden) { + $buttontext = $strview; + } ///No more buttons, we use popups ;-). $popup_url = '/mod/assignment/submissions.php?id='.$this->cm->id