Completed
Push — master ( b8c79f...3470f8 )
by Jesus
01:52
created
locallib.php 1 patch
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
  */
99 99
 function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null) {
100 100
     $data = ['meetingID' => $meetingid,
101
-              'fullName' => $username,
102
-              'password' => $pw,
103
-              'logoutURL' => $logouturl,
101
+                'fullName' => $username,
102
+                'password' => $pw,
103
+                'logoutURL' => $logouturl,
104 104
             ];
105 105
 
106 106
     if (!is_null($configtoken)) {
@@ -193,24 +193,24 @@  discard block
 block discarded – undo
193 193
 function bigbluebuttonbn_get_meeting_info_array($meetingid) {
194 194
     $xml = bigbluebuttonbn_wrap_xml_load_file(
195 195
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
196
-      );
196
+        );
197 197
 
198 198
     if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) {
199 199
         // Meeting info was returned.
200 200
         return array('returncode' => $xml->returncode,
201
-                     'meetingID' => $xml->meetingID,
202
-                     'moderatorPW' => $xml->moderatorPW,
203
-                     'attendeePW' => $xml->attendeePW,
204
-                     'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
205
-                     'running' => $xml->running,
206
-                     'recording' => $xml->recording,
207
-                     'startTime' => $xml->startTime,
208
-                     'endTime' => $xml->endTime,
209
-                     'participantCount' => $xml->participantCount,
210
-                     'moderatorCount' => $xml->moderatorCount,
211
-                     'attendees' => $xml->attendees,
212
-                     'metadata' => $xml->metadata,
213
-                   );
201
+                        'meetingID' => $xml->meetingID,
202
+                        'moderatorPW' => $xml->moderatorPW,
203
+                        'attendeePW' => $xml->attendeePW,
204
+                        'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
205
+                        'running' => $xml->running,
206
+                        'recording' => $xml->recording,
207
+                        'startTime' => $xml->startTime,
208
+                        'endTime' => $xml->endTime,
209
+                        'participantCount' => $xml->participantCount,
210
+                        'moderatorCount' => $xml->moderatorCount,
211
+                        'attendees' => $xml->attendees,
212
+                        'metadata' => $xml->metadata,
213
+                    );
214 214
     }
215 215
 
216 216
     if ($xml) {
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
         // Do getRecordings is executed using a method GET (supported by all versions of BBB).
275 275
         $xml = bigbluebuttonbn_wrap_xml_load_file(
276 276
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getRecordings', ['meetingID' => implode(',', $mids)])
277
-          );
277
+            );
278 278
         if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) {
279 279
             // If there were meetings already created.
280 280
             foreach ($xml->recordings->recording as $recording) {
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 function bigbluebuttonbn_get_default_config_xml() {
341 341
     $xml = bigbluebuttonbn_wrap_xml_load_file(
342 342
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML')
343
-      );
343
+        );
344 344
 
345 345
     return $xml;
346 346
 }
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
     foreach ($ids as $id) {
413 413
         $xml = bigbluebuttonbn_wrap_xml_load_file(
414 414
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id])
415
-          );
415
+            );
416 416
         if ($xml && $xml->returncode != 'SUCCESS') {
417 417
             return false;
418 418
         }
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
     foreach ($ids as $id) {
431 431
         $xml = bigbluebuttonbn_wrap_xml_load_file(
432 432
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish])
433
-          );
433
+            );
434 434
         if ($xml && $xml->returncode != 'SUCCESS') {
435 435
             return false;
436 436
         }
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
     foreach ($ids as $id) {
449 449
         $xml = bigbluebuttonbn_wrap_xml_load_file(
450 450
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
451
-          );
451
+            );
452 452
         if ($xml && $xml->returncode != 'SUCCESS') {
453 453
             return false;
454 454
         }
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
 function bigbluebuttonbn_end_meeting($meetingid, $modpw) {
465 465
     $xml = bigbluebuttonbn_wrap_xml_load_file(
466 466
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw])
467
-      );
467
+        );
468 468
 
