public function resolve_dependencies() { parent::resolve_dependencies(); if (!$this->usercanseegrades) { $this->slotmarks = false; } // We only want to show the checkbox to delete attempts // if the user has permissions and if the report mode is showing attempts. $this->checkboxcolumn = has_any_capability(array('mod/quiz:regrade', 'mod/quiz:deleteattempts'), context_module::instance($this->cm->id)) && $this->attempts != quiz_attempts_report::ENROLLED_WITHOUT; }
public function resolve_dependencies() { parent::resolve_dependencies(); if (!$this->showqtext && !$this->showresponses && !$this->showright) { // We have to show at least something. $this->showresponses = true; } // We only want to show the checkbox to delete attempts // if the user has permissions and if the report mode is showing attempts. $this->checkboxcolumn = has_capability('mod/quiz:deleteattempts', context_module::instance($this->cm->id)) && $this->attempts != quiz_attempts_report::ENROLLED_WITHOUT; }