本文整理匯總了PHP中question_engine::get_dp_options方法的典型用法代碼示例。如果您正苦於以下問題:PHP question_engine::get_dp_options方法的具體用法?PHP question_engine::get_dp_options怎麽用?PHP question_engine::get_dp_options使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類question_engine
的用法示例。
在下文中一共展示了question_engine::get_dp_options方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: definition
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);
}