The function close of the module M.mod_quiz.secure_window is not using the right argument, it is called twice like this:
M.mod_quiz.secure_window.close(url, 0)
|
$this->page->requires->js_init_call('M.mod_quiz.secure_window.close', |
array($url, $delay), false, quiz_get_js_module()); |
But the function signature is this:
close: function(Y, url, delay) {
|
setTimeout(function() {
|
if (window.opener) {
|
window.opener.document.location.reload();
|
window.close();
|
} else {
|
window.location.href = url;
|
}
|
}, delay*1000);
|
}
|
Which means that when there is no window opener (when HTTPS is used, or when the browser blocked the popup), the user is sent to the second argument, being delay when called. The delay is also always 0 as it's always undefined.
- Discovered while testing
-
MDLQA-9926 CLONE - A teacher can set a quiz to display in a full-screen popup
-
- Passed
-
- duplicates
-
MDL-72271 Clicking "Finish Review" after a quiz set to Full screen popup with Javascript security results in a 404 to /mod/quiz/0 if not in a popup window
-
- Closed
-
- has been marked as being related by
-
MDL-73662 404 error on quiz with browsersecurity when time finish or student click "Submit all and finish"
-
- Closed
-