Completed
Pull Request — master (#234)
by
unknown
01:54
created
view.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
 
28 28
 use mod_bigbluebuttonbn\plugin;
29 29
 
30
-require(__DIR__.'/../../config.php');
31
-require_once(__DIR__.'/locallib.php');
32
-require_once(__DIR__.'/viewlib.php');
30
+require(__DIR__ . '/../../config.php');
31
+require_once(__DIR__ . '/locallib.php');
32
+require_once(__DIR__ . '/viewlib.php');
33 33
 
34 34
 $id = required_param('id', PARAM_INT);
35 35
 $bn = optional_param('bn', 0, PARAM_INT);
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 bigbluebuttonbn_view_bbbsession_set($PAGE->context, $bbbsession);
59 59
 
60 60
 // Validates if the BigBlueButton server is working.
61
-$serverversion = bigbluebuttonbn_get_server_version();  // In locallib.
61
+$serverversion = bigbluebuttonbn_get_server_version(); // In locallib.
62 62
 if ($serverversion === null) {
63 63
     $errmsg = 'view_error_unable_join_student';
64 64
     $errurl = '/course/view.php';
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     }
73 73
     print_error($errmsg, plugin::COMPONENT, new moodle_url($errurl, $errurlparams));
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);
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 echo $OUTPUT->footer();
117 117
 
118 118
 // Shows version as a comment.
119
-echo '<!-- '.$bbbsession['originTag'].' -->'."\n";
119
+echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n";
120 120
 
121 121
 // Initialize session variable used across views.
122 122
 $SESSION->bigbluebuttonbn_bbbsession = $bbbsession;
123 123
\ No newline at end of file
Please login to merge, or discard this patch.
classes/output/import_view.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 
37 37
 defined('MOODLE_INTERNAL') || die();
38 38
 
39
-require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
39
+require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
40 40
 
