本文整理汇总了PHP中quiz_attempt::get_num_attempts_allowed方法的典型用法代码示例。如果您正苦于以下问题:PHP quiz_attempt::get_num_attempts_allowed方法的具体用法?PHP quiz_attempt::get_num_attempts_allowed怎么用?PHP quiz_attempt::get_num_attempts_allowed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类quiz_attempt
的用法示例。
在下文中一共展示了quiz_attempt::get_num_attempts_allowed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/// Show the tab bar.
$currenttab = 'preview';
include 'tabs.php';
/// Heading and tab bar.
print_heading(get_string('previewquiz', 'quiz', format_string($quiz->name)));
$attemptobj->print_restart_preview_button();
/// Inform teachers of any restrictions that would apply to students at this point.
if ($messages) {
print_box_start('quizaccessnotices');
print_heading(get_string('accessnoticesheader', 'quiz'), '', 3);
$accessmanager->print_messages($messages);
print_box_end();
}
} else {
/// Just a heading.
if ($attemptobj->get_num_attempts_allowed() != 1) {
print_heading(format_string($attemptobj->get_quiz_name()) . ' - ' . $title);
} else {
print_heading(format_string($attemptobj->get_quiz_name()));
}
}
// Start the form
echo '<form id="responseform" method="post" action="', $attemptobj->processattempt_url(), '" enctype="multipart/form-data" accept-charset="utf-8">', "\n";
echo '<div>';
print_js_call('init_quiz_form');
/// Print the navigation panel in a left column.
print_container_start();
echo '<div id="left-column">';
$attemptobj->print_navigation_panel('quiz_attempt_nav_panel', $page);
echo '</div>';
print_container_end();