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 2b6a38f commit 861de3cda132cf93d44a131596d78472438b6241 Ruslan Kabalin committed with Sam Hemelryk Mar 6, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 mod/assignment/lib.php
View
4 mod/assignment/lib.php
@@ -1409,6 +1409,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) {
@@ -1525,6 +1526,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 861de3c

Please sign in to comment.