diff --git a/plugin/bbb/listing.php b/plugin/bbb/listing.php index 67939074a2..3c3b9d4e9f 100755 --- a/plugin/bbb/listing.php +++ b/plugin/bbb/listing.php @@ -6,6 +6,15 @@ * This script initiates a video conference session, calling the BigBlueButton API. */ $course_plugin = 'bbb'; //needed in order to load the plugin lang variables + +$isGlobal = isset($_GET['global']) ? true : false; +$isGlobalPerUser = isset($_GET['user_id']) ? (int) $_GET['user_id'] : false; + +// If global setting is used then we delete the course sessions (cidReq/id_session) +if ($isGlobalPerUser || $isGlobal) { + $cidReset = true; +} + require_once __DIR__.'/config.php'; $plugin = BBBPlugin::create(); @@ -14,8 +23,6 @@ $roomTable = Database::get_main_table('plugin_bbb_room'); $htmlHeadXtra[] = api_get_js_simple(api_get_path(WEB_PLUGIN_PATH).'bbb/resources/utils.js'); -$isGlobal = isset($_GET['global']) ? true : false; -$isGlobalPerUser = isset($_GET['user_id']) ? (int) $_GET['user_id'] : false; $action = isset($_GET['action']) ? $_GET['action'] : ''; $userId = api_get_user_id(); diff --git a/plugin/bbb/start.php b/plugin/bbb/start.php index 4721a6d1b1..1e6e5c5b8f 100755 --- a/plugin/bbb/start.php +++ b/plugin/bbb/start.php @@ -7,6 +7,15 @@ require_once __DIR__.'/../../vendor/autoload.php'; $course_plugin = 'bbb'; //needed in order to load the plugin lang variables + +$isGlobal = isset($_GET['global']) ? true : false; +$isGlobalPerUser = isset($_GET['user_id']) ? (int) $_GET['user_id'] : false; + +// If global setting is used then we delete the course sessions (cidReq/id_session) +if ($isGlobalPerUser || $isGlobal) { + $cidReset = true; +} + require_once __DIR__.'/config.php'; $logInfo = [ @@ -20,10 +29,7 @@ $tpl = new Template($tool_name); $vmIsEnabled = false; $host = ''; $salt = ''; -$isGlobal = isset($_GET['global']) ? true : false; -$isGlobalPerUser = isset($_GET['user_id']) ? (int) $_GET['user_id'] : false; $interface = isset($_GET['interface']) ? (int) $_GET['interface'] : 0; - $bbb = new bbb('', '', $isGlobal, $isGlobalPerUser); $conferenceManager = $bbb->isConferenceManager();