Completed
Branch v2.2-stable (d83e60)
by Jesus
02:31
created
view.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
  * @author    Fred Dixon  (ffdixon [at] blindsidenetworks [dt] com)
25 25
  */
26 26
 
27
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
28
-require_once(dirname(__FILE__).'/locallib.php');
27
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
28
+require_once(dirname(__FILE__) . '/locallib.php');
29 29
 
30 30
 $id = required_param('id', PARAM_INT);
31 31
 $bn = optional_param('n', 0, PARAM_INT);
@@ -60,19 +60,19 @@  discard block
 block discarded – undo
60 60
 if (is_null($serverversion)) {
61 61
     if ($bbbsession['administrator']) {
62 62
         print_error('view_error_unable_join', 'bigbluebuttonbn',
63
-            $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
63
+            $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
64 64
         exit;
65 65
     }
66 66
     if ($bbbsession['moderator']) {
67 67
         print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
68
-            $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
68
+            $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
69 69
         exit;
70 70
     }
71 71
     print_error('view_error_unable_join_student', 'bigbluebuttonbn',
72
-        $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
72
+        $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
73 73
     exit;
74 74
 }
75
-$bbbsession['serverversion'] = (string) $serverversion;
75
+$bbbsession['serverversion'] = (string)$serverversion;
76 76
 
77 77
 // Mark viewed by user (if required).
78 78
 $completion = new completion_info($course);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
 // Print the page header.
82 82
 $PAGE->set_context($context);
83
-$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id));
83
+$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id));
84 84
 $PAGE->set_title(format_string($bigbluebuttonbn->name));
85 85
 $PAGE->set_cacheable(false);
86 86
 $PAGE->set_heading($course->fullname);
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
 if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) {
91 91
     echo $OUTPUT->header();
92 92
     if (isguestuser()) {
93
-        echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'),
94
-            get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id);
93
+        echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'),
94
+            get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id);
95 95
     } else {
96
-        echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'),
97
-            get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id);
96
+        echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'),
97
+            get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id);
98 98
     }
99 99
     echo $OUTPUT->footer();
100 100
     exit;
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
 // Operation URLs.
104 104
 $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
105
-$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id .
105
+$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id .
106 106
     '&bn=' . $bbbsession['bigbluebuttonbn']->id;
107 107
 $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' .
108 108
     'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id;
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 echo $OUTPUT->footer();
123 123
 
124 124
 // Shows version as a comment.
125
-echo '<!-- '.$bbbsession['originTag'].' -->'."\n";
125
+echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n";
126 126
 
127 127
 // Initialize session variable used across views.
128 128
 $SESSION->bigbluebuttonbn_bbbsession = $bbbsession;
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass;
152 152
     $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass;
153 153
     // Database info related to the activity.
154
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
154
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
155 155
         $bbbsession['bigbluebuttonbn']->id;
156 156
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
157 157
     $bbbsession['meetingdescription'] = $bbbsession['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 ($bbbsession['bigbluebuttonbn']->record) {
174
-        $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
174
+        $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
175 175
     }
176 176
     $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime;
177 177
     $bbbsession['closingtime'] = $bbbsession['bigbluebuttonbn']->closingtime;
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     $bbbsession['originServerName'] = $parsedurl['host'];
185 185
     $bbbsession['originServerUrl'] = $CFG->wwwroot;
186 186
     $bbbsession['originServerCommonName'] = '';
187
-    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
187
+    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
188 188
     $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server();
189 189
 }
190 190
 
@@ -239,8 +239,8 @@  discard block
 block discarded – undo
239 239
         $groupname = groups_get_group_name($bbbsession['group']);
240 240
     }
241 241
     // Assign group default values.
242
-    $bbbsession['meetingid'] .= '['.$bbbsession['group'].']';
243
-    $bbbsession['meetingname'] .= ' ('.$groupname.')';
242
+    $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']';
243
+    $bbbsession['meetingname'] .= ' (' . $groupname . ')';
244 244
     if (count($groups) == 0) {
245 245
         // Only the All participants group exists.
246 246
         bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info');
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
     if (has_capability('moodle/site:accessallgroups', $context)) {
251 251
         bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn'));
252 252
     }
253
-    $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id;
253
+    $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
254 254
     groups_print_activity_menu($bbbsession['cm'], $urltoroot);
255 255
     echo '<br><br>';
256 256
 }
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
         $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn');
318 318
         $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger');
319 319
     }
320
-    echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br');
320
+    echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br');
321 321
     $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars));
322 322
 }
323 323
 
@@ -386,12 +386,12 @@  discard block
 block discarded – undo
386 386
     // JavaScript variables for room.
387 387
     $openingtime = '';
388 388
     if ($bbbsession['openingtime']) {
389
-        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '.
389
+        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' .
390 390
             userdate($bbbsession['openingtime']);
391 391
     }
392 392
     $closingtime = '';
