Skip to content

Commit

Permalink
Merge branch 'MDL-50091' of git://github.com/timhunt/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Jun 22, 2015
2 parents 15e6543 + 2ebeeea commit bf63951
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
2 changes: 1 addition & 1 deletion grade/report/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ abstract class grade_report {

/**
* The grade_tree object.
* @var object $gtree
* @var grade_tree $gtree
*/
public $gtree;

Expand Down
17 changes: 0 additions & 17 deletions grade/report/singleview/classes/local/screen/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,6 @@ public function init($selfitemisempty = false) {
$params = array('courseid' => $this->courseid);

$seq = new grade_seq($this->courseid, true);
foreach ($seq->items as $key => $item) {
if (isset($item->itemmodule)) {
list($courseid, $cmid) = get_course_and_cm_from_instance($item->iteminstance, $item->itemmodule);
$seq->items[$key]->cmid = $cmid->id;
}
}

$this->items = array();
foreach ($seq->items as $itemid => $item) {
Expand Down Expand Up @@ -179,11 +173,6 @@ public function format_line($item) {
$lockicon = $OUTPUT->pix_icon('t/locked', 'grade is locked');
}

$realmodid = '';
if (isset($item->cmid)) {
$realmodid = $item->cmid;
}

$iconstring = get_string('filtergrades', 'gradereport_singleview', $item->get_name());

// Create a fake gradetreeitem so we can call get_element_header().
Expand All @@ -200,12 +189,6 @@ public function format_line($item) {
$itemlabel = $this->structure->get_element_header($gradetreeitem, true, false, false, false, true);
$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());
}

$line = array(
$OUTPUT->action_icon($this->format_link('grade', $item->id), new pix_icon('t/editstring', $iconstring)),
$this->format_icon($item) . $lockicon . $itemlabel,
Expand Down

0 comments on commit bf63951

Please sign in to comment.