function theme_quiz_availability in Quiz 5
Same name and namespace in other branches
- 5.2 quiz.module \theme_quiz_availability()
- 6.6 quiz.pages.inc \theme_quiz_availability()
- 6.2 quiz.pages.inc \theme_quiz_availability()
- 6.3 quiz.pages.inc \theme_quiz_availability()
- 6.5 quiz.pages.inc \theme_quiz_availability()
Themes a message about the quiz's availability for quiz takers
File
- ./
quiz.module, line 465 - Quiz Module
Code
function theme_quiz_availability($node) {
$status = _quiz_availability($node);
$output = '<div class="quiz_availability"><p>';
switch ($status) {
case 'future':
$output .= t('This quiz will not be available until %time.', array(
'%time' => format_date($node->quiz_open),
));
break;
case 'open':
$output .= t('This quiz closes %time.', array(
'%time' => format_date($node->quiz_close),
));
break;
case 'closed':
$output .= t('This quiz is no longer available.');
break;
}
$output .= '</p></div>' . "\n";
return $output;
}