From e514ae345e7fe3ebf38d124669f9b8ab11a7520f 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..331d6202d3e 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 = 2016120501; // 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) }