Skip to content

Commit 85ef745

Browse files
committed
Add bbb interface option (flash or html5) see BT#14664
- New DB changes are needed see README file - Remove DB changes from changelog - Update version to 2.7 - Fix overwrite of js code "var _p = {web_plugin" -
1 parent b8aa1fd commit 85ef745

File tree

11 files changed

+343
-94
lines changed

11 files changed

+343
-94
lines changed

main/inc/lib/plugin.class.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ public function install_course_fields($courseId, $add_tool_link = true)
523523
return true;
524524
}
525525

526-
//Add an icon in the table tool list
526+
// Add an icon in the table tool list
527527
$this->createLinkToCourseTool($plugin_name, $courseId);
528528
}
529529

@@ -537,7 +537,7 @@ public function install_course_fields($courseId, $add_tool_link = true)
537537
*/
538538
public function uninstall_course_fields($courseId)
539539
{
540-
$courseId = intval($courseId);
540+
$courseId = (int) $courseId;
541541

542542
if (empty($courseId)) {
543543
return false;
@@ -581,8 +581,8 @@ public function uninstall_course_fields($courseId)
581581
public function install_course_fields_in_all_courses($add_tool_link = true)
582582
{
583583
// Update existing courses to add plugin settings
584-
$t_courses = Database::get_main_table(TABLE_MAIN_COURSE);
585-
$sql = "SELECT id FROM $t_courses ORDER BY id";
584+
$table = Database::get_main_table(TABLE_MAIN_COURSE);
585+
$sql = "SELECT id FROM $table ORDER BY id";
586586
$res = Database::query($sql);
587587
while ($row = Database::fetch_assoc($res)) {
588588
$this->install_course_fields($row['id'], $add_tool_link);
@@ -595,8 +595,8 @@ public function install_course_fields_in_all_courses($add_tool_link = true)
595595
public function uninstall_course_fields_in_all_courses()
596596
{
597597
// Update existing courses to add conference settings
598-
$t_courses = Database::get_main_table(TABLE_MAIN_COURSE);
599-
$sql = "SELECT id FROM $t_courses
598+
$table = Database::get_main_table(TABLE_MAIN_COURSE);
599+
$sql = "SELECT id FROM $table
600600
ORDER BY id";
601601
$res = Database::query($sql);
602602
while ($row = Database::fetch_assoc($res)) {

plugin/bbb/README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,32 @@ ALTER TABLE plugin_bbb_meeting ADD access_url int NOT NULL DEFAULT 1;
2828
```
2929
For version 2.5 you need execute these SQL queries
3030
```sql
31-
CREATE TABLE plugin_bbb_room (
31+
CREATE TABLE IF NOT EXISTS plugin_bbb_room (
3232
id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
3333
meeting_id int(10) unsigned NOT NULL,
3434
participant_id int(11) NOT NULL,
3535
in_at datetime NOT NULL,
36-
out_at datetime NOT NULL,
37-
FOREIGN KEY (meeting_id) REFERENCES plugin_bbb_meeting (id),
38-
FOREIGN KEY (participant_id) REFERENCES user (id)
36+
out_at datetime NOT NULL
3937
);
40-
ALTER TABLE plugin_bbb_meeting ADD video_url TEXT NULL;
41-
ALTER TABLE plugin_bbb_meeting ADD has_video_m4v TINYINT NOT NULL DEFAULT 0;
38+
ALTER TABLE plugin_bbb_meeting ADD COLUMN video_url TEXT NULL;
39+
ALTER TABLE plugin_bbb_meeting ADD COLUMN has_video_m4v TINYINT NOT NULL DEFAULT 0;
4240
ALTER TABLE plugin_bbb_meeting ADD COLUMN user_id INT DEFAULT 0;
4341
ALTER TABLE plugin_bbb_meeting ADD COLUMN access_url INT DEFAULT 0;
42+
ALTER TABLE plugin_bbb_meeting ADD COLUMN remote_id char(30);
43+
ALTER TABLE plugin_bbb_meeting ADD COLUMN visibility TINYINT NOT NULL DEFAULT 1;
44+
ALTER TABLE plugin_bbb_meeting ADD COLUMN session_id INT DEFAULT 0;
4445
```
4546
For version 2.6 (adding limits) you need execute these SQL queries
4647
```sql
4748
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url, access_url_changeable, access_url_locked) VALUES ('bbb_max_users_limit', 'bbb', 'setting', 'Plugins', '3', 'bbb', null, null, null, 1, 1, 0);
4849
INSERT INTO extra_field (extra_field_type, field_type, variable, display_text, default_value, field_order, visible_to_self, visible_to_others, changeable, filter, created_at) VALUES (2, 15, 'plugin_bbb_course_users_limit', 'MaxUsersInConferenceRoom', '0', 1, 1, 0, 1, null, '2017-05-28 01:19:32');
4950
INSERT INTO extra_field (extra_field_type, field_type, variable, display_text, default_value, field_order, visible_to_self, visible_to_others, changeable, filter, created_at) VALUES (3, 15, 'plugin_bbb_session_users_limit', 'MaxUsersInConferenceRoom', null, 1, 1, 0, 1, null, '2017-05-28 01:19:32');
5051
```
52+
53+
For version 2.7
54+
```sql
55+
ALTER TABLE plugin_bbb_meeting ADD COLUMN interface INT NOT NULL DEFAULT 0;
56+
ALTER TABLE plugin_bbb_room ADD COLUMN interface INT NOT NULL DEFAULT 0;
57+
ALTER TABLE plugin_bbb_room MODIFY COLUMN in_at datetime;
58+
ALTER TABLE plugin_bbb_room MODIFY COLUMN out_at datetime;
59+
```

plugin/bbb/admin.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
<?php
2+
/* For license terms, see /license.txt */
3+
4+
use Chamilo\UserBundle\Entity\User;
5+
26
/**
37
* This script initiates a video conference session, calling the BigBlueButton API.
48
*
59
* @package chamilo.plugin.bigbluebutton
610
*/
7-
use Chamilo\UserBundle\Entity\User;
811

912
$course_plugin = 'bbb'; //needed in order to load the plugin lang variables
1013
$cidReset = true;
@@ -43,13 +46,12 @@
4346
$meetings = $bbb->getMeetings(0, 0, 0, true, $dateRange);
4447

4548
foreach ($meetings as &$meeting) {
46-
$participants = $bbb->findMeetingParticipants($meeting['id']);
49+
$participants = $bbb->findConnectedMeetingParticipants($meeting['id']);
4750

4851
foreach ($participants as $meetingParticipant) {
4952
/** @var User $participant */
5053
$participant = $meetingParticipant['participant'];
51-
$meeting['participants'][] = $participant->getCompleteName()
52-
.' ('.$participant->getEmail().')';
54+
$meeting['participants'][] = $participant->getCompleteName().' ('.$participant->getEmail().')';
5355
}
5456
}
5557

plugin/bbb/changelog.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,41 @@
1+
Version 2.7 - 2018-07
2+
---------------------
3+
* Add interface option (HTML5 or Flash)
4+
15
Version 2.6 - 2017-05
26
---------------------
37
* Add max users limit
4-
* Requires the following database changes
5-
* INSERT INTO chamilo111x.settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url, access_url_changeable, access_url_locked) VALUES ('bbb_max_users_limit', 'bbb', 'setting', 'Plugins', '3', 'bbb', null, null, null, 1, 1, 0);
6-
* INSERT INTO chamilo111x.extra_field (extra_field_type, field_type, variable, display_text, default_value, field_order, visible_to_self, visible_to_others, changeable, filter, created_at) VALUES (2, 15, 'plugin_bbb_course_users_limit', 'MaxUsersInConferenceRoom', '0', 1, 1, 0, 1, null, '2017-05-28 01:19:32');
7-
* INSERT INTO chamilo111x.extra_field (extra_field_type, field_type, variable, display_text, default_value, field_order, visible_to_self, visible_to_others, changeable, filter, created_at) VALUES (3, 15, 'plugin_bbb_session_users_limit', 'MaxUsersInConferenceRoom', null, 1, 1, 0, 1, null, '2017-05-28 01:19:32');
8-
8+
99
Version 2.5 - 2016-07
1010
---------------------
1111
* User global conference support
12-
* Requires a database change: "ALTER TABLE plugin_bbb_meeting ADD COLUMN user_id INT DEFAULT 0"
13-
* Requires a database change: "ALTER TABLE plugin_bbb_meeting ADD COLUMN access_url INT DEFAULT 0"
1412

1513
Version 2.4 - 2016-05
1614
------------------------
17-
Changes:
1815

1916
* Global conference support (Requires to update the plugin settings).
2017
* Course group conference support
21-
* Requires a database change: "ALTER TABLE plugin_bbb_meeting ADD COLUMN group_id INT DEFAULT 0"
22-
* Requires to update the plugin settings.
2318

2419
Version 2.3 - 2015-05-18
2520
------------------------
2621
Changes:
27-
* Added support for variable voiceBridge to be sent on meeting creation. See https://code.google.com/p/bigbluebutton/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Component%20Summary&groupby=&sort=&id=1186 and https://support.chamilo.org/issues/7669 for details.
28-
* Requires a database change: "ALTER TABLE plugin_bbb_meeting ADD COLUMN voice_bridge INT NOT NULL DEFAULT 1;"
22+
* Added support for variable voiceBridge to be sent on meeting creation. See:
23+
https://code.google.com/p/bigbluebutton/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Component%20Summary&groupby=&sort=&id=1186
24+
and https://support.chamilo.org/issues/7669 for details.
2925

3026
Version 2.2 - 2014-10-15
3127
------------------------
3228
Changes:
33-
* Add 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);".
34-
* Add possibility to hide recordings of previous conferences from the list. 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 visibility tinytint not null default 1;".
29+
* Add a pseudo-random guid to avoid clashing conferences when several Chamilo portals use the same server.
30+
* Add possibility to hide recordings of previous conferences from the list.
3531
* Show action icons in the action column
3632
* Hide the ID of the meeting (this was an internal ID, useless to the final user). It is still in the HTML source, however
3733
* Show number of minutes of the recording (in the recordings list)
3834

3935
Version 2.1
4036
-----------
4137
Released with: Chamilo LMS 1.9.8
42-
Changes:
43-
* now supports sessions (requires you to "alter table plugin_bbb_meeting add column session_id int default 0;")
38+
* Session support
4439

4540
Version 2.0
4641
-----------

plugin/bbb/lang/english.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,9 @@
6666
$strings['MaxXUsersReachedManager'] = 'The limit of %s simultaneous users has been reached for this conference room. To increase this limit, please contact the platform administrator.';
6767
$strings['MaxUsersInConferenceRoom'] = 'Max simultaneous users in a conference room';
6868
$strings['global_conference_allow_roles'] = "Global conference link only visible for this user roles";
69-
$strings['CreatedAt'] = "Created at";
69+
$strings['CreatedAt'] = 'Created at';
70+
$strings['interface'] = 'Interface';
71+
$strings['launch_type'] = 'Launch type';
72+
73+
$strings['EnterConferenceFlash'] = 'Enter the videoconference (Flash client)';
74+
$strings['EnterConferenceHTML5'] = 'Enter the videoconference (HTML5 client)';

0 commit comments

Comments
 (0)