Completed
Push — master ( dae38e...99e47c )
by Jesus
02:23
created
classes/locallib/config.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -120,29 +120,29 @@
 block discarded – undo
120 120
      */
121 121
     public static function get_options() {
122 122
         return [
123
-               'version_major' => self::get_moodle_version_major(),
124
-               'voicebridge_editable' => self::get('voicebridge_editable'),
125
-               'waitformoderator_default' => self::get('waitformoderator_default'),
126
-               'waitformoderator_editable' => self::get('waitformoderator_editable'),
127
-               'userlimit_default' => self::get('userlimit_default'),
128
-               'userlimit_editable' => self::get('userlimit_editable'),
129
-               'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'),
130
-               'sendnotifications_enabled' => self::get('sendnotifications_enabled'),
131
-               'recordings_enabled' => self::get('recordings_enabled'),
132
-               'recordings_html_default' => self::get('recordings_html_default'),
133
-               'recordings_html_editable' => self::get('recordings_html_editable'),
134
-               'recordings_deleted_default' => self::get('recordings_deleted_default'),
135
-               'recordings_deleted_editable' => self::get('recordings_deleted_editable'),
136
-               'recordings_imported_default' => self::get('recordings_imported_default'),
137
-               'recordings_imported_editable' => self::get('recordings_imported_editable'),
138
-               'recording_default' => self::get('recording_default'),
139
-               'recording_editable' => self::get('recording_editable'),
140
-               'recording_icons_enabled' => self::get('recording_icons_enabled'),
141
-               'general_warning_message' => self::get('general_warning_message'),
142
-               'general_warning_box_type' => self::get('general_warning_box_type'),
143
-               'general_warning_button_text' => self::get('general_warning_button_text'),
144
-               'general_warning_button_href' => self::get('general_warning_button_href'),
145
-               'general_warning_button_class' => self::get('general_warning_button_class'),
146
-          ];
123
+                'version_major' => self::get_moodle_version_major(),
124
+                'voicebridge_editable' => self::get('voicebridge_editable'),
125
+                'waitformoderator_default' => self::get('waitformoderator_default'),
126
+                'waitformoderator_editable' => self::get('waitformoderator_editable'),
127
+                'userlimit_default' => self::get('userlimit_default'),
128
+                'userlimit_editable' => self::get('userlimit_editable'),
129
+                'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'),
130
+                'sendnotifications_enabled' => self::get('sendnotifications_enabled'),
131
+                'recordings_enabled' => self::get('recordings_enabled'),
132
+                'recordings_html_default' => self::get('recordings_html_default'),
133
+                'recordings_html_editable' => self::get('recordings_html_editable'),
134
+                'recordings_deleted_default' => self::get('recordings_deleted_default'),
135
+                'recordings_deleted_editable' => self::get('recordings_deleted_editable'),
136
+                'recordings_imported_default' => self::get('recordings_imported_default'),
137
+                'recordings_imported_editable' => self::get('recordings_imported_editable'),
138
+                'recording_default' => self::get('recording_default'),
139
+                'recording_editable' => self::get('recording_editable'),
140
+                'recording_icons_enabled' => self::get('recording_icons_enabled'),
141
+                'general_warning_message' => self::get('general_warning_message'),
142
+                'general_warning_box_type' => self::get('general_warning_box_type'),
143
+                'general_warning_button_text' => self::get('general_warning_button_text'),
144
+                'general_warning_button_href' => self::get('general_warning_button_href'),
145
+                'general_warning_button_class' => self::get('general_warning_button_class'),
146
+            ];
147 147
     }
148 148
 }
Please login to merge, or discard this patch.
view.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later
24 24
  */
25 25
 
26
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
27
-require_once(dirname(__FILE__).'/locallib.php');
26
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
27
+require_once(dirname(__FILE__) . '/locallib.php');
28 28
 
29 29
 $id = required_param('id', PARAM_INT);
30 30
 $bn = optional_param('n', 0, PARAM_INT);
@@ -56,21 +56,21 @@  discard block
 block discarded – undo
56 56
 if (is_null($serverversion)) {
57 57
     if ($bbbsession['administrator']) {
58 58
         print_error('view_error_unable_join', 'bigbluebuttonbn',
59
-            $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
59
+            $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
60 60
         exit;
61 61
     }
62 62
 
63 63
     if ($bbbsession['moderator']) {
64 64
         print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
65
-            $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
65
+            $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
66 66
         exit;
67 67
     }
68 68
 
69 69
     print_error('view_error_unable_join_student', 'bigbluebuttonbn',
70
-        $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
70
+        $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
71 71
     exit;
72 72
 }
73
-$bbbsession['serverversion'] = (string) $serverversion;
73
+$bbbsession['serverversion'] = (string)$serverversion;
74 74
 
75 75
 // Mark viewed by user (if required).
76 76
 $completion = new completion_info($course);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 // Print the page header.
80 80
 $PAGE->set_context($context);
81
-$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id));
81
+$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id));
82 82
 $PAGE->set_title(format_string($bigbluebuttonbn->name));
