/** * Format a column of data for display. * * @param stdClass $row * @return string */ public function col_grade(stdClass $row) { $o = ''; $link = ''; $separator = $this->output->spacer(array(), true); $grade = ''; $gradingdisabled = $this->setaskment->grading_disabled($row->id); if (!$this->is_downloading() && $this->hasgrade) { $name = $this->setaskment->fullname($row); $icon = $this->output->pix_icon('gradefeedback', get_string('gradeuser', 'setask', $name), 'mod_setask'); $urlparams = array('id' => $this->setaskment->get_course_module()->id, 'rownum' => $this->rownum, 'action' => 'grade'); $url = new moodle_url('/mod/setask/view.php', $urlparams); $link = $this->output->action_link($url, $icon); $grade .= $link . $separator; } $grade .= $this->display_grade($row->grade, $this->quickgrading && !$gradingdisabled, $row->userid, $row->timemarked); return $grade; }