41 41
 /**
42 42
  * Class import_view
Please login to merge, or discard this patch.
viewlib.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
         $groupname = groups_get_group_name($bbbsession['group']);
55 55
     }
56 56
     // Assign group default values.
57
-    $bbbsession['meetingid'] .= '['.$bbbsession['group'].']';
58
-    $bbbsession['meetingname'] .= ' ('.$groupname.')';
57
+    $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']';
58
+    $bbbsession['meetingname'] .= ' (' . $groupname . ')';
59 59
     if (count($groups) == 0) {
60 60
         // Only the All participants group exists.
61 61
         bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info');
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     if (has_capability('moodle/site:accessallgroups', $context)) {
66 66
         bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn'));
67 67
     }
68
-    $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id;
68
+    $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
69 69
     groups_print_activity_menu($bbbsession['cm'], $urltoroot);
70 70
     echo '<br><br>';
71 71
 }
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn');
138 138
         $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger');
139 139
     }
140
-    echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br');
140
+    echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br');
141 141
     $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars));
142 142
 }
143 143
 
@@ -206,12 +206,12 @@  discard block
 block discarded – undo
206 206
     // JavaScript variables for room.
207 207
     $openingtime = '';
208 208
     if ($bbbsession['openingtime']) {
209
-        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '.
209
+        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' .
210 210
             userdate($bbbsession['openingtime']);
211 211
     }
212 212
     $closingtime = '';
213 213
     if ($bbbsession['closingtime']) {
214
-        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '.
214
+        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' .
215 215
             userdate($bbbsession['closingtime']);
216 216
     }
217 217
     $jsvars += array(
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     $output .= $OUTPUT->box_end();
229 229
     // Action button box.
230 230
     $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box');
231
-    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>'."\n";
231
+    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>' . "\n";
232 232
     $output .= $OUTPUT->box_end();
233 233
     if ($activity == 'ended') {
234 234
         $output .= bigbluebuttonbn_view_ended($bbbsession);
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
     // If there are meetings with recordings load the data to the table.
282 282
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
283 283
         // Render a plain html table.
284
-        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n";
284
+        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n";
285 285
     }
286 286
     // JavaScript variables for recordings with YUI.
287 287
     $jsvars += array(
@@ -318,8 +318,8 @@  discard block
 block discarded – undo
318 318
         array('type' => 'button',
319 319
             'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
320 320
             'class' => 'btn btn-secondary',
321
-            'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
322
-                $bbbsession['bigbluebuttonbn']->id.'\''));
321
+            'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' .
322
+                $bbbsession['bigbluebuttonbn']->id . '\''));
323 323
     $output  = html_writer::empty_tag('br');
324 324
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
325 325
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -338,10 +338,10 @@  discard block
 block discarded – undo
338 338
     if (!is_null($bbbsession['presentation']['url'])) {
339 339
         $attributes = array('title' => $bbbsession['presentation']['name']);
340 340
         $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']);
341
-        return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
342
-            $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).
341
+        return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' .
342
+            $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) .
343 343
             $OUTPUT->action_link($bbbsession['presentation']['url'],
344
-                $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
344
+                $bbbsession['presentation']['name'], null, $attributes) . '<br><br>';
345 345
     }
346 346
     return '';
347 347
 }
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@
 block discarded – undo
28 28
 use mod_bigbluebuttonbn\output\renderer;
29 29
 use mod_bigbluebuttonbn\output\index;
30 30
 
31
-require(__DIR__.'/../../config.php');
32
-require_once(__DIR__.'/locallib.php');
31
+require(__DIR__ . '/../../config.php');
32
+require_once(__DIR__ . '/locallib.php');
33 33
 
34 34
 $id = required_param('id', PARAM_INT);
35 35
 $a = optional_param('a', 0, PARAM_INT);
Please login to merge, or discard this patch.
mod_form.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -219,8 +219,8 @@  discard block
 block discarded – undo
219 219
             $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
220 220
                 $field['description_key'], 0, ['maxlength' => 4, 'size' => 6],
221 221
                 ['message' => get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'),
222
-                 'type' => 'numeric', 'rule' => '####', 'validator' => 'server']
223
-              );
222
+                    'type' => 'numeric', 'rule' => '####', 'validator' => 'server']
223
+                );
224 224
         } else {
225 225
             $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
226 226
                 $field['description_key'], 0, ['maxlength' => 4, 'size' => 6]);
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
     private function bigbluebuttonbn_mform_add_block_room_recordings(&$mform, $cfg) {
291 291
         $recordingsettings = false;
292 292
         $field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT,
293
-                  'description_key' => null];
293
+                    'description_key' => null];
294 294
         if ($cfg['recordings_html_editable']) {
295 295
             $field['type'] = 'checkbox';
296 296
             $field['description_key'] = 'mod_form_field_recordings_html';
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
         $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
300 300
             $field['description_key'], $cfg['recordings_html_default']);
301 301
         $field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT,
302
-                  'description_key' => null];
302
+                    'description_key' => null];
303 303
         if ($cfg['recordings_deleted_editable']) {
304 304
             $field['type'] = 'checkbox';
305 305
             $field['description_key'] = 'mod_form_field_recordings_deleted';
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
         $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
309 309
             $field['description_key'], $cfg['recordings_deleted_default']);
310 310
         $field = ['type' => 'hidden', 'name' => 'recordings_imported', 'data_type' => PARAM_INT,
311
-                  'description_key' => null];
311
+                    'description_key' => null];
312 312
         if ($cfg['importrecordings_enabled'] && $cfg['recordings_imported_editable']) {
313 313
             $field['type'] = 'checkbox';
314 314
             $field['description_key'] = 'mod_form_field_recordings_imported';
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
         $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
318 318
             $field['description_key'], $cfg['recordings_imported_default']);
319 319
         $field = ['type' => 'hidden', 'name' => 'recordings_preview', 'data_type' => PARAM_INT,
320
-                  'description_key' => null];
320
+                    'description_key' => null];
321 321
         if ($cfg['recordings_preview_editable']) {
322 322
             $field['type'] = 'checkbox';
323 323
             $field['description_key'] = 'mod_form_field_recordings_preview';
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
         $htmlselectiontype = html_writer::select($participantselection['type_options'],
395 395
             'bigbluebuttonbn_participant_selection_type', $participantselection['type_selected'], array(),
396 396
             array('id' => 'bigbluebuttonbn_participant_selection_type',
397
-                  'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;'));
397
+                    'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;'));
398 398
         $htmlselectionoptions = html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection',
399 399
             $participantselection['selected'], array(),
400 400
             array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled'));
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
             'type' => 'button', 'class' => 'btn btn-secondary',
403 403
             'value' => get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn'),
404 404
             'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;'
405
-          ));
405
+            ));
406 406
         $htmladdparticipant = html_writer::tag('div',
407 407
             $htmlselectiontype . '&nbsp;&nbsp;' . $htmlselectionoptions . '&nbsp;&nbsp;' . $htmlselectioninput, null);
408 408
         $mform->addElement('html', "\n\n");
@@ -444,9 +444,9 @@  discard block
 block discarded – undo
444 444
             $field['type'] = 'select';
445 445
             $field['data_type'] = PARAM_TEXT;
446 446
             $field['description_key'] = 'mod_form_field_block_clienttype';
447
-             $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
448
-                             BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
449
-             $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn'));
447
+                $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
448
+                                BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
449
+                $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn'));
450 450
             $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
451 451
                                     $field['description_key'], $cfg['clienttype_default'], $choices);
452 452
             return;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 
27 27
 defined('MOODLE_INTERNAL') || die();
28 28
 
29
-require_once(dirname(__FILE__).'/locallib.php');
30
-require_once($CFG->dirroot.'/course/moodleform_mod.php');
29
+require_once(dirname(__FILE__) . '/locallib.php');
30
+require_once($CFG->dirroot . '/course/moodleform_mod.php');
31 31
 
32 32
 /**
33 33
  * Moodle class for mod_form.
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $serverversion = bigbluebuttonbn_get_server_version();
49 49
         if (is_null($serverversion)) {
50 50
             print_error('general_error_unable_connect', 'bigbluebuttonbn',
51
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
51
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
52 52
             return;
53 53
         }
54 54
         // Context.
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         // If none is allowed, fail and return.
81 81
         if (empty($jsvars['instanceTypeProfiles'])) {
82 82
             print_error('general_error_not_allowed_to_create_instances)', 'bigbluebuttonbn',
83
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
83
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
84 84
             return;
85 85
         }
86 86
         $this->bigbluebuttonbn_mform_add_block_profiles($mform, $jsvars['instanceTypeProfiles']);
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                 );
137 137
                 $defaultvalues['presentation'] = $draftitemid;
138 138
             } catch (Exception $e) {
139
-                debugging('Presentation could not be loaded: '.$e->getMessage(), DEBUG_DEVELOPER);
139
+                debugging('Presentation could not be loaded: ' . $e->getMessage(), DEBUG_DEVELOPER);
140 140
                 return;
141 141
             }
142 142
             // Completion: tick if completion attendance settings is set to 1 or more.
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
             return;
565 565
         }
566 566
         $mform->addElement($type, $name, get_string($descriptionkey, 'bigbluebuttonbn'), $options);
567
-        if (get_string_manager()->string_exists($descriptionkey.'_help', 'bigbluebuttonbn')) {
567
+        if (get_string_manager()->string_exists($descriptionkey . '_help', 'bigbluebuttonbn')) {
568 568
             $mform->addHelpButton($name, $descriptionkey, 'bigbluebuttonbn');
569 569
         }
570 570
         if (!empty($rule)) {
Please login to merge, or discard this patch.
bbb_view.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -309,10 +309,10 @@  discard block
 block discarded – undo
309 309
  */