83 83
 $PAGE->set_cacheable(false);
84 84
 $PAGE->set_heading($course->fullname);
@@ -88,11 +88,11 @@  discard block
 block discarded – undo
88 88
 if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) {
89 89
     echo $OUTPUT->header();
90 90
     if (isguestuser()) {
91
-        echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'),
92
-            get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id);
91
+        echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'),
92
+            get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id);
93 93
     } else {
94
-        echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'),
95
-            get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id);
94
+        echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'),
95
+            get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id);
96 96
     }
97 97
     echo $OUTPUT->footer();
98 98
     exit;
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
 // Operation URLs.
102 102
 $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
103
-$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id .
103
+$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id .
104 104
     '&bn=' . $bbbsession['bigbluebuttonbn']->id;
105 105
 $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' .
106 106
     'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id;
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 echo $OUTPUT->footer();
121 121
 
122 122
 // Shows version as a comment.
123
-echo '<!-- '.$bbbsession['originTag'].' -->'."\n";
123
+echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n";
124 124
 
125 125
 // Initialize session variable used across views.
126 126
 $SESSION->bigbluebuttonbn_bbbsession = $bbbsession;
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     $bbbsession['viewerPW'] = $bigbluebuttonbn->viewerpass;
151 151
 
152 152
     // Database info related to the activity.
153
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
153
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
154 154
         $bbbsession['bigbluebuttonbn']->id;
155 155
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
156 156
     $bbbsession['meetingdescription'] = $bigbluebuttonbn->intro;
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn');
172 172
     }
173 173
     if ($bigbluebuttonbn->record) {
174
-        $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
174
+        $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
175 175
     }
176 176
 
177 177
     $bbbsession['openingtime'] = $bigbluebuttonbn->openingtime;
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
     $bbbsession['originServerName'] = $parsedurl['host'];
188 188
     $bbbsession['originServerUrl'] = $CFG->wwwroot;
189 189
     $bbbsession['originServerCommonName'] = '';
190
-    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
190
+    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
191 191
 }
192 192
 
193 193
 function bigbluebuttonbn_view_bbbsession_roles($context, $userid) {
@@ -249,9 +249,9 @@  discard block
 block discarded – undo
249 249
     }
250 250
 
251 251
     // Assign group default values.
252
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
253
-        $bbbsession['bigbluebuttonbn']->id.'['.$bbbsession['group'].']';
254
-    $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name.' ('.$groupname.')';
252
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
253
+        $bbbsession['bigbluebuttonbn']->id . '[' . $bbbsession['group'] . ']';
254
+    $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name . ' (' . $groupname . ')';
255 255
 
256 256
     if (count($groups) == 0) {
257 257
         // Only the All participants group exists.
@@ -266,12 +266,12 @@  discard block
 block discarded – undo
266 266
     }
267 267
 
268 268
     bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn'), 'warning');
269
-    $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id;
269
+    $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
270 270
     groups_print_activity_menu($bbbsession['cm'], $urltoroot);
271 271
     echo '<br><br>';
272 272
 }
273 273
 
274
-function bigbluebuttonbn_view_message_box(&$bbbsession, $message, $type='warning', $onlymoderator=false) {
274
+function bigbluebuttonbn_view_message_box(&$bbbsession, $message, $type = 'warning', $onlymoderator = false) {
275 275
     global $OUTPUT;
276 276
     if ($onlymoderator && !$bbbsession['moderator'] && !$bbbsession['administrator']) {
277 277
         return;
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 
303 303
     // Renders general warning when configured.
304 304
     $cfg = \mod_bigbluebuttonbn\locallib\config::get_options();
305
-    $output  = bigbluebuttonbn_view_render_warning(
305
+    $output = bigbluebuttonbn_view_render_warning(
306 306
         (string)$cfg['general_warning_message'],
307 307
         (string)$cfg['general_warning_box_type'],
308 308
         (string)$cfg['general_warning_button_href'],
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
                 'M.mod_bigbluebuttonbn.recordings.init', array($jsvars));
325 325
     }
326 326
 
327
-    echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br');
327
+    echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br');
328 328
     $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars));
329 329
 }
330 330
 
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
     return $output;
350 350
 }
351 351
 
352
-function bigbluebuttonbn_view_render_warning($message, $type='info', $href='', $text='', $class='') {
352
+function bigbluebuttonbn_view_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') {
353 353
     global $OUTPUT;
354 354
     $output = "\n";
355 355
     // Evaluates if config_warning is enabled.
@@ -357,14 +357,14 @@  discard block
 block discarded – undo
357 357
         return $output;
358 358
     }
