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...
1 parent 08fb6ca commit 0b50793e41960860a7450b91a7f5c26569ee69d1 Ruslan Kabalin committed with Sam Hemelryk Mar 6, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 mod/assignment/lib.php
View
@@ -1342,6 +1342,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) {
@@ -1456,6 +1457,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 0b50793

Please sign in to comment.