public function set_quiz_has_attempts($quizhasattempts) {
        $this->quizhasattempts = $quizhasattempts;
        if ($quizhasattempts && isset($this->visiblecolumns['addtoquizaction'])) {
            unset($this->visiblecolumns['addtoquizaction']);
        }
    }
public function set_quiz_has_attempts($quizhasattempts) {
        $this->quizhasattempts = $quizhasattempts;
        if ($quizhasattempts && isset($this->visiblecolumns['addtoquizaction'])) {
            unset($this->visiblecolumns['addtoquizaction']);
        }
    }
public function set_quiz_has_attempts ( $ quizhasattempts ) { $ this -> quizhasattempts = $ quizhasattempts ; if ( $ quizhasattempts && isset ( $ this -> visiblecolumns [ 'addtoquizaction' ] ) ) { unset ( $ this -> visiblecolumns [ 'addtoquizaction' ] ) ; } }
Let the question bank display know whether the quiz has been attempted,
hence whether some bits of UI, like the add this question to the quiz icon,
should be displayed.
@param bool $quizhasattempts whether the quiz has attempts.
Let the question bank display know whether the quiz has been attempted hence whether some bits of UI like the add this question to the quiz icon should be displayed .