mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
SCORM MDL-21333 modify way link appears if popup does not load to prevent SCORM from loading and not being able to communicate with API - thanks to Matteo Scaramuccia for report/fix
This commit is contained in:
parent
5435ff2777
commit
be9187302c
@ -186,6 +186,18 @@
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
removelink();
|
||||
}
|
||||
function removelink() {
|
||||
try {
|
||||
if (window.opener.document.getElementById('altpopuplink')) {
|
||||
window.opener.document.getElementById('altpopuplink').style.display='none';
|
||||
} else {
|
||||
window.opener.document.all['altpopuplink'].style.display='none';
|
||||
}
|
||||
} catch(error) {
|
||||
// nothing to be done
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
@ -342,8 +342,8 @@
|
||||
</noscript>
|
||||
<?php
|
||||
//Added incase javascript popups are blocked
|
||||
$link = '<a href="'.$CFG->wwwroot.'/mod/scorm/loadSCO.php?id='.$cm->id.$scoidstr.$modestr.'" target="new">'.get_string('popupblockedlinkname','scorm').'</a>';
|
||||
echo $OUTPUT->box(get_string('popupblocked','scorm',$link));
|
||||
$link = '<a href="'.$CFG->wwwroot.'/mod/scorm/loadSCO.php?id='.$cm->id.$scoidstr.$modestr.'" target="_blank">'.get_string('popupblockedlinkname','scorm').'</a>';
|
||||
echo $OUTPUT->box(get_string('popupblocked','scorm',$link), 'generalbox', 'altpopuplink');
|
||||
}
|
||||
} else {
|
||||
echo $OUTPUT->box(get_string('noprerequisites','scorm'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user