It was unnecessary on modern browsers, since they let thought a pop-up if you just clicked on a link, so this check was just causing an annoying and misleading alert.
Since the popupchecker was only used here, and since it was implemented in a way that does not work on all browsers, I just deleted the function. If anyone ever finds that they acutally need this functionality, they can re-implement it in a way that works.
//=== old legacy JS code, hopefully to be replaced soon by M.xx.yy and YUI3 code ===
-function popupchecker(msg) {
- var testwindow = window.open('', '', 'width=1,height=1,left=0,top=0,scrollbars=no');
- if (!testwindow) {
- alert(msg);
- } else {
- testwindow.close();
- }
-}
-
function checkall() {
var inputs = document.getElementsByTagName('input');
for (var i = 0; i < inputs.length; i++) {
$USER->editing = $edit;
}
- if ($accessmanager->securewindow_required($canpreview)) {
- $PAGE->requires->js_function_call('popupchecker',array(get_string('popupblockerwarning', 'quiz')));
- }
$PAGE->requires->yui2_lib('event');
// Note: MDL-19010 there will be further changes to printing header and blocks.