From 9536334dca0c7c19f1b978602c1362dec751e71c Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Tue, 20 Dec 2016 20:28:39 +1300 Subject: [PATCH] MDL-50643 mod_scorm: redirect using current window instead of parent. --- mod/scorm/version.php | 2 +- mod/scorm/view.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mod/scorm/version.php b/mod/scorm/version.php index 56d6b742f5c..3adf3dd061c 100644 --- a/mod/scorm/version.php +++ b/mod/scorm/version.php @@ -24,7 +24,7 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2016120500; // The current module version (Date: YYYYMMDDXX). +$plugin->version = 2016122000; // The current module version (Date: YYYYMMDDXX). $plugin->requires = 2016112900; // Requires this Moodle version. $plugin->component = 'mod_scorm'; // Full name of the plugin (used for diagnostics). $plugin->cron = 300; diff --git a/mod/scorm/view.js b/mod/scorm/view.js index 22ab9c6a1ad..a80ddd0c30c 100644 --- a/mod/scorm/view.js +++ b/mod/scorm/view.js @@ -46,8 +46,7 @@ M.mod_scormform.init = function(Y) { // Onunload is called multiple times in the SCORM window - we only want to handle when it is actually closed. setTimeout(function() { if (winobj.closed) { - // Redirect the parent window to the course homepage. - parent.window.location = course_url; + window.location = course_url; } }, 800) }