310 310
 function bigbluebuttonbn_bbb_view_create_meeting_data(&$bbbsession) {
311 311
     $data = ['meetingID' => $bbbsession['meetingid'],
312
-              'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64),
313
-              'attendeePW' => $bbbsession['viewerPW'],
314
-              'moderatorPW' => $bbbsession['modPW'],
315
-              'logoutURL' => $bbbsession['logoutURL'],
312
+                'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64),
313
+                'attendeePW' => $bbbsession['viewerPW'],
314
+                'moderatorPW' => $bbbsession['modPW'],
315
+                'logoutURL' => $bbbsession['logoutURL'],
316 316
             ];
317 317
     $data['record'] = bigbluebuttonbn_bbb_view_create_meeting_data_record($bbbsession['record']);
318 318
     // Check if auto_start_record is enable.
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
             '%duration%',
335 335
             (string) $durationtime,
336 336
             get_string('bbbdurationwarning', 'bigbluebuttonbn')
337
-          );
337
+            );
338 338
     }
339 339
     $voicebridge = intval($bbbsession['voicebridge']);
340 340
     if ($voicebridge > 0 && $voicebridge < 79999) {
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
  * @author    Jesus Federico  (jesus [at] blindsidenetworks [dt] com)
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
 global $SESSION;
30 30
 
@@ -70,23 +70,23 @@  discard block
 block discarded – undo
70 70
     if (is_null($serverversion)) {
71 71
         if ($bbbsession['administrator']) {
72 72
             print_error('view_error_unable_join', 'bigbluebuttonbn',
73
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
73
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
74 74
             exit;
75 75
         }
76 76
         if ($bbbsession['moderator']) {
77 77
             print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
78
-                $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
78
+                $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
79 79
             exit;
80 80
         }
81 81
         print_error('view_error_unable_join_student', 'bigbluebuttonbn',
82
-            $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
82
+            $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
83 83
         exit;
84 84
     }
85
-    $bbbsession['serverversion'] = (string) $serverversion;
85
+    $bbbsession['serverversion'] = (string)$serverversion;
86 86
 
87 87
     // Operation URLs.
88 88
     $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
89
-    $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id .
89
+    $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id .
90 90
         '&bn=' . $bbbsession['bigbluebuttonbn']->id;
91 91
     $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' .
92 92
         'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id;
@@ -114,8 +114,8 @@  discard block
 block discarded – undo
114 114
         }
115 115
 
116 116
         // Assign group default values.
117
-        $bbbsession['meetingid'] .= '['.$bbbsession['group'].']';
118
-        $bbbsession['meetingname'] .= ' ('.$groupname.')';
117
+        $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']';
118
+        $bbbsession['meetingname'] .= ' (' . $groupname . ')';
119 119
     }
120 120
 
121 121
     // Initialize session variable used across views.
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         }
181 181
         // If user is not administrator nor moderator (user is steudent) and waiting is required.
