if ($options->flags == QUESTION_FLAGSEDITABLE && optional_param('savingflags', false, PARAM_BOOL)) { confirm_sesskey(); $formdata = data_submitted(); question_save_flags($formdata, $attemptid, $questionids); redirect($attemptobj->review_url(0, $page, $showall)); } /// Log this review. add_to_log($attemptobj->get_courseid(), 'quiz', 'review', 'review.php?attempt=' . $attemptobj->get_attemptid(), $attemptobj->get_quizid(), $attemptobj->get_cmid()); /// Work out appropriate title. if ($attemptobj->is_preview_user() && $attemptobj->is_own_attempt()) { $strreviewtitle = get_string('reviewofpreview', 'quiz'); } else { $strreviewtitle = get_string('reviewofattempt', 'quiz', $attemptobj->get_attempt_number()); } /// Arrange for the navigation to be displayed. $navbc = $attemptobj->get_navigation_panel('quiz_review_nav_panel', $page, $showall); $firstregion = reset($PAGE->blocks->get_regions()); $PAGE->blocks->add_pretend_block($navbc, $firstregion); /// Print the page header $headtags = $attemptobj->get_html_head_contributions($page); if ($accessmanager->securewindow_required($attemptobj->is_preview_user())) { $accessmanager->setup_secure_page($attemptobj->get_course()->shortname . ': ' . format_string($attemptobj->get_quiz_name()), $headtags); } else { print_header_simple(format_string($attemptobj->get_quiz_name()), '', $attemptobj->navigation($strreviewtitle), '', $headtags, true, $attemptobj->update_module_button()); } echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>'; // for overlib /// Print tabs if they should be there. if ($attemptobj->is_preview_user()) { if ($attemptobj->is_own_attempt()) { $currenttab = 'preview';
} $accessmanager->do_password_check($attemptobj->is_preview_user()); /// This action used to be 'continue attempt' but the database field has only 15 characters. add_to_log($attemptobj->get_courseid(), 'quiz', 'continue attemp', 'review.php?attempt=' . $attemptobj->get_attemptid(), $attemptobj->get_quizid(), $attemptobj->get_cmid()); /// Get the list of questions needed by this page. $questionids = $attemptobj->get_question_ids($page); /// Check. if (empty($questionids)) { quiz_error($quiz, 'noquestionsfound'); } /// Load those questions and the associated states. $attemptobj->load_questions($questionids); $attemptobj->load_question_states($questionids); /// Print the quiz page //////////////////////////////////////////////////////// // Arrange for the navigation to be displayed. $navbc = $attemptobj->get_navigation_panel('quiz_attempt_nav_panel', $page); $firstregion = reset($PAGE->blocks->get_regions()); $PAGE->blocks->add_pretend_block($navbc, $firstregion); // Print the page header $title = get_string('attempt', 'quiz', $attemptobj->get_attempt_number()); $headtags = $attemptobj->get_html_head_contributions($page); if ($accessmanager->securewindow_required($attemptobj->is_preview_user())) { $accessmanager->setup_secure_page($attemptobj->get_course()->shortname . ': ' . format_string($attemptobj->get_quiz_name()), $headtags); } else { print_header_simple(format_string($attemptobj->get_quiz_name()), '', $attemptobj->navigation($title), '', $headtags, true, $attemptobj->update_module_button()); } echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>'; // for overlib if ($attemptobj->is_preview_user()) { /// Show the tab bar. $currenttab = 'preview';