Skip to content

Commit

Permalink
MDL-31917 Improve assigment submission usability
Browse files Browse the repository at this point in the history
Say 'View' if assignment has been graded via gradebook and changing
grades via submissions interface is not possible.
  • Loading branch information
Ruslan Kabalin authored and Sam Hemelryk committed Mar 13, 2012
1 parent 08fb6ca commit 0b50793
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mod/assignment/lib.php
Expand Up @@ -1342,6 +1342,7 @@ function display_submissions($message='') {
$offset = $page * $perpage; $offset = $page * $perpage;
$strupdate = get_string('update'); $strupdate = get_string('update');
$strgrade = get_string('grade'); $strgrade = get_string('grade');
$strview = get_string('view');
$grademenu = make_grades_menu($this->assignment->grade); $grademenu = make_grades_menu($this->assignment->grade);


if ($ausers !== false) { if ($ausers !== false) {
Expand Down Expand Up @@ -1456,6 +1457,9 @@ function display_submissions($message='') {
} }


$buttontext = ($auser->status == 1) ? $strupdate : $strgrade; $buttontext = ($auser->status == 1) ? $strupdate : $strgrade;
if ($final_grade->locked or $final_grade->overridden) {
$buttontext = $strview;
}


///No more buttons, we use popups ;-). ///No more buttons, we use popups ;-).
$popup_url = '/mod/assignment/submissions.php?id='.$this->cm->id $popup_url = '/mod/assignment/submissions.php?id='.$this->cm->id
Expand Down

0 comments on commit 0b50793

Please sign in to comment.