quiz MDL-20718 notice on review page.
This commit is contained in:
+3
-3
@@ -38,7 +38,7 @@
|
||||
require_login($course->id, false, $cm);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
$coursecontext = get_context_instance(CONTEXT_COURSE, $cm->course);
|
||||
$isteacher = has_capability('mod/quiz:preview', get_context_instance(CONTEXT_MODULE, $cm->id));
|
||||
$isteacher = has_capability('mod/quiz:preview', $context);
|
||||
$options = quiz_get_reviewoptions($quiz, $attempt, $context);
|
||||
$popup = $isteacher ? 0 : $quiz->popup; // Controls whether this is shown in a javascript-protected window or with a safe browser.
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
/// Print the page header
|
||||
$pagequestions = explode(',', $pagelist);
|
||||
$headtags = get_html_head_contributions($pagequestions, $questions, $states);
|
||||
if (!$ispreviewing && $quiz->popup) {
|
||||
if (!$isteacher && $quiz->popup) {
|
||||
define('MESSAGE_WINDOW', true); // This prevents the message window coming up
|
||||
print_header($course->shortname.': '.format_string($quiz->name), '', '', '', $headtags, false, '', '', false, '');
|
||||
if ($quiz->popup == 1) {
|
||||
@@ -141,7 +141,7 @@
|
||||
echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>'; // for overlib
|
||||
|
||||
/// Print heading and tabs if this is part of a preview
|
||||
if (has_capability('mod/quiz:preview', $context)) {
|
||||
if ($isteacher) {
|
||||
if ($attempt->userid == $USER->id) { // this is the report on a preview
|
||||
$currenttab = 'preview';
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user