public function check_can_be_edited() {
        if (!$this->can_be_edited()) {
            $reportlink = quiz_attempt_summary_link_to_reports($this->get_quiz(),
                    $this->quizobj->get_cm(), $this->quizobj->get_context());
            throw new \moodle_exception('cannoteditafterattempts', 'quiz',
                    new \moodle_url('/mod/quiz/edit.php', array('cmid' => $this->get_cmid())), $reportlink);
        }
    }
public function check_can_be_edited() {
        if (!$this->can_be_edited()) {
            $reportlink = quiz_attempt_summary_link_to_reports($this->get_quiz(),
                    $this->quizobj->get_cm(), $this->quizobj->get_context());
            throw new \moodle_exception('cannoteditafterattempts', 'quiz',
                    new \moodle_url('/mod/quiz/edit.php', array('cmid' => $this->get_cmid())), $reportlink);
        }
    }
public function check_can_be_edited ( ) { if ( ! $ this -> can_be_edited ( ) ) { $ reportlink = quiz_attempt_summary_link_to_reports ( $ this -> get_quiz ( ) , $ this -> quizobj -> get_cm ( ) , $ this -> quizobj -> get_context ( ) ) ; throw new \ moodle_exception ( 'cannoteditafterattempts' , 'quiz' , new \ moodle_url ( '/mod/quiz/edit.php' , array ( 'cmid' => $ this -> get_cmid ( ) ) ) , $ reportlink ) ; } }
This quiz can only be edited if they have not been attempted.
Throw an exception if this is not the case.
This quiz can only be edited if they have not been attempted . Throw an exception if this is not the case .