Completed
Push — v2.3-stable ( 59783c...c4848d )
by Jesus
02:56
created
locallib.php 1 patch
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
 function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null,
104 104
         $userid = null, $clienttype = BIGBLUEBUTTON_CLIENTTYPE_FLASH) {
105 105
     $data = ['meetingID' => $meetingid,
106
-              'fullName' => $username,
107
-              'password' => $pw,
108
-              'logoutURL' => $logouturl,
106
+                'fullName' => $username,
107
+                'password' => $pw,
108
+                'logoutURL' => $logouturl,
109 109
             ];
110 110
     // Choose between Adobe Flash or HTML5 Client.
111 111
     if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) {
@@ -161,23 +161,23 @@  discard block
 block discarded – undo
161 161
 function bigbluebuttonbn_get_meeting_info_array($meetingid) {
162 162
     $xml = bigbluebuttonbn_wrap_xml_load_file(
163 163
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
164
-      );
164
+        );
165 165
     if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) {
166 166
         // Meeting info was returned.
167 167
         return array('returncode' => $xml->returncode,
168
-                     'meetingID' => $xml->meetingID,
169
-                     'moderatorPW' => $xml->moderatorPW,
170
-                     'attendeePW' => $xml->attendeePW,
171
-                     'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
172
-                     'running' => $xml->running,
173
-                     'recording' => $xml->recording,
174
-                     'startTime' => $xml->startTime,
175
-                     'endTime' => $xml->endTime,
176
-                     'participantCount' => $xml->participantCount,
177
-                     'moderatorCount' => $xml->moderatorCount,
178
-                     'attendees' => $xml->attendees,
179
-                     'metadata' => $xml->metadata,
180
-                   );
168
+                        'meetingID' => $xml->meetingID,
169
+                        'moderatorPW' => $xml->moderatorPW,
170
+                        'attendeePW' => $xml->attendeePW,
171
+                        'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
172
+                        'running' => $xml->running,
173
+                        'recording' => $xml->recording,
174
+                        'startTime' => $xml->startTime,
175
+                        'endTime' => $xml->endTime,
176
+                        'participantCount' => $xml->participantCount,
177
+                        'moderatorCount' => $xml->moderatorCount,
178
+                        'attendees' => $xml->attendees,
179
+                        'metadata' => $xml->metadata,
180
+                    );
181 181
     }
182 182
     if ($xml) {
183 183
         // Either failure or success without meeting info.
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 function bigbluebuttonbn_get_default_config_xml() {
330 330
     $xml = bigbluebuttonbn_wrap_xml_load_file(
331 331
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML')
332
-      );
332
+        );
333 333
     return $xml;
334 334
 }
335 335
 
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
     foreach ($ids as $id) {
434 434
         $xml = bigbluebuttonbn_wrap_xml_load_file(
435 435
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id])
436
-          );
436
+            );
437 437
         if ($xml && $xml->returncode != 'SUCCESS') {
438 438
             return false;
439 439
         }
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
     foreach ($ids as $id) {
453 453
         $xml = bigbluebuttonbn_wrap_xml_load_file(
454 454
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish])
455
-          );
455
+            );
456 456
         if ($xml && $xml->returncode != 'SUCCESS') {
457 457
             return false;
458 458
         }
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
     foreach ($ids as $id) {
472 472
         $xml = bigbluebuttonbn_wrap_xml_load_file(
473 473
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
474
-          );
474
+            );
475 475
         if ($xml && $xml->returncode != 'SUCCESS') {
476 476
             return false;
477 477
         }
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
 function bigbluebuttonbn_end_meeting($meetingid, $modpw) {
489 489
     $xml = bigbluebuttonbn_wrap_xml_load_file(
490 490
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw])
491
-      );
491
+        );
492 492
     if ($xml) {
493 493
         // If the xml packet returned failure it displays the message to the user.
494 494
         return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
 function bigbluebuttonbn_get_server_version() {
506 506
     $xml = bigbluebuttonbn_wrap_xml_load_file(
507 507
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url()
508
-      );
508
+        );
509 509
     if ($xml && $xml->returncode == 'SUCCESS') {
510 510
         return $xml->version;
511 511
     }
@@ -572,10 +572,10 @@  discard block
 block discarded – undo
572 572
         }
573 573
         $options = array();
574 574
         $options['CURLOPT_HTTPHEADER'] = array(
575
-                 'Content-Type: '.$contenttype,
576
-                 'Content-Length: '.strlen($data),
577
-                 'Content-Language: en-US',
578
-               );
575
+                    'Content-Type: '.$contenttype,
576
+                    'Content-Length: '.strlen($data),
577
+                    'Content-Language: en-US',
578
+                );
579 579
 
580 580
         return $c->post($url, $data, $options);
581 581
     }
@@ -739,12 +739,12 @@  discard block
 block discarded – undo
739 739
         'all' => array(
740 740
             'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
741 741
             'children' => []
742
-          )
743
-      );
742
+            )
743
+        );
744 744
     $data['role'] = array(
745 745
         'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
746 746
         'children' => bigbluebuttonbn_get_roles_select($context)
747
-      );
747
+        );
748 748
     $data['user'] = array(
749 749
         'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
750 750
         'children' => bigbluebuttonbn_get_users_select($context, $bbactivity),
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
         'selectiontype' => 'all',
792 792
         'selectionid' => 'all',
793 793
         'role' => BIGBLUEBUTTONBN_ROLE_VIEWER
794
-      );
794
+        );
795 795
     $defaultrules = explode(',', \mod_bigbluebuttonbn\locallib\config::get('participant_moderator_default'));
