forked from blindsidenetworks-ps/moodle-mod_bigbluebuttonbn
-
Notifications
You must be signed in to change notification settings - Fork 3
/
view.php
458 lines (394 loc) · 21 KB
/
view.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
<?php
/**
* Join a BigBlueButton room
*
* @package mod_bigbluebuttonbn
* @author Fred Dixon (ffdixon [at] blindsidenetworks [dt] com)
* @author Jesus Federico (jesus [at] blindsidenetworks [dt] com)
* @copyright 2010-2014 Blindside Networks Inc.
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later
*/
require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
require_once(dirname(__FILE__).'/locallib.php');
require_once($CFG->libdir . '/completionlib.php');
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Mobile_Detect.php';
$id = optional_param('id', 0, PARAM_INT); // course_module ID, or
$b = optional_param('n', 0, PARAM_INT); // bigbluebuttonbn instance ID
$group = optional_param('group', 0, PARAM_INT); // bigbluebuttonbn group ID
if ($id) {
$cm = get_coursemodule_from_id('bigbluebuttonbn', $id, 0, false, MUST_EXIST);
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $cm->instance), '*', MUST_EXIST);
} elseif ($b) {
$bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $n), '*', MUST_EXIST);
$course = $DB->get_record('course', array('id' => $bigbluebuttonbn->course), '*', MUST_EXIST);
$cm = get_coursemodule_from_instance('bigbluebuttonbn', $bigbluebuttonbn->id, $course->id, false, MUST_EXIST);
} else {
print_error('You must specify a course_module ID or an instance ID');
}
require_login($course, true, $cm);
if ( $CFG->version < '2013111800' ) {
//This is valid before v2.6
$module = $DB->get_record('modules', array('name' => 'bigbluebuttonbn'));
$module_version = $module->version;
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
} else {
//This is valid after v2.6
$module_version = get_config('mod_bigbluebuttonbn', 'version');
$context = context_module::instance($cm->id);
}
if ( $CFG->version < '2014051200' ) {
//This is valid before v2.7
add_to_log($course->id, 'bigbluebuttonbn', 'view', 'view.php?id=$cm->id', $bigbluebuttonbn->name, $cm->id);
} else {
//This is valid after v2.7
$event = \mod_bigbluebuttonbn\event\bigbluebuttonbn_activity_viewed::create(
array(
'context' => $context,
'objectid' => $bigbluebuttonbn->id
)
);
$event->trigger();
}
//User data
$bbbsession['username'] = get_string('fullnamedisplay', 'moodle', $USER);
$bbbsession['userID'] = $USER->id;
$bbbsession['roles'] = get_user_roles($context, $USER->id, true);
if( $bigbluebuttonbn->participants == null || $bigbluebuttonbn->participants == "[]" ){
//The room that is being used comes from a previous version
$moderator = has_capability('mod/bigbluebuttonbn:moderate', $context);
} else {
$moderator = bigbluebuttonbn_is_moderator($bbbsession['userID'], $bbbsession['roles'], $bigbluebuttonbn->participants);
}
$administrator = has_capability('moodle/category:manage', $context);
//Validates if the BigBlueButton server is running
//BigBlueButton server data
$bbbsession['salt'] = trim($CFG->BigBlueButtonBNSecuritySalt);
$bbbsession['url'] = trim(trim($CFG->BigBlueButtonBNServerURL),'/').'/';
$bbbsession['detectmobile'] = $CFG->BigBlueButtonBNDetectMobile;
$serverVersion = bigbluebuttonbn_getServerVersion($bbbsession['url']);
if ( !isset($serverVersion) ) { //Server is not working
if ( $administrator )
print_error( 'view_error_unable_join', 'bigbluebuttonbn', $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn' );
else if ( $moderator )
print_error( 'view_error_unable_join_teacher', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course );
else
print_error( 'view_error_unable_join_student', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course );
} else {
$xml = bigbluebuttonbn_wrap_simplexml_load_file( bigbluebuttonbn_getMeetingsURL( $bbbsession['url'], $bbbsession['salt'] ) );
if ( !isset($xml) || !isset($xml->returncode) || $xml->returncode == 'FAILED' ){ // The salt is wrong
if ( $administrator )
print_error( 'view_error_unable_join', 'bigbluebuttonbn', $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn' );
else if ( $moderator )
print_error( 'view_error_unable_join_teacher', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course );
else
print_error( 'view_error_unable_join_student', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course );
}
}
//// BigBlueButton Setup Starts
//Server data
$bbbsession['modPW'] = $bigbluebuttonbn->moderatorpass;
$bbbsession['viewerPW'] = $bigbluebuttonbn->viewerpass;
//User roles
$bbbsession['flag']['moderator'] = $moderator;
$bbbsession['textflag']['moderator'] = $moderator? 'true': 'false';
$bbbsession['flag']['administrator'] = $administrator;
$bbbsession['textflag']['administrator'] = $administrator? 'true': 'false';
//Database info related to the activity
$bbbsession['welcome'] = $bigbluebuttonbn->welcome;
if( !isset($bbbsession['welcome']) || $bbbsession['welcome'] == '') {
$bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn');
}
$bbbsession['voicebridge'] = $bigbluebuttonbn->voicebridge;
$bbbsession['description'] = $bigbluebuttonbn->description;
$bbbsession['flag']['wait'] = $bigbluebuttonbn->wait;
$bbbsession['flag']['allmoderators'] = $bigbluebuttonbn->allmoderators;
$bbbsession['flag']['record'] = $bigbluebuttonbn->record;
$bbbsession['textflag']['wait'] = $bigbluebuttonbn->wait? 'true': 'false';
$bbbsession['textflag']['record'] = $bigbluebuttonbn->record? 'true': 'false';
$bbbsession['textflag']['allmoderators'] = $bigbluebuttonbn->allmoderators? 'true': 'false';
if( $bigbluebuttonbn->record )
$bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
$bbbsession['timeavailable'] = $bigbluebuttonbn->timeavailable;
$bbbsession['timedue'] = $bigbluebuttonbn->timedue;
$bbbsession['timeduration'] = intval($bigbluebuttonbn->timeduration / 60);
if( $bbbsession['timeduration'] > 0 )
$bbbsession['welcome'] .= '<br><br>'.str_replace("%duration%", ''.$bbbsession['timeduration'], get_string('bbbdurationwarning', 'bigbluebuttonbn'));
//Additional info related to the course
$bbbsession['coursename'] = $course->fullname;
$bbbsession['courseid'] = $course->id;
$bbbsession['cm'] = $cm;
//Operation URLs
$bbbsession['courseURL'] = $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course;
$bbbsession['logoutURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/view_end.php?id='.$id;
//Metadata
$bbbsession['origin'] = "Moodle";
$bbbsession['originVersion'] = $CFG->release;
$parsedUrl = parse_url($CFG->wwwroot);
$bbbsession['originServerName'] = $parsedUrl['host'];
$bbbsession['originServerUrl'] = $CFG->wwwroot;
$bbbsession['originServerCommonName'] = '';
$bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.$module_version.')';
$bbbsession['context'] = $course->fullname;
$bbbsession['contextActivity'] = $bigbluebuttonbn->name;
$bbbsession['contextActivityDescription'] = $bigbluebuttonbn->description;
//// BigBlueButton Setup Ends
// Mark viewed by user (if required)
$completion = new completion_info($course);
$completion->set_module_viewed($cm);
/// Print the page header
$PAGE->set_context($context);
$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id));
$PAGE->set_title(format_string($bigbluebuttonbn->name));
$PAGE->set_heading($course->shortname);
$PAGE->set_cacheable(false);
if( $bbbsession['flag']['administrator'] || $bbbsession['flag']['moderator'] || !$bbbsession['flag']['wait'] ) {
$PAGE->set_pagelayout('incourse');
} else {
//Disable blocks for layouts which do include pre-post blocks
$PAGE->blocks->show_only_fake_blocks();
}
// Validate if the user is in a role allowed to join
if ( !has_capability('mod/bigbluebuttonbn:join', $context) ) {
echo $OUTPUT->header();
if (isguestuser()) {
echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'),
get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id);
} else {
echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'),
get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id);
}
echo $OUTPUT->footer();
exit;
}
// Output starts here
echo $OUTPUT->header();
$bbbsession['bigbluebuttonbnid'] = $bigbluebuttonbn->id;
/// find out current groups mode
if (groups_get_activity_groupmode($cm) == 0) { //No groups mode
$bbbsession['meetingid'] = $bigbluebuttonbn->meetingid.'-'.$bbbsession['courseid'].'-'.$bbbsession['bigbluebuttonbnid'];
$bbbsession['meetingname'] = $bigbluebuttonbn->name;
} else { // Separate groups mode
//If doesnt have group
$bbbsession['group'] = (!$group)?groups_get_activity_group($cm): $group;
$bbbsession['meetingid'] = $bigbluebuttonbn->meetingid.'-'.$bbbsession['courseid'].'-'.$bbbsession['bigbluebuttonbnid'].'['.$bbbsession['group'].']';
if( $bbbsession['group'] > 0 )
$group_name = groups_get_group_name($bbbsession['group']);
else
$group_name = get_string('allparticipants');
$bbbsession['meetingname'] = $bigbluebuttonbn->name.' ('.$group_name.')';
}
if( $bbbsession['flag']['administrator'] || $bbbsession['flag']['moderator'] || $bbbsession['flag']['allmoderators'] )
$bbbsession['joinURL'] = bigbluebuttonbn_getJoinURL($bbbsession['meetingid'], $bbbsession['username'], $bbbsession['modPW'], $bbbsession['salt'], $bbbsession['url'], $bbbsession['userID']);
else
$bbbsession['joinURL'] = bigbluebuttonbn_getJoinURL($bbbsession['meetingid'], $bbbsession['username'], $bbbsession['viewerPW'], $bbbsession['salt'], $bbbsession['url'], $bbbsession['userID']);
// Mobile detection
if ($bbbsession['detectmobile']) {
if (bigbluebutton_is_device_for_mobile_client()) {
$bbbsession['joinURL'] = preg_replace('/http[s]?:\/\//i', 'bigbluebutton://', $bbbsession['joinURL']);
}
}
$joining = false;
$bigbluebuttonbn_view = '';
if (!$bigbluebuttonbn->timeavailable ) {
if (!$bigbluebuttonbn->timedue || time() <= $bigbluebuttonbn->timedue){
//GO JOINING
groups_print_activity_menu($cm, $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id);
$bigbluebuttonbn_view = 'join';
$joining = bigbluebuttonbn_view_joining( $bbbsession, $context, $bigbluebuttonbn );
} else {
//CALLING AFTER
$bigbluebuttonbn_view = 'after';
echo $OUTPUT->heading(get_string('bbbfinished', 'bigbluebuttonbn'));
echo $OUTPUT->box_start('generalbox boxaligncenter', 'dates');
bigbluebuttonbn_view_after( $bbbsession );
echo $OUTPUT->box_end();
}
} else if ( time() < $bigbluebuttonbn->timeavailable ){
//CALLING BEFORE
$bigbluebuttonbn_view = 'before';
echo $OUTPUT->heading(get_string('bbbnotavailableyet', 'bigbluebuttonbn'));
echo $OUTPUT->box_start('generalbox boxaligncenter', 'dates');
bigbluebuttonbn_view_before( $bbbsession );
echo $OUTPUT->box_end();
} else if (!$bigbluebuttonbn->timedue || time() <= $bigbluebuttonbn->timedue ) {
//GO JOINING
groups_print_activity_menu($cm, $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id);
$bigbluebuttonbn_view = 'join';
$joining = bigbluebuttonbn_view_joining( $bbbsession, $context, $bigbluebuttonbn );
} else {
//CALLING AFTER
$bigbluebuttonbn_view = 'after';
echo $OUTPUT->heading(get_string('bbbfinished', 'bigbluebuttonbn'));
echo $OUTPUT->box_start('generalbox boxaligncenter', 'dates');
bigbluebuttonbn_view_after( $bbbsession );
echo $OUTPUT->box_end();
}
//JavaScript variables
$jsVars = array(
'waitformoderator' => $bbbsession['textflag']['wait'],
'isadministrator' => $bbbsession['textflag']['administrator'],
'ismoderator' => $bbbsession['textflag']['moderator'],
'meetingid' => $bbbsession['meetingid'],
'joinurl' => $bbbsession['joinURL'],
'joining' => ($joining? 'true':'false'),
'bigbluebuttonbn_view' => $bigbluebuttonbn_view,
'bigbluebuttonbnid' => $bbbsession['bigbluebuttonbnid']
);
$jsmodule = array(
'name' => 'mod_bigbluebuttonbn',
'fullpath' => '/mod/bigbluebuttonbn/module.js',
'requires' => array('datasource-get', 'datasource-jsonschema', 'datasource-polling'),
);
$PAGE->requires->data_for_js('bigbluebuttonbn', $jsVars);
$PAGE->requires->js_init_call('M.mod_bigbluebuttonbn.init_view', array(), false, $jsmodule);
// Finish the page
echo $OUTPUT->footer();
function bigbluebuttonbn_view_joining( $bbbsession, $context, $bigbluebuttonbn ){
global $CFG, $DB;
$joining = false;
// If user is administrator, moderator or if is viewer and no waiting is required
if( $bbbsession['flag']['administrator'] || $bbbsession['flag']['moderator'] || !$bbbsession['flag']['wait'] ) {
//
// Join directly
//
$metadata = array("meta_origin" => $bbbsession['origin'],
"meta_originVersion" => $bbbsession['originVersion'],
"meta_originServerName" => $bbbsession['originServerName'],
"meta_originServerCommonName" => $bbbsession['originServerCommonName'],
"meta_originTag" => $bbbsession['originTag'],
"meta_context" => $bbbsession['context'],
"meta_contextActivity" => $bbbsession['contextActivity'],
"meta_contextActivityDescription" => $bbbsession['contextActivityDescription'],
"meta_recording" => $bbbsession['textflag']['record'],
"meta_invitation-url" => $bbbsession['courseURL']);
$response = bigbluebuttonbn_getCreateMeetingArray( $bbbsession['meetingname'], $bbbsession['meetingid'], $bbbsession['welcome'], $bbbsession['modPW'], $bbbsession['viewerPW'], $bbbsession['salt'], $bbbsession['url'], $bbbsession['logoutURL'], $bbbsession['textflag']['record'], $bbbsession['timeduration'], $bbbsession['voicebridge'], $metadata );
if (!$response) {
// If the server is unreachable, then prompts the user of the necessary action
if ( $bbbsession['flag']['administrator'] ) {
print_error( 'view_error_unable_join', 'bigbluebuttonbn', $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn' );
} else if ( $bbbsession['flag']['moderator'] ) {
print_error( 'view_error_unable_join_teacher', 'bigbluebuttonbn', $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn' );
} else {
print_error( 'view_error_unable_join_student', 'bigbluebuttonbn', $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn' );
}
} else if( $response['returncode'] == "FAILED" ) {
// The meeting was not created
$error_key = bigbluebuttonbn_get_error_key( $response['messageKey'], 'view_error_create' );
if( !$error_key ) {
print_error( $response['message'], 'bigbluebuttonbn' );
} else {
print_error( $error_key, 'bigbluebuttonbn' );
}
} else if ($response['hasBeenForciblyEnded'] == "true"){
print_error( get_string( 'index_error_forciblyended', 'bigbluebuttonbn' ));
} else { ///////////////Everything is ok /////////////////////
/// Moodle event logger: Create an event for meeting created
if ( $CFG->version < '2014051200' ) {
//This is valid before v2.7
add_to_log($bbbsession['courseid'], 'bigbluebuttonbn', 'meeting created', '', $bigbluebuttonbn->name, $bbbsession['cm']->id);
} else {
//This is valid after v2.7
$event = \mod_bigbluebuttonbn\event\bigbluebuttonbn_meeting_created::create(
array(
'context' => $context,
'objectid' => $bigbluebuttonbn->id
)
);
$event->trigger();
}
/// Internal logger: Instert a record with the meeting created
bigbluebuttonbn_log($bbbsession, 'Create');
if ( groups_get_activity_groupmode($bbbsession['cm']) > 0 && count(groups_get_activity_allowed_groups($bbbsession['cm'])) > 1 ){
print "<br>".get_string('view_groups_selection', 'bigbluebuttonbn' )." <input type='button' onClick='M.mod_bigbluebuttonbn.joinURL()' value='".get_string('view_groups_selection_join', 'bigbluebuttonbn' )."'>";
} else {
$joining = true;
if( $bbbsession['flag']['administrator'] || $bbbsession['flag']['moderator'] )
print "<br />".get_string('view_login_moderator', 'bigbluebuttonbn' )."<br /><br />";
else
print "<br />".get_string('view_login_viewer', 'bigbluebuttonbn' )."<br /><br />";
print "<center><img src='pix/loading.gif' /></center>";
}
/// Moodle event logger: Create an event for meeting joined
if ( $CFG->version < '2014051200' ) {
//This is valid before v2.7
add_to_log($bbbsession['courseid'], 'bigbluebuttonbn', 'meeting joined', '', $bigbluebuttonbn->name, $bbbsession['cm']->id);
} else {
//This is valid after v2.7
$event = \mod_bigbluebuttonbn\event\bigbluebuttonbn_meeting_joined::create(
array(
'context' => $context,
'objectid' => $bigbluebuttonbn->id
)
);
$event->trigger();
}
}
} else {
//
// "Viewer" && Waiting for moderator is required;
//
$joining = true;
print "<div align='center'>";
if( bigbluebuttonbn_wrap_simplexml_load_file(bigbluebuttonbn_getIsMeetingRunningURL( $bbbsession['meetingid'], $bbbsession['url'], $bbbsession['salt'] )) == "true" ) {
/// Since the meeting is already running, we just join the session
print "<br />".get_string('view_login_viewer', 'bigbluebuttonbn' )."<br /><br />";
print "<center><img src='pix/loading.gif' /></center>";
/// Moodle event logger: Create an event for meeting joined
if ( $CFG->version < '2014051200' ) {
//This is valid before v2.7
add_to_log($bbbsession['courseid'], 'bigbluebuttonbn', 'meeting joined', '', $bigbluebuttonbn->name, $bbbsession['cm']->id);
} else {
//This is valid after v2.7
$event = \mod_bigbluebuttonbn\event\bigbluebuttonbn_meeting_joined::create(
array(
'context' => $context,
'objectid' => $bigbluebuttonbn->id
)
);
$event->trigger();
}
} else {
/// Since the meeting is not running, the spining wheel is shown
print "<br />".get_string('view_wait', 'bigbluebuttonbn' )."<br /><br />";
print '<center><img src="pix/polling.gif"></center>';
}
print "</div>";
}
return $joining;
}
function bigbluebuttonbn_view_before( $bbbsession ){
echo '<table>';
if ($bbbsession['timeavailable']) {
echo '<tr><td class="c0">'.get_string('mod_form_field_availabledate','bigbluebuttonbn').':</td>';
echo ' <td class="c1">'.userdate($bbbsession['timeavailable']).'</td></tr>';
}
if ($bbbsession['timedue']) {
echo '<tr><td class="c0">'.get_string('mod_form_field_duedate','bigbluebuttonbn').':</td>';
echo ' <td class="c1">'.userdate($bbbsession['timedue']).'</td></tr>';
}
echo '</table>';
}
function bigbluebuttonbn_view_after( $bbbsession ){
$recordingsArray = bigbluebuttonbn_getRecordingsArray($bbbsession['meetingid'], $bbbsession['url'], $bbbsession['salt']);
if ( !isset($recordingsArray) || array_key_exists('messageKey', $recordingsArray)) { // There are no recordings for this meeting
if ( $bbbsession['flag']['record'] )
print_string('bbbnorecordings', 'bigbluebuttonbn');
} else { // Actually, there are recordings for this meeting
echo ' <center>'."\n";
echo ' <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">'."\n";
echo ' <thead>'."\n";
echo ' </thead>'."\n";
echo ' <tbody>'."\n";
echo ' </tbody>'."\n";
echo ' <tfoot>'."\n";
echo ' </tfoot>'."\n";
echo ' </table>'."\n";
echo ' </center>'."\n";
}
}
function bigbluebutton_is_device_for_mobile_client(){
$detect = new Mobile_Detect;
return $detect->isAndroidOS() || $detect->isiOS();
}
?>