182 182
         if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) {
183
-            header('Location: '.$bbbsession['logoutURL']);
183
+            header('Location: ' . $bbbsession['logoutURL']);
184 184
             break;
185 185
         }
186 186
         // As the meeting doesn't exist, try to create it.
@@ -194,16 +194,16 @@  discard block
 block discarded – undo
194 194
             // The server is unreachable.
195 195
             if ($bbbsession['administrator']) {
196 196
                 print_error('view_error_unable_join', 'bigbluebuttonbn',
197
-                    $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
197
+                    $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
198 198
                 break;
199 199
             }
200 200
             if ($bbbsession['moderator']) {
201 201
                 print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
202
-                    $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
202
+                    $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
203 203
                 break;
204 204
             }
205 205
             print_error('view_error_unable_join_student', 'bigbluebuttonbn',
206
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
206
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
207 207
             break;
208 208
         }
209 209
         if ($response['returncode'] == 'FAILED') {
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_create'], $bigbluebuttonbn);
225 225
         // Internal logger: Insert a record with the meeting created.
226 226
         $overrides = array('meetingid' => $bbbsession['meetingid']);
227
-        $meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}';
227
+        $meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}';
228 228
         bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_CREATE, $overrides, $meta);
229 229
         // Since the meeting is already running, we just join the session.
230 230
         bigbluebuttonbn_bbb_view_join_meeting($bbbsession, $bigbluebuttonbn, $origin);
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
         $overrides = array('meetingid' => $bbbsession['meetingid']);
239 239
         bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_PLAYED, $overrides);
240 240
         // Execute the redirect.
241
-        header('Location: '.urldecode($href));
241
+        header('Location: ' . urldecode($href));
242 242
         break;
243 243
     default:
244 244
         bigbluebuttonbn_bbb_view_close_window();
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
         $data['welcome'] .= '<br><br>';
333 333
         $data['welcome'] .= str_replace(
334 334
             '%duration%',
335
-            (string) $durationtime,
335
+            (string)$durationtime,
336 336
             get_string('bbbdurationwarning', 'bigbluebuttonbn')
337 337
           );
338 338
     }
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
     $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE);
399 399
     if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) {
400 400
         // No more users allowed to join.
401
-        header('Location: '.$bbbsession['logoutURL']);
401
+        header('Location: ' . $bbbsession['logoutURL']);
402 402
         return;
403 403
     }
404 404
     // Build the URL.
@@ -412,13 +412,13 @@  discard block
 block discarded – undo
412 412
     bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_join'], $bigbluebuttonbn);
413 413
     // Internal logger: Instert a record with the meeting created.
414 414
     $overrides = array('meetingid' => $bbbsession['meetingid']);
