|
@@ -190,7 +190,7 @@ discard block |
|
|
block discarded – undo |
|
190
|
190
|
} |
|
191
|
191
|
if ($xml) { |
|
192
|
192
|
// Either failure or success without meeting info. |
|
193
|
|
- return (array) $xml; |
|
|
193
|
+ return (array)$xml; |
|
194
|
194
|
} |
|
195
|
195
|
// If the server is unreachable, then prompts the user of the necessary action. |
|
196
|
196
|
return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable'); |
|
@@ -279,7 +279,7 @@ discard block |
|
|
block discarded – undo |
|
279
|
279
|
foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) { |
|
280
|
280
|
$url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url( |
|
281
|
281
|
'getRecordings', |
|
282
|
|
- ['recordID' => implode(',', (array) $breakoutroom)] |
|
|
282
|
+ ['recordID' => implode(',', (array)$breakoutroom)] |
|
283
|
283
|
); |
|
284
|
284
|
$xml = bigbluebuttonbn_wrap_xml_load_file($url); |
|
285
|
285
|
if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) { |
|
@@ -335,7 +335,7 @@ discard block |
|
|
block discarded – undo |
|
335
|
335
|
// Override imported flag with actual ID. |
|
336
|
336
|
$recording['imported'] = $recordimported->id; |
|
337
|
337
|
if (isset($recordimported->protected)) { |
|
338
|
|
- $recording['protected'] = (string) $recordimported->protected; |
|
|
338
|
+ $recording['protected'] = (string)$recordimported->protected; |
|
339
|
339
|
} |
|
340
|
340
|
$recordsimportedarray[$recording['recordID']] = $recording; |
|
341
|
341
|
} |
|
@@ -365,21 +365,21 @@ discard block |
|
|
block discarded – undo |
|
365
|
365
|
// Add formats. |
|
366
|
366
|
$playbackarray = array(); |
|
367
|
367
|
foreach ($recording->playback->format as $format) { |
|
368
|
|
- $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
369
|
|
- 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
|
368
|
+ $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
|
369
|
+ 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
370
|
370
|
// Add preview per format when existing. |
|
371
|
371
|
if ($format->preview) { |
|
372
|
|
- $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
|
372
|
+ $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
373
|
373
|
} |
|
374
|
374
|
} |
|
375
|
375
|
// Add the metadata to the recordings array. |
|
376
|
376
|
$metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
|
377
|
|
- $recordingarray = array('recordID' => (string) $recording->recordID, |
|
378
|
|
- 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
379
|
|
- 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
380
|
|
- 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
|
377
|
+ $recordingarray = array('recordID' => (string)$recording->recordID, |
|
|
378
|
+ 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
|
379
|
+ 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
|
380
|
+ 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
381
|
381
|
if (isset($recording->protected)) { |
|
382
|
|
- $recordingarray['protected'] = (string) $recording->protected; |
|
|
382
|
+ $recordingarray['protected'] = (string)$recording->protected; |
|
383
|
383
|
} |
|
384
|
384
|
return $recordingarray + $metadataarray; |
|
385
|
385
|
} |
|
@@ -394,9 +394,9 @@ discard block |
|
|
block discarded – undo |
|
394
|
394
|
function bigbluebuttonbn_get_recording_preview_images($preview) { |
|
395
|
395
|
$imagesarray = array(); |
|
396
|
396
|
foreach ($preview->images->image as $image) { |
|
397
|
|
- $imagearray = array('url' => trim((string) $image)); |
|
|
397
|
+ $imagearray = array('url' => trim((string)$image)); |
|
398
|
398
|
foreach ($image->attributes() as $attkey => $attvalue) { |
|
399
|
|
- $imagearray[$attkey] = (string) $attvalue; |
|
|
399
|
+ $imagearray[$attkey] = (string)$attvalue; |
|
400
|
400
|
} |
|
401
|
401
|
array_push($imagesarray, $imagearray); |
|
402
|
402
|
} |
|
@@ -491,7 +491,7 @@ discard block |
|
|
block discarded – undo |
|
491
|
491
|
$ids = explode(',', $recordids); |
|
492
|
492
|
foreach ($ids as $id) { |
|
493
|
493
|
$xml = bigbluebuttonbn_wrap_xml_load_file( |
|
494
|
|
- \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
|
494
|
+ \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
495
|
495
|
); |
|
496
|
496
|
if ($xml && $xml->returncode != 'SUCCESS') { |
|
497
|
497
|
return false; |
|
@@ -660,7 +660,7 @@ discard block |
|
|
block discarded – undo |
|
660
|
660
|
* @return array $users |
|
661
|
661
|
*/ |
|
662
|
662
|
function bigbluebuttonbn_get_users(context $context = null) { |
|
663
|
|
- $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
|
663
|
+ $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
664
|
664
|
foreach ($users as $key => $value) { |
|
665
|
665
|
$users[$key] = fullname($value); |
|
666
|
666
|
} |
|
@@ -679,7 +679,7 @@ discard block |
|
|
block discarded – undo |
|
679
|
679
|
function bigbluebuttonbn_get_users_select(context $context = null, $bbactivity = null) { |
|
680
|
680
|
// CONTRIB-7972, check the group of current user and course group mode. |
|
681
|
681
|
$groups = null; |
|
682
|
|
- $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
|
682
|
+ $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
683
|
683
|
if ($bbactivity) { |
|
684
|
684
|
list($course, $cm) = get_course_and_cm_from_instance($bbactivity->id, 'bigbluebuttonbn'); |
|
685
|
685
|
$groupmode = groups_get_activity_groupmode($cm); |
|
@@ -688,7 +688,7 @@ discard block |
|
|
block discarded – undo |
|
688
|
688
|
$groups = groups_get_all_groups($course->id, $USER->id); |
|
689
|
689
|
$users = []; |
|
690
|
690
|
foreach ($groups as $g) { |
|
691
|
|
- $users += (array) get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
|
691
|
+ $users += (array)get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
692
|
692
|
} |
|
693
|
693
|
} |
|
694
|
694
|
} |
|
@@ -707,7 +707,7 @@ discard block |
|
|
block discarded – undo |
|
707
|
707
|
* @return array $roles |
|
708
|
708
|
*/ |
|
709
|
709
|
function bigbluebuttonbn_get_roles(context $context = null) { |
|
710
|
|
- $roles = (array) role_get_names($context); |
|
|
710
|
+ $roles = (array)role_get_names($context); |
|
711
|
711
|
foreach ($roles as $key => $value) { |
|
712
|
712
|
$roles[$key] = $value->localname; |
|
713
|
713
|
} |
|
@@ -722,7 +722,7 @@ discard block |
|
|
block discarded – undo |
|
722
|
722
|
* @return array $users |
|
723
|
723
|
*/ |
|
724
|
724
|
function bigbluebuttonbn_get_roles_select(context $context = null) { |
|
725
|
|
- $roles = (array) role_get_names($context); |
|
|
725
|
+ $roles = (array)role_get_names($context); |
|
726
|
726
|
foreach ($roles as $key => $value) { |
|
727
|
727
|
$roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
|
728
|
728
|
} |
|
@@ -737,9 +737,9 @@ discard block |
|
|
block discarded – undo |
|
737
|
737
|
* @return object $role |
|
738
|
738
|
*/ |
|
739
|
739
|
function bigbluebuttonbn_get_role($id) { |
|
740
|
|
- $roles = (array) role_get_names(); |
|
|
740
|
+ $roles = (array)role_get_names(); |
|
741
|
741
|
if (is_numeric($id) && isset($roles[$id])) { |
|
742
|
|
- return (object) $roles[$id]; |
|
|
742
|
+ return (object)$roles[$id]; |
|
743
|
743
|
} |
|
744
|
744
|
foreach ($roles as $role) { |
|
745
|
745
|
if ($role->shortname == $id) { |
|
@@ -819,7 +819,7 @@ discard block |
|
|
block discarded – undo |
|
819
|
819
|
if (!empty($ownerid) && is_enrolled($context, $ownerid)) { |
|
820
|
820
|
$participantlist[] = array( |
|
821
|
821
|
'selectiontype' => 'user', |
|
822
|
|
- 'selectionid' => (string) $ownerid, |
|
|
822
|
+ 'selectionid' => (string)$ownerid, |
|
823
|
823
|
'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
824
|
824
|
} |
|
825
|
825
|
continue; |
|
@@ -1001,7 +1001,7 @@ discard block |
|
|
block discarded – undo |
|
1001
|
1001
|
$now = time(); |
|
1002
|
1002
|
if ($closingtime > 0 && $now < $closingtime) { |
|
1003
|
1003
|
$duration = ceil(($closingtime - $now) / 60); |
|
1004
|
|
- $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
|
1004
|
+ $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
1005
|
1005
|
$duration = intval($duration) + $compensationtime; |
|
1006
|
1006
|
} |
|
1007
|
1007
|
return $duration; |
|
@@ -1203,16 +1203,16 @@ discard block |
|
|
block discarded – undo |
|
1203
|
1203
|
* @return array |
|
1204
|
1204
|
*/ |
|
1205
|
1205
|
function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { |
|
1206
|
|
- $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
|
1206
|
+ $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
1207
|
1207
|
$cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
|
1208
|
1208
|
$result = $cache->get($meetingid); |
|
1209
|
1209
|
$now = time(); |
|
1210
|
1210
|
if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
|
1211
|
1211
|
// Use the value in the cache. |
|
1212
|
|
- return (array) json_decode($result['meeting_info']); |
|
|
1212
|
+ return (array)json_decode($result['meeting_info']); |
|
1213
|
1213
|
} |
|
1214
|
1214
|
// Ping again and refresh the cache. |
|
1215
|
|
- $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
|
1215
|
+ $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
1216
|
1216
|
\mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
|
1217
|
1217
|
); |
|
1218
|
1218
|
$cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
|
@@ -1359,7 +1359,7 @@ discard block |
|
|
block discarded – undo |
|
1359
|
1359
|
*/ |
|
1360
|
1360
|
function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
|
1361
|
1361
|
$configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
|
1362
|
|
- $configxmlarray = (array) $configxml; |
|
|
1362
|
+ $configxmlarray = (array)$configxml; |
|
1363
|
1363
|
if ($configxmlarray['returncode'] != 'SUCCESS') { |
|
1364
|
1364
|
debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
|
1365
|
1365
|
return ''; |
|
@@ -1414,7 +1414,7 @@ discard block |
|
|
block discarded – undo |
|
1414
|
1414
|
* @return boolean |
|
1415
|
1415
|
*/ |
|
1416
|
1416
|
function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { |
|
1417
|
|
- return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
|
1417
|
+ return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
1418
|
1418
|
} |
|
1419
|
1419
|
|
|
1420
|
1420
|
/** |
|
@@ -1425,7 +1425,7 @@ discard block |
|
|
block discarded – undo |
|
1425
|
1425
|
* @return boolean |
|
1426
|
1426
|
*/ |
|
1427
|
1427
|
function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { |
|
1428
|
|
- return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
|
1428
|
+ return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
1429
|
1429
|
} |
|
1430
|
1430
|
|
|
1431
|
1431
|
/** |
|
@@ -1849,7 +1849,7 @@ discard block |
|
|
block discarded – undo |
|
1849
|
1849
|
} |
|
1850
|
1850
|
$id = 'recording-' . $target . '-' . $recording['recordID']; |
|
1851
|
1851
|
$onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this);'; |
|
1852
|
|
- if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
|
1852
|
+ if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
1853
|
1853
|
// With icon for $manageaction. |
|
1854
|
1854
|
$iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
|
1855
|
1855
|
$linkattributes = array( |
|
@@ -2133,7 +2133,7 @@ discard block |
|
|
block discarded – undo |
|
2133
|
2133
|
// Enqueue it. |
|
2134
|
2134
|
\core\task\manager::queue_adhoc_task($task); |
|
2135
|
2135
|
} catch (Exception $e) { |
|
2136
|
|
- mtrace("Error while enqueuing completion_update_state task. " . (string) $e); |
|
|
2136
|
+ mtrace("Error while enqueuing completion_update_state task. " . (string)$e); |
|
2137
|
2137
|
} |
|
2138
|
2138
|
} |
|
2139
|
2139
|
|
|
@@ -2670,7 +2670,7 @@ discard block |
|
|
block discarded – undo |
|
2670
|
2670
|
*/ |
|
2671
|
2671
|
function bigbluebuttonbn_settings_general(&$renderer) { |
|
2672
|
2672
|
// Configuration for BigBlueButton. |
|
2673
|
|
- if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
|
2673
|
+ if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
2674
|
2674
|
$renderer->render_group_header('general'); |
|
2675
|
2675
|
$renderer->render_group_element( |
|
2676
|
2676
|
'server_url', |
|
@@ -2692,7 +2692,7 @@ discard block |
|
|
block discarded – undo |
|
2692
|
2692
|
*/ |
|
2693
|
2693
|
function bigbluebuttonbn_settings_record(&$renderer) { |
|
2694
|
2694
|
// Configuration for 'recording' feature. |
|
2695
|
|
- if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
|
2695
|
+ if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
2696
|
2696
|
$renderer->render_group_header('recording'); |
|
2697
|
2697
|
$renderer->render_group_element( |
|
2698
|
2698
|
'recording_default', |
|
@@ -2736,7 +2736,7 @@ discard block |
|
|
block discarded – undo |
|
2736
|
2736
|
*/ |
|
2737
|
2737
|
function bigbluebuttonbn_settings_importrecordings(&$renderer) { |
|
2738
|
2738
|
// Configuration for 'import recordings' feature. |
|
2739
|
|
- if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
|
2739
|
+ if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
2740
|
2740
|
$renderer->render_group_header('importrecordings'); |
|
2741
|
2741
|
$renderer->render_group_element( |
|
2742
|
2742
|
'importrecordings_enabled', |
|
@@ -2758,7 +2758,7 @@ discard block |
|
|
block discarded – undo |
|
2758
|
2758
|
*/ |
|
2759
|
2759
|
function bigbluebuttonbn_settings_showrecordings(&$renderer) { |
|
2760
|
2760
|
// Configuration for 'show recordings' feature. |
|
2761
|
|
- if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
|
2761
|
+ if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
2762
|
2762
|
$renderer->render_group_header('recordings'); |
|
2763
|
2763
|
$renderer->render_group_element( |
|
2764
|
2764
|
'recordings_html_default', |
|
@@ -2808,7 +2808,7 @@ discard block |
|
|
block discarded – undo |
|
2808
|
2808
|
*/ |
|
2809
|
2809
|
function bigbluebuttonbn_settings_waitmoderator(&$renderer) { |
|
2810
|
2810
|
// Configuration for wait for moderator feature. |
|
2811
|
|
- if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
|
2811
|
+ if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
2812
|
2812
|
$renderer->render_group_header('waitformoderator'); |
|
2813
|
2813
|
$renderer->render_group_element( |
|
2814
|
2814
|
'waitformoderator_default', |
|
@@ -2838,7 +2838,7 @@ discard block |
|
|
block discarded – undo |
|
2838
|
2838
|
*/ |
|
2839
|
2839
|
function bigbluebuttonbn_settings_voicebridge(&$renderer) { |
|
2840
|
2840
|
// Configuration for "static voice bridge" feature. |
|
2841
|
|
- if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
|
2841
|
+ if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
2842
|
2842
|
$renderer->render_group_header('voicebridge'); |
|
2843
|
2843
|
$renderer->render_group_element( |
|
2844
|
2844
|
'voicebridge_editable', |
|
@@ -2856,7 +2856,7 @@ discard block |
|
|
block discarded – undo |
|
2856
|
2856
|
*/ |
|
2857
|
2857
|
function bigbluebuttonbn_settings_preupload(&$renderer) { |
|
2858
|
2858
|
// Configuration for "preupload presentation" feature. |
|
2859
|
|
- if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
|
2859
|
+ if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2860
|
2860
|
// This feature only works if curl is installed. |
|
2861
|
2861
|
$preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); |
|
2862
|
2862
|
if (!extension_loaded('curl')) { |
|
@@ -2884,7 +2884,7 @@ discard block |
|
|
block discarded – undo |
|
2884
|
2884
|
*/ |
|
2885
|
2885
|
function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { |
|
2886
|
2886
|
// Configuration for "preupload presentation" feature. |
|
2887
|
|
- if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
|
2887
|
+ if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2888
|
2888
|
if (extension_loaded('curl')) { |
|
2889
|
2889
|
// This feature only works if curl is installed. |
|
2890
|
2890
|
$renderer->render_filemanager_default_file_presentation("presentation_default"); |
|
@@ -2901,7 +2901,7 @@ discard block |
|
|
block discarded – undo |
|
2901
|
2901
|
*/ |
|
2902
|
2902
|
function bigbluebuttonbn_settings_userlimit(&$renderer) { |
|
2903
|
2903
|
// Configuration for "user limit" feature. |
|
2904
|
|
- if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
|
2904
|
+ if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
2905
|
2905
|
$renderer->render_group_header('userlimit'); |
|
2906
|
2906
|
$renderer->render_group_element( |
|
2907
|
2907
|
'userlimit_default', |
|
@@ -2923,7 +2923,7 @@ discard block |
|
|
block discarded – undo |
|
2923
|
2923
|
*/ |
|
2924
|
2924
|
function bigbluebuttonbn_settings_duration(&$renderer) { |
|
2925
|
2925
|
// Configuration for "scheduled duration" feature. |
|
2926
|
|
- if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
|
2926
|
+ if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
2927
|
2927
|
$renderer->render_group_header('scheduled'); |
|
2928
|
2928
|
$renderer->render_group_element( |
|
2929
|
2929
|
'scheduled_duration_enabled', |
|
@@ -2949,7 +2949,7 @@ discard block |
|
|
block discarded – undo |
|
2949
|
2949
|
*/ |
|
2950
|
2950
|
function bigbluebuttonbn_settings_participants(&$renderer) { |
|
2951
|
2951
|
// Configuration for defining the default role/user that will be moderator on new activities. |
|
2952
|
|
- if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
|
2952
|
+ if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
2953
|
2953
|
$renderer->render_group_header('participant'); |
|
2954
|
2954
|
// UI for 'participants' feature. |
|
2955
|
2955
|
$roles = bigbluebuttonbn_get_roles(); |
|
@@ -2974,7 +2974,7 @@ discard block |
|
|
block discarded – undo |
|
2974
|
2974
|
*/ |
|
2975
|
2975
|
function bigbluebuttonbn_settings_notifications(&$renderer) { |
|
2976
|
2976
|
// Configuration for "send notifications" feature. |
|
2977
|
|
- if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
|
2977
|
+ if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
2978
|
2978
|
$renderer->render_group_header('sendnotifications'); |
|
2979
|
2979
|
$renderer->render_group_element( |
|
2980
|
2980
|
'sendnotifications_enabled', |
|
@@ -2992,14 +2992,14 @@ discard block |
|
|
block discarded – undo |
|
2992
|
2992
|
*/ |
|
2993
|
2993
|
function bigbluebuttonbn_settings_clienttype(&$renderer) { |
|
2994
|
2994
|
// Configuration for "clienttype" feature. |
|
2995
|
|
- if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
|
2995
|
+ if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
2996
|
2996
|
$renderer->render_group_header('clienttype'); |
|
2997
|
2997
|
$renderer->render_group_element( |
|
2998
|
2998
|
'clienttype_editable', |
|
2999
|
2999
|
$renderer->render_group_element_checkbox('clienttype_editable', 0) |
|
3000
|
3000
|
); |
|
3001
|
3001
|
// Web Client default. |
|
3002
|
|
- $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
|
3002
|
+ $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
3003
|
3003
|
$choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
|
3004
|
3004
|
BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
3005
|
3005
|
$renderer->render_group_element( |
|
@@ -3022,7 +3022,7 @@ discard block |
|
|
block discarded – undo |
|
3022
|
3022
|
*/ |
|
3023
|
3023
|
function bigbluebuttonbn_settings_muteonstart(&$renderer) { |
|
3024
|
3024
|
// Configuration for BigBlueButton. |
|
3025
|
|
- if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
|
3025
|
+ if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
3026
|
3026
|
$renderer->render_group_header('muteonstart'); |
|
3027
|
3027
|
$renderer->render_group_element( |
|
3028
|
3028
|
'muteonstart_default', |
|
@@ -3044,7 +3044,7 @@ discard block |
|
|
block discarded – undo |
|
3044
|
3044
|
*/ |
|
3045
|
3045
|
function bigbluebuttonbn_settings_extended(&$renderer) { |
|
3046
|
3046
|
// Configuration for 'notify users when recording ready' feature. |
|
3047
|
|
- if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
|
3047
|
+ if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
3048
|
3048
|
return; |
|
3049
|
3049
|
} |
|
3050
|
3050
|
$renderer->render_group_header('extended_capabilities'); |
|
@@ -3072,7 +3072,7 @@ discard block |
|
|
block discarded – undo |
|
3072
|
3072
|
global $DB; |
|
3073
|
3073
|
do { |
|
3074
|
3074
|
$encodedseed = sha1(bigbluebuttonbn_random_password(12)); |
|
3075
|
|
- $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
|
3075
|
+ $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
3076
|
3076
|
} while ($meetingid == $encodedseed); |
|
3077
|
3077
|
return $encodedseed; |
|
3078
|
3078
|
} |
|
@@ -3285,7 +3285,7 @@ discard block |
|
|
block discarded – undo |
|
3285
|
3285
|
function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { |
|
3286
|
3286
|
global $DB; |
|
3287
|
3287
|
$filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); |
|
3288
|
|
- $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
|
3288
|
+ $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
3289
|
3289
|
return $ownerid; |
|
3290
|
3290
|
} |
|
3291
|
3291
|
|
|
@@ -3328,8 +3328,8 @@ discard block |
|
|
block discarded – undo |
|
3328
|
3328
|
$bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
|
3329
|
3329
|
$bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
|
3330
|
3330
|
// Extra data for setting up the Meeting. |
|
3331
|
|
- $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
3332
|
|
- if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
|
3331
|
+ $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
|
3332
|
+ if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
3333
|
3333
|
$bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit); |
|
3334
|
3334
|
} |
|
3335
|
3335
|
$bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge; |
|
@@ -3479,7 +3479,7 @@ discard block |
|
|
block discarded – undo |
|
3479
|
3479
|
'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
|
3480
|
3480
|
]; |
|
3481
|
3481
|
// Special metadata for recording processing. |
|
3482
|
|
- if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
|
3482
|
+ if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
3483
|
3483
|
$metadata["bn-recording-status"] = json_encode( |
|
3484
|
3484
|
array( |
|
3485
|
3485
|
'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
|
@@ -3487,10 +3487,10 @@ discard block |
|
|
block discarded – undo |
|
3487
|
3487
|
) |
|
3488
|
3488
|
); |
|
3489
|
3489
|
} |
|
3490
|
|
- if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
|
3490
|
+ if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
3491
|
3491
|
$metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
|
3492
|
3492
|
} |
|
3493
|
|
- if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
|
3493
|
+ if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
3494
|
3494
|
$metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL']; |
|
3495
|
3495
|
} |
|
3496
|
3496
|
return $metadata; |