public function definition() { $mform = $this->_form; $hiddenofvisible = array(question_display_options::HIDDEN => get_string('notshown', 'question'), question_display_options::VISIBLE => get_string('shown', 'question')); $mform->addElement('header', 'optionsheader', get_string('changeoptions', 'question')); $behaviours = question_engine::get_behaviour_options($this->_customdata['quba']->get_preferred_behaviour()); $mform->addElement('select', 'behaviour', get_string('howquestionsbehave', 'question'), $behaviours); $mform->addHelpButton('behaviour', 'howquestionsbehave', 'question'); $mform->addElement('text', 'maxmark', get_string('markedoutof', 'question'), array('size' => '5')); $mform->setType('maxmark', PARAM_NUMBER); if ($this->_customdata['maxvariant'] > 1) { $variants = range(1, $this->_customdata['maxvariant']); $mform->addElement('select', 'variant', get_string('questionvariant', 'question'), array_combine($variants, $variants)); } $mform->setType('maxmark', PARAM_INT); $mform->addElement('select', 'correctness', get_string('whethercorrect', 'question'), $hiddenofvisible); $marksoptions = array(question_display_options::HIDDEN => get_string('notshown', 'question'), question_display_options::MAX_ONLY => get_string('showmaxmarkonly', 'question'), question_display_options::MARK_AND_MAX => get_string('showmarkandmax', 'question')); $mform->addElement('select', 'marks', get_string('marks', 'question'), $marksoptions); $mform->addElement('select', 'markdp', get_string('decimalplacesingrades', 'question'), question_engine::get_dp_options()); $mform->addElement('select', 'feedback', get_string('specificfeedback', 'question'), $hiddenofvisible); $mform->addElement('select', 'generalfeedback', get_string('generalfeedback', 'question'), $hiddenofvisible); $mform->addElement('select', 'rightanswer', get_string('rightanswer', 'question'), $hiddenofvisible); $mform->addElement('select', 'history', get_string('responsehistory', 'question'), $hiddenofvisible); $mform->addElement('submit', 'submit', get_string('restartwiththeseoptions', 'question'), $hiddenofvisible); }