415
-    $meta = '{"origin":'.$origin.'}';
415
+    $meta = '{"origin":' . $origin . '}';
416 416
     bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_JOIN, $overrides, $meta);
417 417
     // Before executing the redirect, increment the number of participants.
418 418
     bigbluebuttonbn_participant_joined($bbbsession['meetingid'],
419 419
         ($bbbsession['administrator'] || $bbbsession['moderator']));
420 420
     // Execute the redirect.
421
-    header('Location: '.$joinurl);
421
+    header('Location: ' . $joinurl);
422 422
 }
423 423
 
424 424
 /**
@@ -430,13 +430,13 @@  discard block
 block discarded – undo
430 430
  */
431 431
 function bigbluebuttonbn_bbb_view_errors($serrors, $id) {
432 432
     global $CFG, $OUTPUT;
433
-    $errors = (array) json_decode(urldecode($serrors));
433
+    $errors = (array)json_decode(urldecode($serrors));
434 434
     $msgerrors = '';
435 435
     foreach ($errors as $error) {
436
-        $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n";
436
+        $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n";
437 437
     }
438 438
     echo $OUTPUT->header();
439 439
     print_error('view_error_bigbluebutton', 'bigbluebuttonbn',
440
-        $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors);
440
+        $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors);
441 441
     echo $OUTPUT->footer();
442 442
 }
Please login to merge, or discard this patch.
bbb_broker.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
  * @author    Darko Miletic  (darko.miletic [at] gmail [dt] com)
25 25
  */
26 26
 
27
-require(__DIR__.'/../../config.php');
28
-require_once(__DIR__.'/locallib.php');
29
-require_once(__DIR__.'/brokerlib.php');
27
+require(__DIR__ . '/../../config.php');
28
+require_once(__DIR__ . '/locallib.php');
29
+require_once(__DIR__ . '/brokerlib.php');
30 30
 
31 31
 use \Firebase\JWT\JWT;
32 32
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 $params = $_REQUEST;
36 36
 
37 37
 if (!isset($params['action']) || empty($params['action'])) {
38
-    header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included');
38
+    header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included');
39 39
     return;
40 40
 }
41 41
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
 $error = bigbluebuttonbn_broker_validate_parameters($params);
52 52
 if (!empty($error)) {
53
-    header('HTTP/1.0 400 Bad Request. '.$error);
53
+    header('HTTP/1.0 400 Bad Request. ' . $error);
54 54
     return;
55 55
 }
56 56
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         bigbluebuttonbn_broker_meeting_events($bigbluebuttonbn);
72 72
         return;
73 73
     }
74
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
74
+    header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist');
75 75
 } catch (Exception $e) {
76
-    header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
76
+    header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage());
77 77
 }
Please login to merge, or discard this patch.
lib.php 3 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
  * @uses FEATURE_GRADE_OUTCOMES
104 104
  * @uses FEATURE_SHOW_DESCRIPTION
105 105
  * @param string $feature
106
- * @return mixed True if yes (some features may use other values)
106
+ * @return null|boolean True if yes (some features may use other values)
107 107
  */
108 108
 function bigbluebuttonbn_supports($feature) {
109 109
     if (!$feature) {
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
  *
273 273
  * @param object $bigbluebuttonbn Id of the module instance
274 274
  *
275
- * @return bool Success/Failure
275
+ * @return boolean|null Success/Failure
276 276
  */
277 277
 function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) {
278 278
     global $DB;
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
  * @param object $mod
294 294
  * @param object $bigbluebuttonbn
295 295
  *
296
- * @return bool
296
+ * @return string
297 297
  */
298 298
 function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
299 299
     if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) {
@@ -869,7 +869,7 @@  discard block
 block discarded – undo
869 869
  * @param stdClass $context       context object
870 870
  * @param string   $filearea      file area
871 871
  *
872
- * @return false|null false if file not valid
872
+ * @return boolean false if file not valid
873 873
  */
874 874
 function bigbluebuttonbn_pluginfile_valid($context, $filearea) {
875 875
 
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
     $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} ";
357 357
     $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)";
358 358
     $result = $DB->count_records_sql($sql, array($course->id, $bigbluebuttonbn->id, $user->id,
359
-                                              BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
359
+                                                BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
360 360
     return $result;
361 361
 }
362 362
 
@@ -589,12 +589,12 @@  discard block
 block discarded – undo
589 589
     $str  = '<div class="bigbluebuttonbn overview">'."\n";
590 590
     $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
591 591
     $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
592
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
592
+        '">'.$bigbluebuttonbn->name.'</a>'."\n";
593 593
     $str .= '  </div>'."\n";
594 594
     $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
595 595
         '</div>'."\n";
596 596
     $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime)
597
-      .'</div>'."\n";
597
+        .'</div>'."\n";
598 598
     $str .= '</div>'."\n";
599 599
     return $str;
600 600
 }
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
             'bigbluebuttonbn',
