Merge branch 'MDL-44832-master' of git://github.com/damyon/moodle
authorSam Hemelryk <sam@moodle.com>
Tue, 1 Apr 2014 20:54:33 +0000 (09:54 +1300)
committerSam Hemelryk <sam@moodle.com>
Tue, 1 Apr 2014 20:54:33 +0000 (09:54 +1300)
1  2 
mod/assign/gradingtable.php

@@@ -981,23 -986,13 +982,27 @@@ class assign_grading_table extends tabl
          } else {
              $description = get_string('updategrade', 'assign');
          }
-         $actions[$url->out(false)] = $description;
+         $actions['grade'] = new action_menu_link_secondary(
+             $url,
+             $noimage,
+             $description
+         );
  
 -        $submissionsopen = $this->assignment->submissions_open($row->id);
 +        // Everything we need is in the row.
 +        $submission = $row;
 +        $flags = $row;
 +        if ($this->assignment->get_instance()->teamsubmission) {
 +            // Use the cache for this.
 +            $submission = false;
 +            $group = false;
 +            $this->get_group_and_submission($row->id, $group, $submission, -1);
 +        }
 +
 +        $submissionsopen = $this->assignment->submissions_open($row->id,
 +                                                               true,
 +                                                               $submission,
 +                                                               $flags,
 +                                                               $this->gradinginfo);
          $caneditsubmission = $this->assignment->can_edit_submission($row->id, $USER->id);
  
          // Hide for offline assignments.