MDL-28295 SCORM change mangement of pop-up windows, load full SCORM API in existing window - this fixes an issue with IE 7 and httpreq communication

This commit is contained in:
Dan Marsden 2011-07-13 13:31:28 +12:00
parent 3fdc622697
commit 6d954dd372
6 changed files with 48 additions and 34 deletions

View file

@ -555,6 +555,22 @@ function xmldb_scorm_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2011073100, 'scorm');
}
if ($oldversion < 2011080100) {
//MDL-28295 the behaviour of pop-up windows has now changed - it now loads the full Player in the window
//because of this, pop-up windows now include the TOC and the nav bar - disabling these for existing SCORMS
//as it is a change that most users won't expect.
//get all SCORMS that use a new window.
require_once($CFG->dirroot."/mod/scorm/lib.php");
$rs = $DB->get_recordset('scorm', array('popup' => 1), '', 'id,hidetoc,hidenav');
foreach ($rs as $scorm) {
$scorm->hidetoc = SCORM_TOC_DISABLED;
$scorm->hidenav = 1;
$DB->update_record('scorm', $scorm);
}
$rs->close();
upgrade_mod_savepoint(true, 2011080100, 'scorm');
}
return true;
}