359 359
     $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
360
-      'bigbluebuttonbn_view_general_warning')."\n";
361
-    $output .= '  <button type="button" class="close" data-dismiss="alert">&times;</button>'.$message."\n";
362
-    $output .= '  <div class="singlebutton">'."\n";
360
+      'bigbluebuttonbn_view_general_warning') . "\n";
361
+    $output .= '  <button type="button" class="close" data-dismiss="alert">&times;</button>' . $message . "\n";
362
+    $output .= '  <div class="singlebutton">' . "\n";
363 363
     if (!empty($href)) {
364 364
         $output .= bigbluebuttonbn_view_render_warning_button($href, $text, $class);
365 365
     }
366
-    $output .= '  </div>'."\n";
367
-    $output .= $OUTPUT->box_end()."\n";
366
+    $output .= '  </div>' . "\n";
367
+    $output .= $OUTPUT->box_end() . "\n";
368 368
     return $output;
369 369
 }
370 370
 
@@ -375,11 +375,11 @@  discard block
 block discarded – undo
375 375
     if ($class == '') {
376 376
         $class = 'btn btn-secondary';
377 377
     }
378
-    $output  = '  <form method="post" action="' . $href . '" class="form-inline">'."\n";
379
-    $output .= '      <button type="submit" class="' . $class . '"'."\n";
380
-    $output .= '          title=""'."\n";
381
-    $output .= '          >' . $text . '</button>'."\n";
382
-    $output .= '  </form>'."\n";
378
+    $output  = '  <form method="post" action="' . $href . '" class="form-inline">' . "\n";
379
+    $output .= '      <button type="submit" class="' . $class . '"' . "\n";
380
+    $output .= '          title=""' . "\n";
381
+    $output .= '          >' . $text . '</button>' . "\n";
382
+    $output .= '  </form>' . "\n";
383 383
     return $output;
384 384
 }
385 385
 
@@ -389,12 +389,12 @@  discard block
 block discarded – undo
389 389
     // JavaScript variables for room.
390 390
     $openingtime = '';
391 391
     if ($bbbsession['openingtime']) {
392
-        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '.
392
+        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' .
393 393
             userdate($bbbsession['openingtime']);
394 394
     }
395 395
     $closingtime = '';
396 396
     if ($bbbsession['closingtime']) {
397
-        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '.
397
+        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' .
398 398
             userdate($bbbsession['closingtime']);
399 399
     }
400 400
     $jsvars += array(
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
     $output .= $OUTPUT->box_end();
412 412
 
413 413
     $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box');
414
-    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>'."\n";
414
+    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>' . "\n";
415 415
     $output .= $OUTPUT->box_end();
416 416
 
417 417
     if ($activity == 'ended') {
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
 
438 438
     // Get recordings.
439 439
     $recordings = array();
440
-    if ( bigbluebuttonbn_view_include_recordings($bbbsession) ) {
440
+    if (bigbluebuttonbn_view_include_recordings($bbbsession)) {
441 441
         $recordings = bigbluebuttonbn_get_recordings(
442 442
             $bbbsession['course']->id, $bigbluebuttonbnid, $showroom,
443 443
             $bbbsession['bigbluebuttonbn']->recordings_deleted
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
     // If there are meetings with recordings load the data to the table.
469 469
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
470 470
         // Render a plain html table.
471
-        return bigbluebutton_output_recording_table($bbbsession, $recordings)."\n";
471
+        return bigbluebutton_output_recording_table($bbbsession, $recordings) . "\n";
472 472
     }
473 473
 
474 474
     // JavaScript variables for recordings with YUI.
@@ -488,8 +488,8 @@  discard block
 block discarded – undo
488 488
         array('type' => 'button',
489 489
               'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
490 490
               'class' => 'btn btn-secondary',
491
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
492
-                  $bbbsession['bigbluebuttonbn']->id.'\''));
491
+              'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' .
492
+                  $bbbsession['bigbluebuttonbn']->id . '\''));
493 493
     $output = html_writer::start_tag('br');
494 494
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
495 495
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -504,10 +504,10 @@  discard block
 block discarded – undo
504 504
         $attributes = array('title' => $bbbsession['presentation']['name']);
505 505
         $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']);
506 506
 
507
-        return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
508
-                ''.$OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).''.
509
-                ''.$OUTPUT->action_link($bbbsession['presentation']['url'],
510
-                      $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
507
+        return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' .
508
+                '' . $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . '' .
509
+                '' . $OUTPUT->action_link($bbbsession['presentation']['url'],
510
+                      $bbbsession['presentation']['name'], null, $attributes) . '<br><br>';
511 511
     }
512 512
 
513 513
     return '';
Please login to merge, or discard this patch.