796 796
     foreach ($defaultrules as $defaultrule) {
797 797
         if ($defaultrule == '0') {
@@ -804,9 +804,9 @@  discard block
 block discarded – undo
804 804
             continue;
805 805
         }
806 806
         $participantlist[] = array(
807
-              'selectiontype' => 'role',
808
-              'selectionid' => $defaultrule,
809
-              'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
807
+                'selectiontype' => 'role',
808
+                'selectionid' => $defaultrule,
809
+                'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
810 810
     }
811 811
     return $participantlist;
812 812
 }
@@ -845,11 +845,11 @@  discard block
 block discarded – undo
845 845
             'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
846 846
             'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
847 847
             'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
848
-          ],
848
+            ],
849 849
         'type_selected' => 'all',
850 850
         'options' => ['all' => '---------------'],
851 851
         'selected' => 'all',
852
-      ];
852
+        ];
853 853
 }
854 854
 
855 855
 /**
@@ -1168,7 +1168,7 @@  discard block
 block discarded – undo
1168 1168
     // Ping again and refresh the cache.
1169 1169
     $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1170 1170
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
1171
-      );
1171
+        );
1172 1172
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
1173 1173
     return $meetinginfo;
1174 1174
 }
@@ -1582,8 +1582,8 @@  discard block
 block discarded – undo
1582 1582
     }
1583 1583
     $id = 'playbacks-'.$recording['recordID'];
1584 1584
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1585
-          'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1586
-          'title' => $title, $visibility => $visibility));
1585
+            'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1586
+            'title' => $title, $visibility => $visibility));
1587 1587
     foreach ($recording['playbacks'] as $playback) {
1588 1588
         $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback);
1589 1589
     }
@@ -1618,7 +1618,7 @@  discard block
 block discarded – undo
1618 1618
         'data-action' => 'play',
1619 1619
         'data-target' => $playback['type'],
1620 1620
         'data-href' => $href,
1621
-      );
1621
+        );
1622 1622
     if (!bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) {
1623 1623
         $linkattributes['class'] = 'btn btn-sm btn-warning';
1624 1624
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
@@ -1800,10 +1800,10 @@  discard block
 block discarded – undo
1800 1800
             'id' => $id,
1801 1801
             'onclick' => $onclick,
1802 1802
             'data-action' => $data['action']
1803
-          );
1803
+            );
1804 1804
         if (!isset($recording['imported'])) {
1805 1805
             $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances(
1806
-              $recording['recordID']);
1806
+                $recording['recordID']);
1807 1807
         }
1808 1808
         if (isset($data['disabled'])) {
1809 1809
             $iconattributes['class'] .= ' fa-' . $data['disabled'];
@@ -2326,17 +2326,17 @@  discard block
 block discarded – undo
2326 2326
 function bigbluebuttonbn_get_instance_type_profiles() {
2327 2327
     $instanceprofiles = array(
2328 2328
         BIGBLUEBUTTONBN_TYPE_ALL => array('id' => BIGBLUEBUTTONBN_TYPE_ALL,
2329
-                  'name' => get_string('instance_type_default', 'bigbluebuttonbn'),
2330
-                  'features' => array('all')),
2329
+                    'name' => get_string('instance_type_default', 'bigbluebuttonbn'),
2330
+                    'features' => array('all')),
2331 2331
         BIGBLUEBUTTONBN_TYPE_ROOM_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_ROOM_ONLY,
2332
-                  'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'),
2333
-                  'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit',
2334
-                      'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups',
2335
-                      'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection',
2336
-                      'clienttype', 'availabilityconditionsheader')),
2332
+                    'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'),
2333
+                    'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit',
2334
+                        'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups',
2335
+                        'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection',
2336
+                        'clienttype', 'availabilityconditionsheader')),
2337 2337
         BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY,
2338
-                  'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'),
2339
-                  'features' => array('showrecordings', 'importrecordings', 'availabilityconditionsheader'))
2338
+                    'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'),
2339
+                    'features' => array('showrecordings', 'importrecordings', 'availabilityconditionsheader'))
2340 2340
     );
2341 2341
     return $instanceprofiles;
2342 2342
 }
@@ -2423,8 +2423,8 @@  discard block
 block discarded – undo
2423 2423
     $activitytime = '';
2424 2424
     if ($time) {
2425 2425
         $activitytime = calendar_day_representation($time).' '.
2426
-          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2427
-          calendar_time_representation($time);
2426
+            get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2427
+            calendar_time_representation($time);
2428 2428
     }
2429 2429
     return $activitytime;
2430 2430
 }
@@ -2743,7 +2743,7 @@  discard block
 block discarded – undo
2743 2743
         $renderer->render_group_element('participant_moderator_default',
2744 2744
             $renderer->render_group_element_configmultiselect('participant_moderator_default',
2745 2745
                 array_keys($owner), array_merge($owner, $roles))
2746
-          );
2746
+            );
2747 2747
     }
2748 2748
 }
2749 2749
 
@@ -2779,7 +2779,7 @@  discard block
 block discarded – undo
2779 2779
         // Web Client default.
2780 2780
         $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2781 2781
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
2782
-                         BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2782
+                            BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2783 2783
         $renderer->render_group_element('clienttype_default',
2784 2784
             $renderer->render_group_element_configselect('clienttype_default',
2785 2785
                 $default, $choices));
@@ -2890,7 +2890,7 @@  discard block
 block discarded – undo
2890 2890
         return $output;
2891 2891
     }
2892 2892
     $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
2893
-      'bigbluebuttonbn_view_general_warning') . "\n";
2893
+        'bigbluebuttonbn_view_general_warning') . "\n";
2894 2894
     $output .= '    ' . $message . "\n";
2895 2895
     $output .= '  <div class="singlebutton pull-right">' . "\n";
2896 2896
     if (!empty($href)) {
Please login to merge, or discard this patch.