本文整理汇总了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);
}