当前位置: 首页>>代码示例>>PHP>>正文


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怎么用?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();
开发者ID:arshanam,项目名称:Moodle-ITScholars-LMS,代码行数:31,代码来源:_attempt.php


注:本文中的quiz_attempt::get_num_attempts_allowed方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。