mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 04:33:13 +01:00
Merge branch 'MDL-47838-master-fix3' of https://github.com/damyon/moodle
This commit is contained in:
commit
681276aad2
@ -33,6 +33,7 @@ use gradereport_singleview\local\ui\range;
|
||||
use gradereport_singleview\local\ui\bulk_insert;
|
||||
use grade_item;
|
||||
use grade_grade;
|
||||
use stdClass;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
@ -122,8 +123,6 @@ class user extends tablelike implements selectable_items {
|
||||
|
||||
$this->requirespaging = count($this->items) > $this->perpage;
|
||||
|
||||
unset($seq);
|
||||
|
||||
$this->setup_structure();
|
||||
|
||||
$this->definition = array(
|
||||
@ -181,13 +180,20 @@ class user extends tablelike implements selectable_items {
|
||||
}
|
||||
|
||||
$iconstring = get_string('filtergrades', 'gradereport_singleview', $item->get_name());
|
||||
$grade->label = $item->get_name();
|
||||
|
||||
$itemlabel = $item->get_name();
|
||||
if (!empty($realmodid)) {
|
||||
$url = new moodle_url('/mod/' . $item->itemmodule . '/view.php', array('id' => $realmodid));
|
||||
$itemlabel = html_writer::link($url, $item->get_name());
|
||||
// Create a fake gradetreeitem so we can call get_element_header().
|
||||
// The type logic below is from grade_category->_get_children_recursion().
|
||||
$gradetreeitem = array();
|
||||
if (in_array($item->itemtype, array('course', 'category'))) {
|
||||
$gradetreeitem['type'] = $item->itemtype.'item';
|
||||
} else {
|
||||
$gradetreeitem['type'] = 'item';
|
||||
}
|
||||
$gradetreeitem['object'] = $item;
|
||||
$gradetreeitem['userid'] = $this->item->id;
|
||||
|
||||
$itemlabel = $this->structure->get_element_header($gradetreeitem, true, false);
|
||||
$grade->label = $item->get_name();
|
||||
|
||||
$line = array(
|
||||
$OUTPUT->action_icon($this->format_link('grade', $item->id), new pix_icon('t/editstring', $iconstring)),
|
||||
|
Loading…
x
Reference in New Issue
Block a user