MDL-30161: link from gradebook (grading analysis) only appears now in Grader report but for all items; in User report the link under activity name contains userid

This commit is contained in:
Marina Glancy
2011-11-08 14:09:50 +08:00
parent 8545f86cc9
commit c97933ffa3
4 changed files with 19 additions and 11 deletions
+6 -2
View File
@@ -1177,7 +1177,11 @@ class grade_structure {
// If module has grade.php, link to that, otherwise view.php
if ($hasgradephp[$itemmodule]) {
return new moodle_url('/mod/' . $itemmodule . '/grade.php', array('id' => $cm->id, 'itemnumber' => $itemnumber));
$args = array('id' => $cm->id, 'itemnumber' => $itemnumber);
if (isset($element['userid'])) {
$args['userid'] = $element['userid'];
}
return new moodle_url('/mod/' . $itemmodule . '/grade.php', $args);
} else {
return new moodle_url('/mod/' . $itemmodule . '/view.php', array('id' => $cm->id));
}
@@ -1259,7 +1263,7 @@ class grade_structure {
return '';
}
return $OUTPUT->action_icon($url, new pix_icon('i/search',
return $OUTPUT->action_icon($url, new pix_icon('t/preview',
get_string('gradeanalysis', 'core_grades')));
}