Completed
Pull Request — master (#87)
by
unknown
06:05 queued 03:57
created
locallib.php 1 patch
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
 function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null,
96 96
         $userid = null, $clienttype = BIGBLUEBUTTON_CLIENTTYPE_FLASH) {
97 97
     $data = ['meetingID' => $meetingid,
98
-              'fullName' => $username,
99
-              'password' => $pw,
100
-              'logoutURL' => $logouturl,
98
+                'fullName' => $username,
99
+                'password' => $pw,
100
+                'logoutURL' => $logouturl,
101 101
             ];
102 102
     // Choose between Adobe Flash or HTML5 Client.
103 103
     if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) {
@@ -153,23 +153,23 @@  discard block
 block discarded – undo
153 153
 function bigbluebuttonbn_get_meeting_info_array($meetingid) {
154 154
     $xml = bigbluebuttonbn_wrap_xml_load_file(
155 155
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
156
-      );
156
+        );
157 157
     if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) {
158 158
         // Meeting info was returned.
159 159
         return array('returncode' => $xml->returncode,
160
-                     'meetingID' => $xml->meetingID,
161
-                     'moderatorPW' => $xml->moderatorPW,
162
-                     'attendeePW' => $xml->attendeePW,
163
-                     'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
164
-                     'running' => $xml->running,
165
-                     'recording' => $xml->recording,
166
-                     'startTime' => $xml->startTime,
167
-                     'endTime' => $xml->endTime,
168
-                     'participantCount' => $xml->participantCount,
169
-                     'moderatorCount' => $xml->moderatorCount,
170
-                     'attendees' => $xml->attendees,
171
-                     'metadata' => $xml->metadata,
172
-                   );
160
+                        'meetingID' => $xml->meetingID,
161
+                        'moderatorPW' => $xml->moderatorPW,
162
+                        'attendeePW' => $xml->attendeePW,
163
+                        'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
164
+                        'running' => $xml->running,
165
+                        'recording' => $xml->recording,
166
+                        'startTime' => $xml->startTime,
167
+                        'endTime' => $xml->endTime,
168
+                        'participantCount' => $xml->participantCount,
169
+                        'moderatorCount' => $xml->moderatorCount,
170
+                        'attendees' => $xml->attendees,
171
+                        'metadata' => $xml->metadata,
172
+                    );
173 173
     }
174 174
     if ($xml) {
175 175
         // Either failure or success without meeting info.
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 function bigbluebuttonbn_get_default_config_xml() {
306 306
     $xml = bigbluebuttonbn_wrap_xml_load_file(
307 307
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML')
308
-      );
308
+        );
309 309
     return $xml;
310 310
 }
311 311
 
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
     foreach ($ids as $id) {
407 407
         $xml = bigbluebuttonbn_wrap_xml_load_file(
408 408
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id])
409
-          );
409
+            );
410 410
         if ($xml && $xml->returncode != 'SUCCESS') {
411 411
             return false;
412 412
         }
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
     foreach ($ids as $id) {
426 426
         $xml = bigbluebuttonbn_wrap_xml_load_file(
427 427
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish])
428
-          );
428
+            );
429 429
         if ($xml && $xml->returncode != 'SUCCESS') {
430 430
             return false;
431 431
         }
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
     foreach ($ids as $id) {
445 445
         $xml = bigbluebuttonbn_wrap_xml_load_file(
446 446
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
447
-          );
447
+            );
448 448
         if ($xml && $xml->returncode != 'SUCCESS') {
449 449
             return false;
450 450
         }
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
 function bigbluebuttonbn_end_meeting($meetingid, $modpw) {
462 462
     $xml = bigbluebuttonbn_wrap_xml_load_file(
463 463
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw])
464
-      );
464
+        );
465 465
     if ($xml) {
466 466
         // If the xml packet returned failure it displays the message to the user.
467 467
         return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
 function bigbluebuttonbn_get_server_version() {
479 479
     $xml = bigbluebuttonbn_wrap_xml_load_file(
480 480
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url()
481
-      );
481
+        );
482 482
     if ($xml && $xml->returncode == 'SUCCESS') {
483 483
         return $xml->version;
484 484
     }
@@ -545,10 +545,10 @@  discard block
 block discarded – undo
545 545
         }
