Skip to content

Commit

Permalink
v2.0.1: Fixed minor bug intoduced in latest update
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jfederico committed Dec 14, 2015
1 parent 8856415 commit ab0e524
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

defined('MOODLE_INTERNAL') || die;

$plugin->version = 2015080607;
$plugin->version = 2015080608;
$plugin->requires = 2013111800;
$plugin->cron = 0;
$plugin->component = 'mod_bigbluebuttonbn';
Expand Down
17 changes: 9 additions & 8 deletions view.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 /////
////////////////////////////////////////////////
Expand Down Expand Up @@ -211,34 +215,31 @@
$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);

} 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);

} 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
Expand Down

0 comments on commit ab0e524

Please sign in to comment.