393 393
     if ($bbbsession['closingtime']) {
394
-        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '.
394
+        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' .
395 395
             userdate($bbbsession['closingtime']);
396 396
     }
397 397
     $jsvars += array(
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
     $output .= $OUTPUT->box_end();
409 409
     // Action button box.
410 410
     $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box');
411
-    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>'."\n";
411
+    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>' . "\n";
412 412
     $output .= $OUTPUT->box_end();
413 413
     if ($activity == 'ended') {
414 414
         $output .= bigbluebuttonbn_view_ended($bbbsession);
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
     // If there are meetings with recordings load the data to the table.
458 458
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
459 459
         // Render a plain html table.
460
-        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n";
460
+        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n";
461 461
     }
462 462
     // JavaScript variables for recordings with YUI.
463 463
     $jsvars += array(
@@ -485,8 +485,8 @@  discard block
 block discarded – undo
485 485
         array('type' => 'button',
486 486
               'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
487 487
               'class' => 'btn btn-secondary',
488
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
489
-                  $bbbsession['bigbluebuttonbn']->id.'\''));
488
+              'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' .
489
+                  $bbbsession['bigbluebuttonbn']->id . '\''));
490 490
     $output  = html_writer::empty_tag('br');
491 491
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
492 492
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -505,10 +505,10 @@  discard block
 block discarded – undo
505 505
     if (!is_null($bbbsession['presentation']['url'])) {
506 506
         $attributes = array('title' => $bbbsession['presentation']['name']);
507 507
         $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']);
508
-        return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
509
-                $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).
508
+        return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' .
509
+                $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) .
510 510
                 $OUTPUT->action_link($bbbsession['presentation']['url'],
511
-                $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
511
+                $bbbsession['presentation']['name'], null, $attributes) . '<br><br>';
512 512
     }
513 513
     return '';
514 514
 }
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_recording_deleted.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     protected function init() {
42 42
         parent::init();
43
-        $this->description = "The user with id '##userid' has deleted a recording with id ".
43
+        $this->description = "The user with id '##userid' has deleted a recording with id " .
44 44
             "'##other' from the course id '##contextinstanceid'.";
45 45
     }
46 46
 
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_meeting_ended.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@
 block discarded – undo
40 40
      */
41 41
     protected function init() {
42 42
         parent::init();
43
-        $this->description = "A bigbluebutton meeting for the bigbluebuttonbn activity with id ".
44
-            "'##objectid' for the course id '##contextinstanceid' has been forcibly ".
43
+        $this->description = "A bigbluebutton meeting for the bigbluebuttonbn activity with id " .
44
+            "'##objectid' for the course id '##contextinstanceid' has been forcibly " .
45 45
             "ended by the user with id '##userid'.";
46 46
     }
47 47
 
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_recording_edited.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     protected function init() {
42 42
         parent::init();
43
-        $this->description = "The user with id '##userid' has edited a recording with id ".
43
+        $this->description = "The user with id '##userid' has edited a recording with id " .
44 44
             "'##other' in the course id '##contextinstanceid'.";
45 45
     }
46 46
 
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_recording_published.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     protected function init() {
42 42
         parent::init();
43
-        $this->description = "The user with id '##userid' has published a recording with id ".
43
+        $this->description = "The user with id '##userid' has published a recording with id " .
44 44
             "'##other' in the course id '##contextinstanceid'.";
45 45
     }
46 46
 
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_meeting_left.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@
 block discarded – undo
40 40
      */
41 41
     protected function init() {
42 42
         parent::init();
43
-        $this->description = "The user with id '##userid' has left a bigbluebutton meeting for ".
44
-            "the bigbluebuttonbn activity with id '##objectid' for the course id ".
43
+        $this->description = "The user with id '##userid' has left a bigbluebutton meeting for " .
44
+            "the bigbluebuttonbn activity with id '##objectid' for the course id " .
45 45
             "'##contextinstanceid'.";
46 46
     }
47 47
 
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_meeting_created.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     protected function init() {
42 42
         parent::init();
43
-        $this->description = "The user with id '##userid' created a bigbluebutton meeting for".
43
+        $this->description = "The user with id '##userid' created a bigbluebutton meeting for" .
44 44
             "the bigbluebuttonbn activity with id '##objectid' for the course id '##contextinstanceid'.";
45 45
     }
46 46
 
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_recording_imported.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     protected function init() {
42 42
         parent::init();
43
-        $this->description = "The user with id '##userid' has imported a recording with id ".
43
+        $this->description = "The user with id '##userid' has imported a recording with id " .
44 44
             "'##other' in the course id '##contextinstanceid'.";
45 45
     }
46 46
 
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_activity_management_viewed.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     protected function init() {
42 42
         parent::init();
43
-        $this->description = "The user with id '##userid' viewed the bigbluebuttonbn activity management page for ".
43
+        $this->description = "The user with id '##userid' viewed the bigbluebuttonbn activity management page for " .
44 44
         "the course module id '##contextinstanceid'.";
45 45
     }
46 46
 
Please login to merge, or discard this patch.