if (!$attemptobj->is_preview_user() && $messages) { print_error('attempterror', 'quiz', $attemptobj->view_url(), $accessmanager->print_messages($messages, true)); } $accessmanager->do_password_check($attemptobj->is_preview_user()); /// Log this page view. add_to_log($attemptobj->get_courseid(), 'quiz', 'view summary', 'summary.php?attempt=' . $attemptobj->get_attemptid(), $attemptobj->get_quizid(), $attemptobj->get_cmid()); /// Load the questions and states. $attemptobj->load_questions(); $attemptobj->load_question_states(); /// Print the page header require_js('mod/quiz/quiz.js'); $title = get_string('summaryofattempt', 'quiz'); if ($accessmanager->securewindow_required($attemptobj->is_preview_user())) { $accessmanager->setup_secure_page($attemptobj->get_course()->shortname . ': ' . format_string($attemptobj->get_quiz_name()), ''); } else { print_header_simple(format_string($attemptobj->get_quiz_name()), '', $attemptobj->navigation($title), '', '', true, $attemptobj->update_module_button()); } /// Print tabs if they should be there. if ($attemptobj->is_preview_user()) { $currenttab = 'preview'; include 'tabs.php'; } /// Print heading. print_heading(format_string($attemptobj->get_quiz_name())); if ($attemptobj->is_preview_user()) { $attemptobj->print_restart_preview_button(); } print_heading($title); /// Prepare the summary table header $table->class = 'generaltable quizsummaryofattempt'; $table->head = array(get_string('question', 'quiz'), get_string('status', 'quiz'));