837 837
             $bigbluebuttonbn->id,
838 838
             $bigbluebuttonbn->completionexpected
839
-          );
839
+            );
840 840
     }
841 841
 }
842 842
 
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 
31 31
 // JWT is included in Moodle 3.7 core, but a local package is still needed for backward compatibility.
32 32
 if (!class_exists('\Firebase\JWT\JWT')) {
33
-    if (file_exists($CFG->libdir.'/php-jwt/src/JWT.php')) {
34
-        require_once($CFG->libdir.'/php-jwt/src/JWT.php');
33
+    if (file_exists($CFG->libdir . '/php-jwt/src/JWT.php')) {
34
+        require_once($CFG->libdir . '/php-jwt/src/JWT.php');
35 35
     } else {
36
-        require_once($CFG->dirroot.'/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php');
36
+        require_once($CFG->dirroot . '/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php');
37 37
     }
38 38
 }
39 39
 
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
     $CFG->bigbluebuttonbn = array();
42 42
 }
43 43
 
44
-if (file_exists(dirname(__FILE__).'/config.php')) {
45
-    require_once(dirname(__FILE__).'/config.php');
44
+if (file_exists(dirname(__FILE__) . '/config.php')) {
45
+    require_once(dirname(__FILE__) . '/config.php');
46 46
 }
47 47
 
48 48
 /*
@@ -99,19 +99,19 @@  discard block
 block discarded – undo
99 99
         return null;
100 100
     }
101 101
     $features = array(
102
-        (string) FEATURE_IDNUMBER => true,
103
-        (string) FEATURE_GROUPS => true,
104
-        (string) FEATURE_GROUPINGS => true,
105
-        (string) FEATURE_GROUPMEMBERSONLY => true,
106
-        (string) FEATURE_MOD_INTRO => true,
107
-        (string) FEATURE_BACKUP_MOODLE2 => true,
108
-        (string) FEATURE_COMPLETION_TRACKS_VIEWS => true,
109
-        (string) FEATURE_COMPLETION_HAS_RULES => true,
110
-        (string) FEATURE_GRADE_HAS_GRADE => false,
111
-        (string) FEATURE_GRADE_OUTCOMES => false,
112
-        (string) FEATURE_SHOW_DESCRIPTION => true,
102
+        (string)FEATURE_IDNUMBER => true,
103
+        (string)FEATURE_GROUPS => true,
104
+        (string)FEATURE_GROUPINGS => true,
105
+        (string)FEATURE_GROUPMEMBERSONLY => true,
106
+        (string)FEATURE_MOD_INTRO => true,
107
+        (string)FEATURE_BACKUP_MOODLE2 => true,
108
+        (string)FEATURE_COMPLETION_TRACKS_VIEWS => true,
109
+        (string)FEATURE_COMPLETION_HAS_RULES => true,
110
+        (string)FEATURE_GRADE_HAS_GRADE => false,
111
+        (string)FEATURE_GRADE_OUTCOMES => false,
112
+        (string)FEATURE_SHOW_DESCRIPTION => true,
113 113
     );
114
-    if (isset($features[(string) $feature])) {
114
+    if (isset($features[(string)$feature])) {
115 115
         return $features[$feature];
116 116
     }
117 117
     return null;
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) {
305 305
     global $DB;
306 306
     $sql  = "SELECT * FROM {bigbluebuttonbn_logs} ";
307
-    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?";
307
+    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?";
308 308
     $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}"));
309 309
     $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}";
310 310
     bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta);
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
326 326
     if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) {
327 327
         return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' .
328
-            get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string) $completed . ' ' .
328
+            get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' .
329 329
             get_string('view_message_times', 'bigbluebuttonbn');
330 330
     }
331 331
     return '';
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
  * @return array status array
518 518
  */
519 519
 function bigbluebuttonbn_reset_recordings($courseid) {
520
-    require_once(__DIR__.'/locallib.php');
520
+    require_once(__DIR__ . '/locallib.php');
521 521
     // Criteria for search [courseid | bigbluebuttonbn=null | subset=false | includedeleted=true].
522 522
     $recordings = bigbluebuttonbn_get_recordings($courseid, null, false, true);
523 523
     // Remove all the recordings.
@@ -586,16 +586,16 @@  discard block
 block discarded – undo
586 586
     if ($bigbluebuttonbn->visible) {
587 587
         $classes = 'class="dimmed" ';
588 588
     }
589
-    $str  = '<div class="bigbluebuttonbn overview">'."\n";
590
-    $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
591
-    $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
592
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
593
-    $str .= '  </div>'."\n";
594
-    $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
595
-        '</div>'."\n";
596
-    $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime)
597
-      .'</div>'."\n";
598
-    $str .= '</div>'."\n";
589
+    $str  = '<div class="bigbluebuttonbn overview">' . "\n";
590
+    $str .= '  <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ':&nbsp;' . "\n";
591
+    $str .= '    <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule .
592
+      '">' . $bigbluebuttonbn->name . '</a>' . "\n";
593
+    $str .= '  </div>' . "\n";
594
+    $str .= '  <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) .
595
+        '</div>' . "\n";
596
+    $str .= '  <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime)
597
+      .'</div>' . "\n";
598
+    $str .= '</div>' . "\n";
599 599
     return $str;
600 600
 }
