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


PHP quiz_attempt::load_specific_question_state方法代码示例

本文整理汇总了PHP中quiz_attempt::load_specific_question_state方法的典型用法代码示例。如果您正苦于以下问题:PHP quiz_attempt::load_specific_question_state方法的具体用法?PHP quiz_attempt::load_specific_question_state怎么用?PHP quiz_attempt::load_specific_question_state使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在quiz_attempt的用法示例。


在下文中一共展示了quiz_attempt::load_specific_question_state方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: notify

        close_window_button();
    }
    /// Can't review unless Students may review -> Responses option is turned on.
    if (!$options->responses) {
        $accessmanager = $attemptobj->get_access_manager(time());
        notify($accessmanager->cannot_review_message($attemptobj->get_review_options()));
        close_window_button();
    }
}
/// Load the questions and states.
$questionids = array($questionid);
$attemptobj->load_questions($questionids);
$attemptobj->load_question_states($questionids);
/// If it was asked for, load another state, instead of the latest.
if ($stateid) {
    $attemptobj->load_specific_question_state($questionid, $stateid);
}
/// Work out the base URL of this page.
$baseurl = $CFG->wwwroot . '/mod/quiz/reviewquestion.php?attempt=' . $attemptobj->get_attemptid() . '&question=' . $questionid;
/// Log this review.
add_to_log($attemptobj->get_courseid(), 'quiz', 'review', 'reviewquestion.php?attempt=' . $attemptobj->get_attemptid() . '&question=' . $questionid . ($stateid ? '&state=' . $stateid : ''), $attemptobj->get_quizid(), $attemptobj->get_cmid());
/// Print the page header
$headtags = $attemptobj->get_question_html_head_contributions($questionid);
print_header('', '', '', '', $headtags);
echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>';
// for overlib
/// Print infobox
$rows = array();
/// User picture and name.
if ($attemptobj->get_userid() != $USER->id) {
    // Print user picture and name
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:31,代码来源:reviewquestion.php


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