mirror of
https://github.com/moodle/moodle.git
synced 2025-04-24 09:55:33 +02:00
MDL-18229 gradebook: Links to Single view via icons on Grade Report.
This commit is contained in:
parent
d124a60b33
commit
92c61fee64
@ -665,8 +665,10 @@ class grade_report_grader extends grade_report {
|
||||
$a = new stdClass();
|
||||
$a->user = $fullname;
|
||||
$strgradesforuser = get_string('gradesforuser', 'grades', $a);
|
||||
$url = new moodle_url('/grade/report/singleview/index.php', array('id' => $this->course->id, 'itemid' => $user->id, 'item' => 'user'));
|
||||
$singleview = $OUTPUT->action_icon($url, new pix_icon('t/editstring', get_string('singleview', 'grades', $fullname)));
|
||||
$url = new moodle_url('/grade/report/'.$CFG->grade_profilereport.'/index.php', array('userid' => $user->id, 'id' => $this->course->id));
|
||||
$userreportcell->text = $OUTPUT->action_icon($url, new pix_icon('t/grades', $strgradesforuser));
|
||||
$userreportcell->text = $OUTPUT->action_icon($url, new pix_icon('t/grades', $strgradesforuser)) . $singleview;
|
||||
$userrow->cells[] = $userreportcell;
|
||||
}
|
||||
|
||||
@ -805,8 +807,17 @@ class grade_report_grader extends grade_report {
|
||||
$itemcell->attributes['class'] .= ' dimmed_text';
|
||||
}
|
||||
|
||||
$singleview = '';
|
||||
if (has_capability('gradereport/'.$CFG->grade_profilereport.':view', $this->context)) {
|
||||
$url = new moodle_url('/grade/report/singleview/index.php', array(
|
||||
'id' => $this->course->id,
|
||||
'item' => 'grade',
|
||||
'itemid' => $element['object']->id));
|
||||
$singleview = $OUTPUT->action_icon($url, new pix_icon('t/editstring', get_string('singleview', 'grades', $element['object']->itemname)));
|
||||
}
|
||||
|
||||
$itemcell->colspan = $colspan;
|
||||
$itemcell->text = shorten_text($headerlink) . $arrow;
|
||||
$itemcell->text = shorten_text($headerlink) . $arrow . $singleview;
|
||||
$itemcell->header = true;
|
||||
$itemcell->scope = 'col';
|
||||
|
||||
|
@ -169,9 +169,9 @@ class singleview_grade extends singleview_tablelike
|
||||
$url = new moodle_url("/user/view.php", array('id' => $item->id, 'course' => $this->courseid));
|
||||
|
||||
$line = array(
|
||||
$OUTPUT->action_icon($this->format_link('grade', $item->id), new pix_icon('t/editstring', get_string('filtergrades', 'gradereport_singleview', $fullname))),
|
||||
$OUTPUT->action_icon($this->format_link('user', $item->id), new pix_icon('t/editstring', get_string('filtergrades', 'gradereport_singleview', $fullname))),
|
||||
$OUTPUT->user_picture($item),
|
||||
html_writer::tag('a', $fullname, array('href' => $url)),
|
||||
html_writer::link($url, $fullname),
|
||||
$this->item_range()
|
||||
);
|
||||
return $this->format_definition($line, $grade);
|
||||
|
@ -309,6 +309,7 @@ $string['gradereport'] = 'Grade report';
|
||||
$string['graderreport'] = 'Grader report';
|
||||
$string['grades'] = 'Grades';
|
||||
$string['gradesforuser'] = 'Grades for {$a->user}';
|
||||
$string['singleview'] = 'Single view for {$a}';
|
||||
$string['gradesonly'] = 'Grades only';
|
||||
$string['gradessettings'] = 'Grade settings';
|
||||
$string['gradetype'] = 'Grade type';
|
||||
|
Loading…
x
Reference in New Issue
Block a user