MDL-64591 User tours: don't show during redirects & other bad times
authorTim Hunt <T.J.Hunt@open.ac.uk>
Fri, 18 Jan 2019 15:58:11 +0000 (15:58 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Tue, 26 Feb 2019 13:04:38 +0000 (13:04 +0000)
admin/tool/usertours/classes/helper.php

index 14a96e0..1e4cdbb 100644 (file)
@@ -497,6 +497,12 @@ class helper {
             return;
         }
 
+        if (in_array($PAGE->pagelayout, ['maintenance', 'print', 'redirect'])) {
+            // Do not try to show user tours inside iframe, in maintenance mode,
+            // when printing, or during redirects.
+            return;
+        }
+
         if (self::$bootstrapped) {
             return;
         }