546 546
         $options = array();
547 547
         $options['CURLOPT_HTTPHEADER'] = array(
548
-                 'Content-Type: '.$contenttype,
549
-                 'Content-Length: '.strlen($data),
550
-                 'Content-Language: en-US',
551
-               );
548
+                    'Content-Type: '.$contenttype,
549
+                    'Content-Length: '.strlen($data),
550
+                    'Content-Language: en-US',
551
+                );
552 552
 
553 553
         return $c->post($url, $data, $options);
554 554
     }
@@ -695,16 +695,16 @@  discard block
 block discarded – undo
695 695
         'all' => array(
696 696
             'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
697 697
             'children' => []
698
-          )
699
-      );
698
+            )
699
+        );
700 700
     $data['role'] = array(
701 701
         'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
702 702
         'children' => bigbluebuttonbn_get_roles_select($context)
703
-      );
703
+        );
704 704
     $data['user'] = array(
705 705
         'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
706 706
         'children' => bigbluebuttonbn_get_users_select($context)
707
-      );
707
+        );
708 708
     return $data;
709 709
 }
710 710
 
@@ -747,7 +747,7 @@  discard block
 block discarded – undo
747 747
         'selectiontype' => 'all',
748 748
         'selectionid' => 'all',
749 749
         'role' => BIGBLUEBUTTONBN_ROLE_VIEWER
750
-      );
750
+        );
751 751
     $defaultrules = explode(',', \mod_bigbluebuttonbn\locallib\config::get('participant_moderator_default'));
752 752
     foreach ($defaultrules as $defaultrule) {
753 753
         if ($defaultrule == '0') {
@@ -760,9 +760,9 @@  discard block
 block discarded – undo
760 760
             continue;
761 761
         }
762 762
         $participantlist[] = array(
763
-              'selectiontype' => 'role',
764
-              'selectionid' => $defaultrule,
765
-              'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
763
+                'selectiontype' => 'role',
764
+                'selectionid' => $defaultrule,
765
+                'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
766 766
     }
767 767
     return $participantlist;
768 768
 }
@@ -801,11 +801,11 @@  discard block
 block discarded – undo
801 801
             'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
802 802
             'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
803 803
             'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
804
-          ],
804
+            ],
805 805
         'type_selected' => 'all',
806 806
         'options' => ['all' => '---------------'],
807 807
         'selected' => 'all',
808
-      ];
808
+        ];
809 809
 }
810 810
 
