本文整理汇总了PHP中question_engine::get_behaviour_type方法的典型用法代码示例。如果您正苦于以下问题:PHP question_engine::get_behaviour_type方法的具体用法?PHP question_engine::get_behaviour_type怎么用?PHP question_engine::get_behaviour_type使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类question_engine
的用法示例。
在下文中一共展示了question_engine::get_behaviour_type方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
parent::setUp();
$this->behaviourtype = question_engine::get_behaviour_type('interactivecountback');
}
示例2: quiz_allows_multiple_tries
/**
* Does this quiz allow multiple tries?
*
* @return bool
*/
function quiz_allows_multiple_tries($quiz)
{
$bt = question_engine::get_behaviour_type($quiz->preferredbehaviour);
return $bt->allows_multiple_submitted_responses();
}
示例3: get_summary_information
/**
* Get summary information about this usage.
*
* Some behaviours may be able to provide interesting summary information
* about the attempt as a whole, and this method provides access to that data.
* To see how this works, try setting a quiz to one of the CBM behaviours,
* and then look at the extra information displayed at the top of the quiz
* review page once you have sumitted an attempt.
*
* In the return value, the array keys are identifiers of the form
* qbehaviour_behaviourname_meaningfullkey. For qbehaviour_deferredcbm_highsummary.
* The values are arrays with two items, title and content. Each of these
* will be either a string, or a renderable.
*
* @return array as described above.
*/
public function get_summary_information(question_display_options $options)
{
return question_engine::get_behaviour_type($this->preferredbehaviour)->summarise_usage($this, $options);
}