/** * 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->seplment->grading_disabled($row->id); if (!$this->is_downloading() && $this->hasgrade) { $name = $this->seplment->fullname($row); $icon = $this->output->pix_icon('gradefeedback', get_string('gradeuser', 'sepl', $name), 'mod_sepl'); $urlparams = array('id' => $this->seplment->get_course_module()->id, 'rownum' => $this->rownum, 'action' => 'grade'); $url = new moodle_url('/mod/sepl/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; }