811 811
 /**
@@ -1080,7 +1080,7 @@  discard block
 block discarded – undo
1080 1080
     // Ping again and refresh the cache.
1081 1081
     $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1082 1082
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
1083
-      );
1083
+        );
1084 1084
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
1085 1085
     return $meetinginfo;
1086 1086
 }
@@ -1492,8 +1492,8 @@  discard block
 block discarded – undo
1492 1492
     }
1493 1493
     $id = 'playbacks-'.$recording['recordID'];
1494 1494
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1495
-          'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1496
-          'title' => $title, $visibility => $visibility));
1495
+            'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1496
+            'title' => $title, $visibility => $visibility));
1497 1497
     foreach ($recording['playbacks'] as $playback) {
1498 1498
         $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback);
1499 1499
     }
@@ -1517,7 +1517,7 @@  discard block
 block discarded – undo
1517 1517
     }
1518 1518
     $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn');
1519 1519
     $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id .
1520
-      '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1520
+        '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1521 1521
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1522 1522
         $href .= '&href='.urlencode(trim($playback['url']));
1523 1523
     }
@@ -1528,7 +1528,7 @@  discard block
 block discarded – undo
1528 1528
         'data-action' => 'play',
1529 1529
         'data-target' => $playback['type'],
1530 1530
         'data-href' => $href,
1531
-      );
1531
+        );
1532 1532
     if (!bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) {
1533 1533
         $linkattributes['class'] = 'btn btn-sm btn-warning';
1534 1534
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
@@ -1678,10 +1678,10 @@  discard block
 block discarded – undo
1678 1678
             'id' => $id,
1679 1679
             'onclick' => $onclick,
1680 1680
             'data-action' => $data['action']
1681
-          );
1681
+            );
1682 1682
         if (!isset($recording['imported'])) {
1683 1683
             $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances(
1684
-              $recording['recordID']);
1684
+                $recording['recordID']);
1685 1685
         }
1686 1686
         if (isset($data['disabled'])) {
1687 1687
             $iconattributes['class'] .= ' fa-' . $data['disabled'];
@@ -2167,17 +2167,17 @@  discard block
 block discarded – undo
2167 2167
 function bigbluebuttonbn_get_instance_type_profiles() {
2168 2168
     $instanceprofiles = array(
2169 2169
         BIGBLUEBUTTONBN_TYPE_ALL => array('id' => BIGBLUEBUTTONBN_TYPE_ALL,
2170
-                  'name' => get_string('instance_type_default', 'bigbluebuttonbn'),
2171
-                  'features' => array('all')),
2170
+                    'name' => get_string('instance_type_default', 'bigbluebuttonbn'),
2171
+                    'features' => array('all')),
2172 2172
         BIGBLUEBUTTONBN_TYPE_ROOM_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_ROOM_ONLY,
2173
-                  'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'),
2174
-                  'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit',
2175
-                      'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups',
2176
-                      'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection',
2177
-                      'clienttype')),
2173
+                    'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'),
2174
+                    'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit',
2175
+                        'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups',
2176
+                        'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection',
2177
+                        'clienttype')),
2178 2178
         BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY,
2179
-                  'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'),
2180
-                  'features' => array('showrecordings', 'importrecordings'))
2179
+                    'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'),
2180
+                    'features' => array('showrecordings', 'importrecordings'))
2181 2181
     );
2182 2182
     return $instanceprofiles;
2183 2183
 }
@@ -2244,8 +2244,8 @@  discard block
 block discarded – undo
2244 2244
     $activitytime = '';
2245 2245
     if ($time) {
2246 2246
         $activitytime = calendar_day_representation($time).' '.
2247
-          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2248
-          calendar_time_representation($time);
2247
+            get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2248
+            calendar_time_representation($time);
2249 2249
     }
2250 2250
     return $activitytime;
2251 2251
 }
@@ -2545,7 +2545,7 @@  discard block
 block discarded – undo
2545 2545
         $renderer->render_group_element('participant_moderator_default',
2546 2546
             $renderer->render_group_element_configmultiselect('participant_moderator_default',
2547 2547
                 array_keys($owner), array_merge($owner, $roles))
2548
-          );
2548
+            );
2549 2549
     }
2550 2550
 }
2551 2551
 
@@ -2581,7 +2581,7 @@  discard block
 block discarded – undo
2581 2581
         // Web Client default.
2582 2582
         $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2583 2583
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
2584
-                         BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2584
+                            BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2585 2585
         $renderer->render_group_element('clienttype_default',
2586 2586
             $renderer->render_group_element_configselect('clienttype_default',
2587 2587
                 $default, $choices));
@@ -2674,7 +2674,7 @@  discard block
 block discarded – undo
2674 2674
         return $output;
2675 2675
     }
2676 2676
     $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
2677
-      'bigbluebuttonbn_view_general_warning') . "\n";
2677
+        'bigbluebuttonbn_view_general_warning') . "\n";
2678 2678
     $output .= '    ' . $message . "\n";
2679 2679
     $output .= '  <div class="singlebutton pull-right">' . "\n";
2680 2680
     if (!empty($href)) {
Please login to merge, or discard this patch.