original_string: public function set_quiz_has_attempts($quizhasattempts) {
          $this->quizhasattempts = $quizhasattempts;
          if ($quizhasattempts && isset($this->visiblecolumns['addtoquizaction'])) {
              unset($this->visiblecolumns['addtoquizaction']);
          }
      }
code: public function set_quiz_has_attempts($quizhasattempts) {
          $this->quizhasattempts = $quizhasattempts;
          if ($quizhasattempts && isset($this->visiblecolumns['addtoquizaction'])) {
              unset($this->visiblecolumns['addtoquizaction']);
          }
      }
code_tokens: public function set_quiz_has_attempts ( $ quizhasattempts ) { $ this -> quizhasattempts = $ quizhasattempts ; if ( $ quizhasattempts && isset ( $ this -> visiblecolumns [ 'addtoquizaction' ] ) ) { unset ( $ this -> visiblecolumns [ 'addtoquizaction' ] ) ; } }
docstring: 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.
docstring_tokens: 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 .