本文整理汇总了PHP中quiz::cannot_review_message方法的典型用法代码示例。如果您正苦于以下问题:PHP quiz::cannot_review_message方法的具体用法?PHP quiz::cannot_review_message怎么用?PHP quiz::cannot_review_message使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类quiz
的用法示例。
在下文中一共展示了quiz::cannot_review_message方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_cannot_review_message
public function test_cannot_review_message() {
$quiz = new stdClass();
$quiz->reviewattempt = 0x10010;
$quiz->timeclose = 0;
$quiz->attempts = 0;
$quiz->questions = '1,2,0,3,4,0';
$cm = new stdClass();
$cm->id = 123;
$quizobj = new quiz($quiz, $cm, new stdClass(), false);
$this->assertEqual('',
$quizobj->cannot_review_message(mod_quiz_display_options::DURING));
$this->assertEqual('',
$quizobj->cannot_review_message(mod_quiz_display_options::IMMEDIATELY_AFTER));
$this->assertEqual(get_string('noreview', 'quiz'),
$quizobj->cannot_review_message(mod_quiz_display_options::LATER_WHILE_OPEN));
$this->assertEqual(get_string('noreview', 'quiz'),
$quizobj->cannot_review_message(mod_quiz_display_options::AFTER_CLOSE));
$closetime = time() + 10000;
$quiz->timeclose = $closetime;
$quizobj = new quiz($quiz, $cm, new stdClass(), false);
$this->assertEqual(get_string('noreviewuntil', 'quiz', userdate($closetime)),
$quizobj->cannot_review_message(mod_quiz_display_options::LATER_WHILE_OPEN));
}