601 601
 
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
  * @return void
684 684
  **/
685 685
 function bigbluebuttonbn_process_pre_save_instance(&$bigbluebuttonbn) {
686
-    require_once(__DIR__.'/locallib.php');
686
+    require_once(__DIR__ . '/locallib.php');
687 687
     $bigbluebuttonbn->timemodified = time();
688 688
     if ((integer)$bigbluebuttonbn->instance == 0) {
689 689
         $bigbluebuttonbn->meetingid = 0;
@@ -786,7 +786,7 @@  discard block
 block discarded – undo
786 786
  **/
787 787
 function bigbluebuttonbn_process_post_save_event(&$bigbluebuttonbn) {
788 788
     global $CFG, $DB;
789
-    require_once($CFG->dirroot.'/calendar/lib.php');
789
+    require_once($CFG->dirroot . '/calendar/lib.php');
790 790
     $eventid = $DB->get_field('event', 'id', array('modulename' => 'bigbluebuttonbn',
791 791
         'instance' => $bigbluebuttonbn->id));
792 792
     // Delete the event from calendar when/if openingtime is NOT set.
@@ -872,7 +872,7 @@  discard block
 block discarded – undo
872 872
     if (count($files) == 1) {
873 873
         // Get the first (and only) file.
874 874
         $file = reset($files);
875
-        $filesrc = '/'.$file->get_filename();
875
+        $filesrc = '/' . $file->get_filename();
876 876
     }
877 877
     return $filesrc;
878 878
 }
@@ -941,7 +941,7 @@  discard block
 block discarded – undo
941 941
     if (!$filename) {
942 942
         return false;
943 943
     }
944
-    $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename;
944
+    $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename;
945 945
     $fs = get_file_storage();
946 946
     $file = $fs->get_file_by_hash(sha1($fullpath));
947 947
     if (!$file || $file->is_directory()) {
Please login to merge, or discard this patch.
classes/locallib/notifier.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
      *
112 112
      * @param object $bigbluebuttonbn
113 113
      *
114
-     * @return void
114
+     * @return string
115 115
      */
116 116
     public static function htmlmsg_recording_ready($bigbluebuttonbn) {
117 117
         return '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -44,29 +44,29 @@  discard block
 block discarded – undo
44 44
      * @return string
45 45
      */
46 46
     public static function htmlmsg_instance_updated($msg) {
47
-        $messagetext = '<p>'.$msg->activity_type.' "'.$msg->activity_title.'" '.
48
-            get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn').' '.$msg->action.'.</p>'."\n";
49
-        $messagetext .= '<p><b>'.$msg->activity_title.'</b> '.
50
-            get_string('email_body_notification_meeting_details', 'bigbluebuttonbn').':'."\n";
51
-        $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>'."\n";
52
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
53
-            get_string('email_body_notification_meeting_title', 'bigbluebuttonbn').': </td><td>'."\n";
54
-        $messagetext .= $msg->activity_title.'</td></tr>'."\n";
55
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
56
-            get_string('email_body_notification_meeting_description', 'bigbluebuttonbn').': </td><td>'."\n";
57
-        $messagetext .= $msg->activity_description.'</td></tr>'."\n";
58
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
59
-            get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn').': </td><td>'."\n";
60
-        $messagetext .= $msg->activity_openingtime.'</td></tr>'."\n";
61
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
62
-            get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn').': </td><td>'."\n";
63
-        $messagetext .= $msg->activity_closingtime.'</td></tr>'."\n";
64
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.$msg->action.' '.
65
-            get_string('email_body_notification_meeting_by', 'bigbluebuttonbn').': </td><td>'."\n";
66
-        $messagetext .= $msg->activity_owner.'</td></tr></tbody></table></p>'."\n";
67
-        $messagetext .= '<p><hr/><br/>'.get_string('email_footer_sent_by', 'bigbluebuttonbn').' '.
68
-            $msg->user_name.'('.$msg->user_email.') ';
69
-        $messagetext .= get_string('email_footer_sent_from', 'bigbluebuttonbn').' '.$msg->course_name.'.</p>';
47
+        $messagetext = '<p>' . $msg->activity_type . ' "' . $msg->activity_title . '" ' .
48
+            get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn') . ' ' . $msg->action . '.</p>' . "\n";
49
+        $messagetext .= '<p><b>' . $msg->activity_title . '</b> ' .
50
+            get_string('email_body_notification_meeting_details', 'bigbluebuttonbn') . ':' . "\n";
51
+        $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>' . "\n";
52
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
53
+            get_string('email_body_notification_meeting_title', 'bigbluebuttonbn') . ': </td><td>' . "\n";
54
+        $messagetext .= $msg->activity_title . '</td></tr>' . "\n";
55
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
56
+            get_string('email_body_notification_meeting_description', 'bigbluebuttonbn') . ': </td><td>' . "\n";
57
+        $messagetext .= $msg->activity_description . '</td></tr>' . "\n";
58
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
59
+            get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn') . ': </td><td>' . "\n";
60
+        $messagetext .= $msg->activity_openingtime . '</td></tr>' . "\n";
61
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
62
+            get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn') . ': </td><td>' . "\n";
63
+        $messagetext .= $msg->activity_closingtime . '</td></tr>' . "\n";
64
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . $msg->action . ' ' .
65
+            get_string('email_body_notification_meeting_by', 'bigbluebuttonbn') . ': </td><td>' . "\n";
66
+        $messagetext .= $msg->activity_owner . '</td></tr></tbody></table></p>' . "\n";
67
+        $messagetext .= '<p><hr/><br/>' . get_string('email_footer_sent_by', 'bigbluebuttonbn') . ' ' .
68
+            $msg->user_name . '(' . $msg->user_email . ') ';
69
+        $messagetext .= get_string('email_footer_sent_from', 'bigbluebuttonbn') . ' ' . $msg->course_name . '.</p>';
70 70
         return $messagetext;
71 71
     }
72 72
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $course = $coursemodinfo->get_course($bigbluebuttonbn->course);
84 84
         $sender = $USER;
85 85
         // Prepare message.
86
-        $msg = (object) array();
86
+        $msg = (object)array();
87 87
         // Build the message_body.
88 88
         $msg->action = $action;
89 89
         $msg->activity_type = '';
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
      * @return void
115 115
      */
116 116
     public static function htmlmsg_recording_ready($bigbluebuttonbn) {
117
-        return '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
118
-            ' &quot;' . $bigbluebuttonbn->name . '&quot; '.
119
-            get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>';
117
+        return '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') .
118
+            ' &quot;' . $bigbluebuttonbn->name . '&quot; ' .
119
+            get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>';
120 120
     }
121 121
 
122 122
     /**
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                     // Enqueue it.
159 159
                     \core\task\manager::queue_adhoc_task($task);
160 160
                 } catch (Exception $e) {
161
-                    mtrace("Error while enqueuing completion_uopdate_state task. " . (string) $e);
161
+                    mtrace("Error while enqueuing completion_uopdate_state task. " . (string)$e);
162 162
                 }
163 163
             }
164 164
         }
Please login to merge, or discard this patch.