本文整理匯總了PHP中question_usage_by_activity::get_question_mark方法的典型用法代碼示例。如果您正苦於以下問題:PHP question_usage_by_activity::get_question_mark方法的具體用法?PHP question_usage_by_activity::get_question_mark怎麽用?PHP question_usage_by_activity::get_question_mark使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類question_usage_by_activity
的用法示例。
在下文中一共展示了question_usage_by_activity::get_question_mark方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: check_current_mark
protected function check_current_mark($mark)
{
if (is_null($mark)) {
$this->assertNull($this->quba->get_question_mark($this->slot));
} else {
if ($mark == 0) {
// PHP will think a null mark and a mark of 0 are equal,
// so explicity check not null in this case.
$this->assertNotNull($this->quba->get_question_mark($this->slot));
}
$this->assertEquals($mark, $this->quba->get_question_mark($this->slot), 'Expected mark and actual mark differ.', 1.0E-6);
}
}
示例2: get_slot_mark
/**
* Gets the mark for a slot from the quba
*
* @param int $slot
* @return number|null
*/
public function get_slot_mark($slot)
{
return $this->quba->get_question_mark($slot);
}