Permalink
Browse files

MDL-31917 Improve assigment submission usability

Say 'View' if assignment has been graded via gradebook and changing
grades via submissions interface is not possible.
  • Loading branch information...
Ruslan Kabalin
Ruslan Kabalin committed Mar 6, 2012
1 parent 5bbf3cb commit 7761e7b39af6994fad61d2ca4229864299340703
Showing with 4 additions and 0 deletions.
  1. +4 −0 mod/assignment/lib.php
View
@@ -1411,6 +1411,7 @@ function display_submissions($message='') {
$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 @@ function display_submissions($message='') {
}
$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

0 comments on commit 7761e7b

Please sign in to comment.