diff --git a/mod/quiz/view.php b/mod/quiz/view.php index 3f365f6c609..4bcb1bf7c58 100644 --- a/mod/quiz/view.php +++ b/mod/quiz/view.php @@ -11,7 +11,6 @@ $q = optional_param('q', 0, PARAM_INT); // quiz ID $edit = optional_param('edit', ''); - if ($id) { if (! $cm = get_record("course_modules", "id", $id)) { error("There is no coursemodule with id $id"); @@ -65,7 +64,10 @@ } } - $PAGE->print_header($course->shortname.': %fullname%'); + //only check pop ups if the user is not a teacher, and popup is set + + $bodytags = (isteacher($course->id) or !$quiz->popup)?'':'onload="popupchecker(\'This section of the test is in secure mode, this means that you need to take the quiz in a secure window. Please turn off your popup blocker. Thank you.\');"'; + $PAGE->print_header($course->shortname.': %fullname%','',$bodytags); echo '