Add backwards compatibility remote_id vs id in BBB plugin - refs #7327

1.9.x
Yannick Warnier 10 years ago
parent a453e523dd
commit 98788aec3d
  1. 14
      plugin/bbb/changelog.md
  2. 33
      plugin/bbb/lib/bbb.lib.php
  3. 2
      plugin/bbb/lib/bbb_plugin.class.php

@ -1,9 +1,19 @@
version 0.9
version 2.2 - 2014-10-15
------------------------
Changes:
* Now uses a pseudo-random guid to avoid clashing conferences when several Chamilo portals use the same server. If you were using this plugin before, you will have to update the plugin_bbb_meeting table to "alter table plugin_bbb_meeting add column remote_id char(36);".
*
version 2.1
-----------
Released with: Chamilo LMS 1.9.8
Changes:
* now supports sessions (requires you to "alter table plugin_bbb_meeting add column session_id int default 0;")
version 0.8
version 2.0
-----------
(to be described)
version 1.0
-----------
Released with: Chamilo LMS 1.9.0

@ -277,6 +277,17 @@ class bbb
while ($status == false) {
$meetingIsRunningInfo = $this->getMeetingInfo($params);
if ($meetingIsRunningInfo === false) {
//checking with the remote_id didn't work, so just in case and
// to provide backwards support, check with the id
$params = array(
'meetingId' => $meetingData['id'],
// -- REQUIRED - The unique id for the meeting
'password' => $this->getModMeetingPassword()
// -- REQUIRED - The moderator password for the meeting
);
$meetingIsRunningInfo = $this->getMeetingInfo($params);
}
if ($this->debug) {
error_log(print_r($meetingIsRunningInfo, 1));
@ -366,6 +377,17 @@ class bbb
foreach ($meetingList as $meetingDB) {
$meetingBBB = $this->getMeetingInfo(array('meetingId' => $meetingDB['remote_id'], 'password' => $pass));
if ($meetingBBB === false) {
//checking with the remote_id didn't work, so just in case and
// to provide backwards support, check with the id
$params = array(
'meetingId' => $meetingDB['id'],
// -- REQUIRED - The unique id for the meeting
'password' => $pass
// -- REQUIRED - The moderator password for the meeting
);
$meetingBBB = $this->getMeetingInfo($params);
}
$meetingBBB['end_url'] = api_get_self().'?'.api_get_cidreq().'&action=end&id='.$meetingDB['id'];
@ -564,6 +586,17 @@ class bbb
}
$pass = $this->getModMeetingPassword();
$info = $this->getMeetingInfo(array('meetingId' => $meetingData['remote_id'], 'password' => $pass));
if ($info === false) {
//checking with the remote_id didn't work, so just in case and
// to provide backwards support, check with the id
$params = array(
'meetingId' => $meetingData['id'],
// -- REQUIRED - The unique id for the meeting
'password' => $pass
// -- REQUIRED - The moderator password for the meeting
);
$info = $this->getMeetingInfo($params);
}
if (!empty($info) && isset($info['participantCount'])) {
return $info['participantCount'];

@ -32,7 +32,7 @@ class BBBPlugin extends Plugin
protected function __construct()
{
parent::__construct('2.1', 'Julio Montoya, Yannick Warnier', array('tool_enable' => 'boolean', 'host' =>'text', 'salt' => 'text'));
parent::__construct('2.2', 'Julio Montoya, Yannick Warnier', array('tool_enable' => 'boolean', 'host' =>'text', 'salt' => 'text'));
}
public function install()

Loading…
Cancel
Save