Merge branch 'MDL-68983-recent-session-lock-ro' of https://github.com/brendanheywood...
authorJake Dallimore <jake@moodle.com>
Wed, 21 Oct 2020 04:45:36 +0000 (12:45 +0800)
committerJake Dallimore <jake@moodle.com>
Wed, 21 Oct 2020 04:45:36 +0000 (12:45 +0800)
lib/classes/session/manager.php

index c3b0baa..8934080 100644 (file)
@@ -1274,6 +1274,10 @@ class manager {
             return;
         }
 
+        if (defined('READ_ONLY_SESSION') && READ_ONLY_SESSION && !empty($CFG->enable_read_only_sessions)) {
+            return;
+        }
+
         $SESSION->recentsessionlocks = self::get_recent_session_locks();
         array_push($SESSION->recentsessionlocks, $sessionlock);