469 469
     if ($xml) {
470 470
         // If the xml packet returned failure it displays the message to the user.
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
 function bigbluebuttonbn_is_meeting_running($meetingid) {
482 482
     $xml = bigbluebuttonbn_wrap_xml_load_file(
483 483
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('isMeetingRunning', ['meetingID' => $meetingid])
484
-      );
484
+        );
485 485
 
486 486
     if ($xml && $xml->returncode == 'SUCCESS') {
487 487
         return ($xml->running == 'true');
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
 function bigbluebuttonbn_get_server_version() {
494 494
     $xml = bigbluebuttonbn_wrap_xml_load_file(
495 495
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url()
496
-      );
496
+        );
497 497
 
498 498
     if ($xml && $xml->returncode == 'SUCCESS') {
499 499
         return $xml->version;
@@ -554,10 +554,10 @@  discard block
 block discarded – undo
554 554
 
555 555
         $options = array();
556 556
         $options['CURLOPT_HTTPHEADER'] = array(
557
-                 'Content-Type: '.$contenttype,
558
-                 'Content-Length: '.strlen($data),
559
-                 'Content-Language: en-US',
560
-               );
557
+                    'Content-Type: '.$contenttype,
558
+                    'Content-Length: '.strlen($data),
559
+                    'Content-Language: en-US',
560
+                );
561 561
 
562 562
         return $c->post($url, $data, $options);
563 563
     }
@@ -632,13 +632,13 @@  discard block
 block discarded – undo
632 632
 
633 633
 function bigbluebuttonbn_role_unknown() {
634 634
     return array(
635
-              "id" => "0",
636
-              "name" => "",
637
-              "shortname" => "unknown",
638
-              "description" => "",
639
-              "sortorder" => "0",
640
-              "archetype" => "guest",
641
-              "localname" => "Unknown"
635
+                "id" => "0",
636
+                "name" => "",
637
+                "shortname" => "unknown",
638
+                "description" => "",
639
+                "sortorder" => "0",
640
+                "archetype" => "guest",
641
+                "localname" => "Unknown"
642 642
             );
643 643
 }
644 644
 
@@ -647,16 +647,16 @@  discard block
 block discarded – undo
647 647
         'all' => array(
648 648
             'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
649 649
             'children' => []
650
-          )
651
-      );
650
+            )
651
+        );
652 652
     $data['role'] = array(
653 653
         'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
654 654
         'children' => bigbluebuttonbn_get_roles_select($context)
655
-      );
655
+        );
656 656
     $data['user'] = array(
657 657
         'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
658 658
         'children' => bigbluebuttonbn_get_users_select($context)
659
-      );
659
+        );
660 660
     return $data;
661 661
 }
662 662
 
@@ -706,9 +706,9 @@  discard block
 block discarded – undo
706 706
             continue;
707 707
         }
708 708
         $participantlistarray[] = array(
709
-              'selectiontype' => 'role',
710
-              'selectionid' => $moderatordefault,
711
-              'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
709
+                'selectiontype' => 'role',
710
+                'selectionid' => $moderatordefault,
711
+                'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
712 712
     }
713 713
     return $participantlistarray;
714 714
 }
@@ -719,11 +719,11 @@  discard block
 block discarded – undo
719 719
             'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
720 720
             'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
721 721
             'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
722
-          ],
722
+            ],
723 723
         'type_selected' => 'all',
724 724
         'options' => ['all' => '---------------'],
725 725
         'selected' => 'all',
726
-      ];
726
+        ];
727 727
 }
728 728
 
729 729
 function bigbluebuttonbn_is_moderator($context, $participants, $userid = null, $userroles = null) {
@@ -916,7 +916,7 @@  discard block
 block discarded – undo
916 916
         $eventproperties['other'] = $options['other'];
917 917
     }
918 918
     $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create',
919
-      array($eventproperties));
919
+        array($eventproperties));
920 920
     $event->trigger();
921 921
 }
922 922
 
@@ -961,7 +961,7 @@  discard block
 block discarded – undo
961 961
     // Ping again and refresh the cache.
962 962
     $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
963 963
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
964
-      );
964
+        );
965 965
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
966 966
     return $meetinginfo;
967 967
 }
@@ -1197,8 +1197,8 @@  discard block
 block discarded – undo
1197 1197
     }
1198 1198
     $id = 'playbacks-'.$recording['recordID'];
1199 1199
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1200
-          'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1201
-          'title' => $title, $visibility => $visibility));
1200
+            'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1201
+            'title' => $title, $visibility => $visibility));
1202 1202
     foreach ($recording['playbacks'] as $playback) {
1203 1203
         $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bigbluebuttonbnid,
1204 1204
             $playback).' ';
@@ -1212,7 +1212,7 @@  discard block
 block discarded – undo
1212 1212
     $title = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn');
1213 1213
     $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_play(this);';
1214 1214
     $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=playback&bn='.$bigbluebuttonbnid.
1215
-      '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type'];
1215
+        '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type'];
1216 1216
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1217 1217
         $href .= '&href='.urlencode($playback['url']);
1218 1218
     }
@@ -1314,7 +1314,7 @@  discard block
 block discarded – undo
1314 1314
             'onclick' => $onclick,
1315 1315
             'data-action' => $data['action'],
1316 1316
             'data-links' => bigbluebuttonbn_get_count_recording_imported_instances($recording['recordID'])
1317
-          );
1317
+            );
1318 1318
         return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false);
1319 1319
     }
1320 1320
 
@@ -1431,7 +1431,7 @@  discard block
 block discarded – undo
1431 1431
         $texthead . $rowdata->activity . $texttail, $texthead . $rowdata->description . $texttail,
1432 1432
         $rowdata->preview, $texthead . $rowdata->date_formatted . $texttail,
1433 1433
         $rowdata->duration_formatted
1434
-      );
1434
+        );
1435 1435
     if ($bbbsession['managerecordings']) {
1436 1436
         $row->cells[] = $rowdata->actionbar;
1437 1437
     }
@@ -1696,8 +1696,8 @@  discard block
 block discarded – undo
1696 1696
     $activitytime = '';
1697 1697
     if ($time) {
1698 1698
         $activitytime = calendar_day_representation($time).' '.
1699
-          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
1700
-          calendar_time_representation($time);
1699
+            get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
1700
+            calendar_time_representation($time);
1701 1701
     }
1702 1702
 
1703 1703
     return $activitytime;
Please login to merge, or discard this patch.