@@ -219,8 +219,8 @@ discard block  | 
                                                    ||
| 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  | 
                                                    ||
| 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  | 
                                                    ||
| 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  | 
                                                    ||
| 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  | 
                                                    ||
| 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  | 
                                                    ||
| 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  | 
                                                    ||
| 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 . '  ' . $htmlselectionoptions . '  ' . $htmlselectioninput, null);  | 
                                                        
| 408 | 408 |          $mform->addElement('html', "\n\n"); | 
                                                        
@@ -444,9 +444,9 @@ discard block  | 
                                                    ||
| 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;  | 
                                                        
@@ -47,7 +47,7 @@ discard block  | 
                                                    ||
| 47 | 47 |      public static function notification_process($context, $bigbluebuttonbn, $action) { | 
                                                        
| 48 | 48 | global $USER;  | 
                                                        
| 49 | 49 | // Prepare message.  | 
                                                        
| 50 | - $msg = (object) array();  | 
                                                        |
| 50 | + $msg = (object)array();  | 
                                                        |
| 51 | 51 | // Build the message_body.  | 
                                                        
| 52 | 52 | $msg->action = $action;  | 
                                                        
| 53 | 53 | $msg->activity_type = '';  | 
                                                        
@@ -72,26 +72,26 @@ discard block  | 
                                                    ||
| 72 | 72 | * @return string  | 
                                                        
| 73 | 73 | */  | 
                                                        
| 74 | 74 |      public static function notification_msg_html($msg) { | 
                                                        
| 75 | - $messagetext = '<p>'.$msg->activity_type.' "'.$msg->activity_title.'" '.  | 
                                                        |
| 76 | -            get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn').' '.$msg->action.'.</p>'."\n"; | 
                                                        |
| 77 | - $messagetext .= '<p><b>'.$msg->activity_title.'</b> '.  | 
                                                        |
| 78 | -            get_string('email_body_notification_meeting_details', 'bigbluebuttonbn').':'."\n"; | 
                                                        |
| 79 | - $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>'."\n";  | 
                                                        |
| 80 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.  | 
                                                        |
| 81 | -            get_string('email_body_notification_meeting_title', 'bigbluebuttonbn').': </td><td>'."\n"; | 
                                                        |
| 82 | - $messagetext .= $msg->activity_title.'</td></tr>'."\n";  | 
                                                        |
| 83 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.  | 
                                                        |
| 84 | -            get_string('email_body_notification_meeting_description', 'bigbluebuttonbn').': </td><td>'."\n"; | 
                                                        |
| 85 | - $messagetext .= $msg->activity_description.'</td></tr>'."\n";  | 
                                                        |
| 86 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.  | 
                                                        |
| 87 | -            get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn').': </td><td>'."\n"; | 
                                                        |
| 88 | - $messagetext .= $msg->activity_openingtime.'</td></tr>'."\n";  | 
                                                        |
| 89 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.  | 
                                                        |
| 90 | -            get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn').': </td><td>'."\n"; | 
                                                        |
| 91 | - $messagetext .= $msg->activity_closingtime.'</td></tr>'."\n";  | 
                                                        |
| 92 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.$msg->action.' '.  | 
                                                        |
| 93 | -            get_string('email_body_notification_meeting_by', 'bigbluebuttonbn').': </td><td>'."\n"; | 
                                                        |
| 94 | - $messagetext .= $msg->activity_owner.'</td></tr></tbody></table></p>'."\n";  | 
                                                        |
| 75 | + $messagetext = '<p>' . $msg->activity_type . ' "' . $msg->activity_title . '" ' .  | 
                                                        |
| 76 | +            get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn') . ' ' . $msg->action . '.</p>' . "\n"; | 
                                                        |
| 77 | + $messagetext .= '<p><b>' . $msg->activity_title . '</b> ' .  | 
                                                        |
| 78 | +            get_string('email_body_notification_meeting_details', 'bigbluebuttonbn') . ':' . "\n"; | 
                                                        |
| 79 | + $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>' . "\n";  | 
                                                        |
| 80 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .  | 
                                                        |
| 81 | +            get_string('email_body_notification_meeting_title', 'bigbluebuttonbn') . ': </td><td>' . "\n"; | 
                                                        |
| 82 | + $messagetext .= $msg->activity_title . '</td></tr>' . "\n";  | 
                                                        |
| 83 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .  | 
                                                        |
| 84 | +            get_string('email_body_notification_meeting_description', 'bigbluebuttonbn') . ': </td><td>' . "\n"; | 
                                                        |
| 85 | + $messagetext .= $msg->activity_description . '</td></tr>' . "\n";  | 
                                                        |
| 86 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .  | 
                                                        |
| 87 | +            get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn') . ': </td><td>' . "\n"; | 
                                                        |
| 88 | + $messagetext .= $msg->activity_openingtime . '</td></tr>' . "\n";  | 
                                                        |
| 89 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .  | 
                                                        |
| 90 | +            get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn') . ': </td><td>' . "\n"; | 
                                                        |
| 91 | + $messagetext .= $msg->activity_closingtime . '</td></tr>' . "\n";  | 
                                                        |
| 92 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . $msg->action . ' ' .  | 
                                                        |
| 93 | +            get_string('email_body_notification_meeting_by', 'bigbluebuttonbn') . ': </td><td>' . "\n"; | 
                                                        |
| 94 | + $messagetext .= $msg->activity_owner . '</td></tr></tbody></table></p>' . "\n";  | 
                                                        |
| 95 | 95 | return $messagetext;  | 
                                                        
| 96 | 96 | }  | 
                                                        
| 97 | 97 | |
@@ -108,13 +108,13 @@ discard block  | 
                                                    ||
| 108 | 108 | global $DB;  | 
                                                        
| 109 | 109 |          $course = $DB->get_record('course', array('id' => $bigbluebuttonbn->course), '*', MUST_EXIST); | 
                                                        
| 110 | 110 | // Complete message.  | 
                                                        
| 111 | - $msg = (object) array();  | 
                                                        |
| 111 | + $msg = (object)array();  | 
                                                        |
| 112 | 112 | $msg->user_name = fullname($sender);  | 
                                                        
| 113 | 113 | $msg->user_email = $sender->email;  | 
                                                        
| 114 | 114 | $msg->course_name = $course->fullname;  | 
                                                        
| 115 | -        $message .= '<p><hr/><br/>'.get_string('email_footer_sent_by', 'bigbluebuttonbn').' '. | 
                                                        |
| 116 | -            $msg->user_name.'('.$msg->user_email.') '; | 
                                                        |
| 117 | -        $message .= get_string('email_footer_sent_from', 'bigbluebuttonbn').' '.$msg->course_name.'.</p>'; | 
                                                        |
| 115 | +        $message .= '<p><hr/><br/>' . get_string('email_footer_sent_by', 'bigbluebuttonbn') . ' ' . | 
                                                        |
| 116 | +            $msg->user_name . '(' . $msg->user_email . ') '; | 
                                                        |
| 117 | +        $message .= get_string('email_footer_sent_from', 'bigbluebuttonbn') . ' ' . $msg->course_name . '.</p>'; | 
                                                        |
| 118 | 118 | // Process the message sending.  | 
                                                        
| 119 | 119 |          foreach (self::users_to_notify($context, $instance) as $user) { | 
                                                        
| 120 | 120 |              if ($user->id != $sender->id) { | 
                                                        
@@ -131,7 +131,7 @@ discard block  | 
                                                    ||
| 131 | 131 | * @return array  | 
                                                        
| 132 | 132 | */  | 
                                                        
| 133 | 133 |      public static function users_to_notify($context, $course) { | 
                                                        
| 134 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);  | 
                                                        |
| 134 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);  | 
                                                        |
| 135 | 135 | $modinfo = get_fast_modinfo($course);  | 
                                                        
| 136 | 136 | $coursemodule = $modinfo->get_cm($context->instanceid);  | 
                                                        
| 137 | 137 | $info = new \core_availability\info_module($coursemodule);  | 
                                                        
@@ -28,23 +28,23 @@ discard block  | 
                                                    ||
| 28 | 28 | |
| 29 | 29 | global $CFG;  | 
                                                        
| 30 | 30 | |
| 31 | -require_once($CFG->dirroot.'/calendar/lib.php');  | 
                                                        |
| 32 | -require_once($CFG->dirroot.'/message/lib.php');  | 
                                                        |
| 33 | -require_once($CFG->dirroot.'/mod/lti/OAuth.php');  | 
                                                        |
| 34 | -require_once($CFG->dirroot.'/tag/lib.php');  | 
                                                        |
| 35 | -require_once($CFG->libdir.'/accesslib.php');  | 
                                                        |
| 36 | -require_once($CFG->libdir.'/completionlib.php');  | 
                                                        |
| 37 | -require_once($CFG->libdir.'/datalib.php');  | 
                                                        |
| 38 | -require_once($CFG->libdir.'/enrollib.php');  | 
                                                        |
| 39 | -require_once($CFG->libdir.'/filelib.php');  | 
                                                        |
| 40 | -require_once($CFG->libdir.'/formslib.php');  | 
                                                        |
| 31 | +require_once($CFG->dirroot . '/calendar/lib.php');  | 
                                                        |
| 32 | +require_once($CFG->dirroot . '/message/lib.php');  | 
                                                        |
| 33 | +require_once($CFG->dirroot . '/mod/lti/OAuth.php');  | 
                                                        |
| 34 | +require_once($CFG->dirroot . '/tag/lib.php');  | 
                                                        |
| 35 | +require_once($CFG->libdir . '/accesslib.php');  | 
                                                        |
| 36 | +require_once($CFG->libdir . '/completionlib.php');  | 
                                                        |
| 37 | +require_once($CFG->libdir . '/datalib.php');  | 
                                                        |
| 38 | +require_once($CFG->libdir . '/enrollib.php');  | 
                                                        |
| 39 | +require_once($CFG->libdir . '/filelib.php');  | 
                                                        |
| 40 | +require_once($CFG->libdir . '/formslib.php');  | 
                                                        |
| 41 | 41 | |
| 42 | 42 | // JWT is included in Moodle 3.7 core, but a local package is still needed for backward compatibility.  | 
                                                        
| 43 | 43 |  if (!class_exists('\Firebase\JWT\JWT')) { | 
                                                        
| 44 | -    if (file_exists($CFG->libdir.'/php-jwt/src/JWT.php')) { | 
                                                        |
| 45 | - require_once($CFG->libdir.'/php-jwt/src/JWT.php');  | 
                                                        |
| 44 | +    if (file_exists($CFG->libdir . '/php-jwt/src/JWT.php')) { | 
                                                        |
| 45 | + require_once($CFG->libdir . '/php-jwt/src/JWT.php');  | 
                                                        |
| 46 | 46 |      } else { | 
                                                        
| 47 | - require_once($CFG->dirroot.'/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php');  | 
                                                        |
| 47 | + require_once($CFG->dirroot . '/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php');  | 
                                                        |
| 48 | 48 | }  | 
                                                        
| 49 | 49 | }  | 
                                                        
| 50 | 50 | |
@@ -52,8 +52,8 @@ discard block  | 
                                                    ||
| 52 | 52 | $CFG->bigbluebuttonbn = array();  | 
                                                        
| 53 | 53 | }  | 
                                                        
| 54 | 54 | |
| 55 | -if (file_exists(dirname(__FILE__).'/config.php')) { | 
                                                        |
| 56 | - require_once(dirname(__FILE__).'/config.php');  | 
                                                        |
| 55 | +if (file_exists(dirname(__FILE__) . '/config.php')) { | 
                                                        |
| 56 | + require_once(dirname(__FILE__) . '/config.php');  | 
                                                        |
| 57 | 57 | }  | 
                                                        
| 58 | 58 | |
| 59 | 59 | /*  | 
                                                        
@@ -108,18 +108,18 @@ discard block  | 
                                                    ||
| 108 | 108 | return null;  | 
                                                        
| 109 | 109 | }  | 
                                                        
| 110 | 110 | $features = array(  | 
                                                        
| 111 | - (string) FEATURE_IDNUMBER => true,  | 
                                                        |
| 112 | - (string) FEATURE_GROUPS => true,  | 
                                                        |
| 113 | - (string) FEATURE_GROUPINGS => true,  | 
                                                        |
| 114 | - (string) FEATURE_GROUPMEMBERSONLY => true,  | 
                                                        |
| 115 | - (string) FEATURE_MOD_INTRO => true,  | 
                                                        |
| 116 | - (string) FEATURE_BACKUP_MOODLE2 => true,  | 
                                                        |
| 117 | - (string) FEATURE_COMPLETION_TRACKS_VIEWS => true,  | 
                                                        |
| 118 | - (string) FEATURE_GRADE_HAS_GRADE => false,  | 
                                                        |
| 119 | - (string) FEATURE_GRADE_OUTCOMES => false,  | 
                                                        |
| 120 | - (string) FEATURE_SHOW_DESCRIPTION => true,  | 
                                                        |
| 111 | + (string)FEATURE_IDNUMBER => true,  | 
                                                        |
| 112 | + (string)FEATURE_GROUPS => true,  | 
                                                        |
| 113 | + (string)FEATURE_GROUPINGS => true,  | 
                                                        |
| 114 | + (string)FEATURE_GROUPMEMBERSONLY => true,  | 
                                                        |
| 115 | + (string)FEATURE_MOD_INTRO => true,  | 
                                                        |
| 116 | + (string)FEATURE_BACKUP_MOODLE2 => true,  | 
                                                        |
| 117 | + (string)FEATURE_COMPLETION_TRACKS_VIEWS => true,  | 
                                                        |
| 118 | + (string)FEATURE_GRADE_HAS_GRADE => false,  | 
                                                        |
| 119 | + (string)FEATURE_GRADE_OUTCOMES => false,  | 
                                                        |
| 120 | + (string)FEATURE_SHOW_DESCRIPTION => true,  | 
                                                        |
| 121 | 121 | );  | 
                                                        
| 122 | -    if (isset($features[(string) $feature])) { | 
                                                        |
| 122 | +    if (isset($features[(string)$feature])) { | 
                                                        |
| 123 | 123 | return $features[$feature];  | 
                                                        
| 124 | 124 | }  | 
                                                        
| 125 | 125 | return null;  | 
                                                        
@@ -225,7 +225,7 @@ discard block  | 
                                                    ||
| 225 | 225 |  function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { | 
                                                        
| 226 | 226 | global $DB;  | 
                                                        
| 227 | 227 |      $sql  = "SELECT * FROM {bigbluebuttonbn_logs} "; | 
                                                        
| 228 | -    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?"; | 
                                                        |
| 228 | +    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?"; | 
                                                        |
| 229 | 229 |      $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}")); | 
                                                        
| 230 | 230 |      $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}"; | 
                                                        
| 231 | 231 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta);  | 
                                                        
@@ -245,8 +245,8 @@ discard block  | 
                                                    ||
| 245 | 245 | */  | 
                                                        
| 246 | 246 |  function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { | 
                                                        
| 247 | 247 |      if ($completed = bigbluebuttonbn_user_complete($course, $user, $mod, $bigbluebuttonbn)) { | 
                                                        
| 248 | -        return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '. | 
                                                        |
| 249 | -            get_string('view_message_session_for', 'bigbluebuttonbn').' '.(string) $completed.' '. | 
                                                        |
| 248 | +        return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' . | 
                                                        |
| 249 | +            get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' . | 
                                                        |
| 250 | 250 |              get_string('view_message_times', 'bigbluebuttonbn'); | 
                                                        
| 251 | 251 | }  | 
                                                        
| 252 | 252 | return '';  | 
                                                        
@@ -436,7 +436,7 @@ discard block  | 
                                                    ||
| 436 | 436 | * @return array status array  | 
                                                        
| 437 | 437 | */  | 
                                                        
| 438 | 438 |  function bigbluebuttonbn_reset_recordings($courseid) { | 
                                                        
| 439 | - require_once(__DIR__.'/locallib.php');  | 
                                                        |
| 439 | + require_once(__DIR__ . '/locallib.php');  | 
                                                        |
| 440 | 440 | // Criteria for search [courseid | bigbluebuttonbn=null | subset=false | includedeleted=true].  | 
                                                        
| 441 | 441 | $recordings = bigbluebuttonbn_get_recordings($courseid, null, false, true);  | 
                                                        
| 442 | 442 | // Remove all the recordings.  | 
                                                        
@@ -504,16 +504,16 @@ discard block  | 
                                                    ||
| 504 | 504 |      if ($bigbluebuttonbn->visible) { | 
                                                        
| 505 | 505 | $classes = 'class="dimmed" ';  | 
                                                        
| 506 | 506 | }  | 
                                                        
| 507 | - $str = '<div class="bigbluebuttonbn overview">'."\n";  | 
                                                        |
| 508 | -    $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; | 
                                                        |
| 509 | - $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.  | 
                                                        |
| 510 | - '">'.$bigbluebuttonbn->name.'</a>'."\n";  | 
                                                        |
| 511 | - $str .= ' </div>'."\n";  | 
                                                        |
| 512 | - $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).  | 
                                                        |
| 513 | - '</div>'."\n";  | 
                                                        |
| 514 | -    $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) | 
                                                        |
| 515 | - .'</div>'."\n";  | 
                                                        |
| 516 | - $str .= '</div>'."\n";  | 
                                                        |
| 507 | + $str = '<div class="bigbluebuttonbn overview">' . "\n";  | 
                                                        |
| 508 | +    $str .= '  <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ': ' . "\n"; | 
                                                        |
| 509 | + $str .= ' <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule .  | 
                                                        |
| 510 | + '">' . $bigbluebuttonbn->name . '</a>' . "\n";  | 
                                                        |
| 511 | + $str .= ' </div>' . "\n";  | 
                                                        |
| 512 | + $str .= ' <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) .  | 
                                                        |
| 513 | + '</div>' . "\n";  | 
                                                        |
| 514 | +    $str .= '  <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime) | 
                                                        |
| 515 | + .'</div>' . "\n";  | 
                                                        |
| 516 | + $str .= '</div>' . "\n";  | 
                                                        |
| 517 | 517 | return $str;  | 
                                                        
| 518 | 518 | }  | 
                                                        
| 519 | 519 | |
@@ -745,7 +745,7 @@ discard block  | 
                                                    ||
| 745 | 745 |      if (count($files) == 1) { | 
                                                        
| 746 | 746 | // Get the first (and only) file.  | 
                                                        
| 747 | 747 | $file = reset($files);  | 
                                                        
| 748 | - $filesrc = '/'.$file->get_filename();  | 
                                                        |
| 748 | + $filesrc = '/' . $file->get_filename();  | 
                                                        |
| 749 | 749 | }  | 
                                                        
| 750 | 750 | return $filesrc;  | 
                                                        
| 751 | 751 | }  | 
                                                        
@@ -814,7 +814,7 @@ discard block  | 
                                                    ||
| 814 | 814 |      if (!$filename) { | 
                                                        
| 815 | 815 | return false;  | 
                                                        
| 816 | 816 | }  | 
                                                        
| 817 | - $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename;  | 
                                                        |
| 817 | + $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename;  | 
                                                        |
| 818 | 818 | $fs = get_file_storage();  | 
                                                        
| 819 | 819 | $file = $fs->get_file_by_hash(sha1($fullpath));  | 
                                                        
| 820 | 820 |      if (!$file || $file->is_directory()) { |