From ab0e524869e5ddc4864d081f2331be3224134cad Mon Sep 17 00:00:00 2001 From: jfederico Date: Mon, 14 Dec 2015 10:48:40 -0500 Subject: [PATCH] v2.0.1: Fixed minor bug intoduced in latest update The initialization of context variables were incorrectly placed and ended being set after the initialization of the session variable that is used across views. This produces some warning messages in the logs. --- version.php | 2 +- view.php | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/version.php b/version.php index 351836aa8..bd8cc2ad2 100644 --- a/version.php +++ b/version.php @@ -11,7 +11,7 @@ defined('MOODLE_INTERNAL') || die; -$plugin->version = 2015080607; +$plugin->version = 2015080608; $plugin->requires = 2013111800; $plugin->cron = 0; $plugin->component = 'mod_bigbluebuttonbn'; diff --git a/view.php b/view.php index 68b4fee2b..2f900fda2 100644 --- a/view.php +++ b/view.php @@ -107,6 +107,10 @@ $bbbsession['originServerUrl'] = $CFG->wwwroot; $bbbsession['originServerCommonName'] = ''; $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.$module_version.')'; +// Metadata (context) +$bbbsession['contextActivityName'] = ""; +$bbbsession['contextActivityDescription'] = ""; +$bbbsession['contextActivityTags'] = ""; //////////////////////////////////////////////// ///// BigBlueButton Session Setup Ends ///// //////////////////////////////////////////////// @@ -211,11 +215,15 @@ $group_name = get_string('allparticipants'); $bbbsession['meetingname'] = $bigbluebuttonbn->name.' ('.$group_name.')'; } +// Metadata (contextActivityName updated after meeting name is assigned) +$bbbsession['contextActivityName'] = $bbbsession['meetingname']; + +// Initialize session variable used across views +$SESSION->bigbluebuttonbn_bbbsession = $bbbsession; $now = time(); if (!empty($bigbluebuttonbn->openingtime) && $now < $bigbluebuttonbn->openingtime ) { //CALLING BEFORE - $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; $bigbluebuttonbn_view = 'before'; bigbluebuttonbn_view_before($bbbsession); @@ -223,7 +231,6 @@ } else if (!empty($bigbluebuttonbn->closingtime) && $now > $bigbluebuttonbn->closingtime) { //CALLING AFTER $bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array($context, $bigbluebuttonbn->presentation); - $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; $bigbluebuttonbn_view = 'after'; bigbluebuttonbn_view_after($bbbsession); @@ -231,14 +238,8 @@ } else { //GO JOINING $bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array($bbbsession['context'], $bigbluebuttonbn->presentation, $bigbluebuttonbn->id); - $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; $bigbluebuttonbn_view = 'join'; - // Metadata (context) - $bbbsession['contextActivityName'] = $bbbsession['meetingname']; - $bbbsession['contextActivityDescription'] = ""; - $bbbsession['contextActivityTags'] = ""; - bigbluebuttonbn_view_joining($bbbsession); //JavaScript variables