@@ -98,7 +98,7 @@ discard block  | 
                                                    ||
| 98 | 98 | * @uses FEATURE_GRADE_OUTCOMES  | 
                                                        
| 99 | 99 | * @uses FEATURE_SHOW_DESCRIPTION  | 
                                                        
| 100 | 100 | * @param string $feature  | 
                                                        
| 101 | - * @return mixed True if yes (some features may use other values)  | 
                                                        |
| 101 | + * @return null|boolean True if yes (some features may use other values)  | 
                                                        |
| 102 | 102 | */  | 
                                                        
| 103 | 103 |  function bigbluebuttonbn_supports($feature) { | 
                                                        
| 104 | 104 |      if (!$feature) { | 
                                                        
@@ -183,7 +183,7 @@ discard block  | 
                                                    ||
| 183 | 183 | *  | 
                                                        
| 184 | 184 | * @param int $id Id of the module instance  | 
                                                        
| 185 | 185 | *  | 
                                                        
| 186 | - * @return bool Success/Failure  | 
                                                        |
| 186 | + * @return boolean|null Success/Failure  | 
                                                        |
| 187 | 187 | */  | 
                                                        
| 188 | 188 |  function bigbluebuttonbn_delete_instance($id) { | 
                                                        
| 189 | 189 | global $DB;  | 
                                                        
@@ -210,7 +210,7 @@ discard block  | 
                                                    ||
| 210 | 210 | *  | 
                                                        
| 211 | 211 | * @param object $bigbluebuttonbn Id of the module instance  | 
                                                        
| 212 | 212 | *  | 
                                                        
| 213 | - * @return bool Success/Failure  | 
                                                        |
| 213 | + * @return boolean|null Success/Failure  | 
                                                        |
| 214 | 214 | */  | 
                                                        
| 215 | 215 |  function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { | 
                                                        
| 216 | 216 | global $DB;  | 
                                                        
@@ -231,7 +231,7 @@ discard block  | 
                                                    ||
| 231 | 231 | * @param object $mod  | 
                                                        
| 232 | 232 | * @param object $bigbluebuttonbn  | 
                                                        
| 233 | 233 | *  | 
                                                        
| 234 | - * @return bool  | 
                                                        |
| 234 | + * @return string  | 
                                                        |
| 235 | 235 | */  | 
                                                        
| 236 | 236 |  function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { | 
                                                        
| 237 | 237 |      if ($completed = bigbluebuttonbn_user_complete($course, $user, $mod, $bigbluebuttonbn)) { | 
                                                        
@@ -251,7 +251,7 @@ discard block  | 
                                                    ||
| 251 | 251 | * @param object $mod  | 
                                                        
| 252 | 252 | * @param object $bigbluebuttonbn  | 
                                                        
| 253 | 253 | *  | 
                                                        
| 254 | - * @return bool  | 
                                                        |
| 254 | + * @return integer  | 
                                                        |
| 255 | 255 | */  | 
                                                        
| 256 | 256 |  function bigbluebuttonbn_user_complete($courseorid, $userorid, $mod, $bigbluebuttonbn) { | 
                                                        
| 257 | 257 | global $DB;  | 
                                                        
@@ -624,7 +624,7 @@ discard block  | 
                                                    ||
| 624 | 624 | * @param stdClass $context context object  | 
                                                        
| 625 | 625 | * @param string $filearea file area  | 
                                                        
| 626 | 626 | *  | 
                                                        
| 627 | - * @return false|null false if file not valid  | 
                                                        |
| 627 | + * @return boolean false if file not valid  | 
                                                        |
| 628 | 628 | */  | 
                                                        
| 629 | 629 |  function bigbluebuttonbn_pluginfile_valid($context, $filearea) { | 
                                                        
| 630 | 630 | |
@@ -61,7 +61,7 @@ discard block  | 
                                                    ||
| 61 | 61 | * Remove this block when restored  | 
                                                        
| 62 | 62 | */  | 
                                                        
| 63 | 63 | |
| 64 | - /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */  | 
                                                        |
| 64 | + /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */  | 
                                                        |
| 65 | 65 | const BIGBLUEBUTTONBN_DEFAULT_SERVER_URL = 'http://test-install.blindsidenetworks.com/bigbluebutton/';  | 
                                                        
| 66 | 66 | /** @var BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET string of default bigbluebutton server shared secret */  | 
                                                        
| 67 | 67 | const BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET = '8cd8ef52e8e101574e400365b55e11a6';  | 
                                                        
@@ -268,7 +268,7 @@ discard block  | 
                                                    ||
| 268 | 268 |      $sql = "SELECT count(*) FROM {bigbluebuttonbn_logs} "; | 
                                                        
| 269 | 269 | $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)";  | 
                                                        
| 270 | 270 | $result = $DB->get_record_sql($sql, array($course->id, $bigbluebuttonbn->id, $user->id,  | 
                                                        
| 271 | - BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));  | 
                                                        |
| 271 | + BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));  | 
                                                        |
| 272 | 272 | return (int)$result->count;  | 
                                                        
| 273 | 273 | }  | 
                                                        
| 274 | 274 | |
@@ -356,12 +356,12 @@ discard block  | 
                                                    ||
| 356 | 356 | $str = '<div class="bigbluebuttonbn overview">'."\n";  | 
                                                        
| 357 | 357 |      $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; | 
                                                        
| 358 | 358 | $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.  | 
                                                        
| 359 | - '">'.$bigbluebuttonbn->name.'</a>'."\n";  | 
                                                        |
| 359 | + '">'.$bigbluebuttonbn->name.'</a>'."\n";  | 
                                                        |
| 360 | 360 | $str .= ' </div>'."\n";  | 
                                                        
| 361 | 361 | $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).  | 
                                                        
| 362 | 362 | '</div>'."\n";  | 
                                                        
| 363 | 363 |      $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) | 
                                                        
| 364 | - .'</div>'."\n";  | 
                                                        |
| 364 | + .'</div>'."\n";  | 
                                                        |
| 365 | 365 | $str .= '</div>'."\n";  | 
                                                        
| 366 | 366 | return $str;  | 
                                                        
| 367 | 367 | }  | 
                                                        
@@ -559,7 +559,7 @@ discard block  | 
                                                    ||
| 559 | 559 | $bigbluebuttonbn->coursemodule,  | 
                                                        
| 560 | 560 | 'bigbluebuttonbn',  | 
                                                        
| 561 | 561 | $bigbluebuttonbn->id, $bigbluebuttonbn->completionexpected  | 
                                                        
| 562 | - );  | 
                                                        |
| 562 | + );  | 
                                                        |
| 563 | 563 | }  | 
                                                        
| 564 | 564 | }  | 
                                                        
| 565 | 565 | /**  | 
                                                        
@@ -28,29 +28,29 @@ 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 | |
| 43 | 43 |  if (!class_exists('\Firebase\JWT\JWT') && | 
                                                        
| 44 | -    file_exists(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.php')) { | 
                                                        |
| 45 | - require_once(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.php');  | 
                                                        |
| 44 | +    file_exists(dirname(__FILE__) . '/vendor/firebase/php-jwt/src/JWT.php')) { | 
                                                        |
| 45 | + require_once(dirname(__FILE__) . '/vendor/firebase/php-jwt/src/JWT.php');  | 
                                                        |
| 46 | 46 | }  | 
                                                        
| 47 | 47 | |
| 48 | 48 |  if (!isset($CFG->bigbluebuttonbn)) { | 
                                                        
| 49 | 49 | $CFG->bigbluebuttonbn = array();  | 
                                                        
| 50 | 50 | }  | 
                                                        
| 51 | 51 | |
| 52 | -if (file_exists(dirname(__FILE__).'/config.php')) { | 
                                                        |
| 53 | - require_once(dirname(__FILE__).'/config.php');  | 
                                                        |
| 52 | +if (file_exists(dirname(__FILE__) . '/config.php')) { | 
                                                        |
| 53 | + require_once(dirname(__FILE__) . '/config.php');  | 
                                                        |
| 54 | 54 | }  | 
                                                        
| 55 | 55 | |
| 56 | 56 | /*  | 
                                                        
@@ -105,18 +105,18 @@ discard block  | 
                                                    ||
| 105 | 105 | return null;  | 
                                                        
| 106 | 106 | }  | 
                                                        
| 107 | 107 | $features = array(  | 
                                                        
| 108 | - (string) FEATURE_IDNUMBER => true,  | 
                                                        |
| 109 | - (string) FEATURE_GROUPS => true,  | 
                                                        |
| 110 | - (string) FEATURE_GROUPINGS => true,  | 
                                                        |
| 111 | - (string) FEATURE_GROUPMEMBERSONLY => true,  | 
                                                        |
| 112 | - (string) FEATURE_MOD_INTRO => true,  | 
                                                        |
| 113 | - (string) FEATURE_BACKUP_MOODLE2 => true,  | 
                                                        |
| 114 | - (string) FEATURE_COMPLETION_TRACKS_VIEWS => true,  | 
                                                        |
| 115 | - (string) FEATURE_GRADE_HAS_GRADE => false,  | 
                                                        |
| 116 | - (string) FEATURE_GRADE_OUTCOMES => false,  | 
                                                        |
| 117 | - (string) FEATURE_SHOW_DESCRIPTION => true,  | 
                                                        |
| 108 | + (string)FEATURE_IDNUMBER => true,  | 
                                                        |
| 109 | + (string)FEATURE_GROUPS => true,  | 
                                                        |
| 110 | + (string)FEATURE_GROUPINGS => true,  | 
                                                        |
| 111 | + (string)FEATURE_GROUPMEMBERSONLY => true,  | 
                                                        |
| 112 | + (string)FEATURE_MOD_INTRO => true,  | 
                                                        |
| 113 | + (string)FEATURE_BACKUP_MOODLE2 => true,  | 
                                                        |
| 114 | + (string)FEATURE_COMPLETION_TRACKS_VIEWS => true,  | 
                                                        |
| 115 | + (string)FEATURE_GRADE_HAS_GRADE => false,  | 
                                                        |
| 116 | + (string)FEATURE_GRADE_OUTCOMES => false,  | 
                                                        |
| 117 | + (string)FEATURE_SHOW_DESCRIPTION => true,  | 
                                                        |
| 118 | 118 | );  | 
                                                        
| 119 | -    if (isset($features[(string) $feature])) { | 
                                                        |
| 119 | +    if (isset($features[(string)$feature])) { | 
                                                        |
| 120 | 120 | return $features[$feature];  | 
                                                        
| 121 | 121 | }  | 
                                                        
| 122 | 122 | return null;  | 
                                                        
@@ -215,7 +215,7 @@ discard block  | 
                                                    ||
| 215 | 215 |  function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { | 
                                                        
| 216 | 216 | global $DB;  | 
                                                        
| 217 | 217 |      $sql  = "SELECT * FROM {bigbluebuttonbn_logs} "; | 
                                                        
| 218 | -    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?"; | 
                                                        |
| 218 | +    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?"; | 
                                                        |
| 219 | 219 |      $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}")); | 
                                                        
| 220 | 220 |      $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}"; | 
                                                        
| 221 | 221 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta);  | 
                                                        
@@ -235,8 +235,8 @@ discard block  | 
                                                    ||
| 235 | 235 | */  | 
                                                        
| 236 | 236 |  function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { | 
                                                        
| 237 | 237 |      if ($completed = bigbluebuttonbn_user_complete($course, $user, $mod, $bigbluebuttonbn)) { | 
                                                        
| 238 | -        return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '. | 
                                                        |
| 239 | -            get_string('view_message_session_for', 'bigbluebuttonbn').' '.(string) $completed.' '. | 
                                                        |
| 238 | +        return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' . | 
                                                        |
| 239 | +            get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' . | 
                                                        |
| 240 | 240 |              get_string('view_message_times', 'bigbluebuttonbn'); | 
                                                        
| 241 | 241 | }  | 
                                                        
| 242 | 242 | return '';  | 
                                                        
@@ -353,16 +353,16 @@ discard block  | 
                                                    ||
| 353 | 353 |      if ($bigbluebuttonbn->visible) { | 
                                                        
| 354 | 354 | $classes = 'class="dimmed" ';  | 
                                                        
| 355 | 355 | }  | 
                                                        
| 356 | - $str = '<div class="bigbluebuttonbn overview">'."\n";  | 
                                                        |
| 357 | -    $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; | 
                                                        |
| 358 | - $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.  | 
                                                        |
| 359 | - '">'.$bigbluebuttonbn->name.'</a>'."\n";  | 
                                                        |
| 360 | - $str .= ' </div>'."\n";  | 
                                                        |
| 361 | - $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).  | 
                                                        |
| 362 | - '</div>'."\n";  | 
                                                        |
| 363 | -    $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) | 
                                                        |
| 364 | - .'</div>'."\n";  | 
                                                        |
| 365 | - $str .= '</div>'."\n";  | 
                                                        |
| 356 | + $str = '<div class="bigbluebuttonbn overview">' . "\n";  | 
                                                        |
| 357 | +    $str .= '  <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ': ' . "\n"; | 
                                                        |
| 358 | + $str .= ' <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule .  | 
                                                        |
| 359 | + '">' . $bigbluebuttonbn->name . '</a>' . "\n";  | 
                                                        |
| 360 | + $str .= ' </div>' . "\n";  | 
                                                        |
| 361 | + $str .= ' <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) .  | 
                                                        |
| 362 | + '</div>' . "\n";  | 
                                                        |
| 363 | +    $str .= '  <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime) | 
                                                        |
| 364 | + .'</div>' . "\n";  | 
                                                        |
| 365 | + $str .= '</div>' . "\n";  | 
                                                        |
| 366 | 366 | return $str;  | 
                                                        
| 367 | 367 | }  | 
                                                        
| 368 | 368 | |
@@ -587,7 +587,7 @@ discard block  | 
                                                    ||
| 587 | 587 |      if (count($files) == 1) { | 
                                                        
| 588 | 588 | // Get the first (and only) file.  | 
                                                        
| 589 | 589 | $file = reset($files);  | 
                                                        
| 590 | - $filesrc = '/'.$file->get_filename();  | 
                                                        |
| 590 | + $filesrc = '/' . $file->get_filename();  | 
                                                        |
| 591 | 591 | }  | 
                                                        
| 592 | 592 | return $filesrc;  | 
                                                        
| 593 | 593 | }  | 
                                                        
@@ -656,7 +656,7 @@ discard block  | 
                                                    ||
| 656 | 656 |      if (!$filename) { | 
                                                        
| 657 | 657 | return false;  | 
                                                        
| 658 | 658 | }  | 
                                                        
| 659 | - $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename;  | 
                                                        |
| 659 | + $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename;  | 
                                                        |
| 660 | 660 | $fs = get_file_storage();  | 
                                                        
| 661 | 661 | $file = $fs->get_file_by_hash(sha1($fullpath));  | 
                                                        
| 662 | 662 |      if (!$file || $file->is_directory()) { | 
                                                        
@@ -23,8 +23,8 @@ discard block  | 
                                                    ||
| 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  | 
                                                    ||
| 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  | 
                                                    ||
| 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.  | 
                                                        
@@ -178,7 +178,7 @@ discard block  | 
                                                    ||
| 178 | 178 | }  | 
                                                        
| 179 | 179 | // If user is not administrator nor moderator (user is steudent) and waiting is required.  | 
                                                        
| 180 | 180 |          if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { | 
                                                        
| 181 | -            header('Location: '.$bbbsession['logoutURL']); | 
                                                        |
| 181 | +            header('Location: ' . $bbbsession['logoutURL']); | 
                                                        |
| 182 | 182 | break;  | 
                                                        
| 183 | 183 | }  | 
                                                        
| 184 | 184 | // As the meeting doesn't exist, try to create it.  | 
                                                        
@@ -192,16 +192,16 @@ discard block  | 
                                                    ||
| 192 | 192 | // The server is unreachable.  | 
                                                        
| 193 | 193 |              if ($bbbsession['administrator']) { | 
                                                        
| 194 | 194 |                  print_error('view_error_unable_join', 'bigbluebuttonbn', | 
                                                        
| 195 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');  | 
                                                        |
| 195 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');  | 
                                                        |
| 196 | 196 | break;  | 
                                                        
| 197 | 197 | }  | 
                                                        
| 198 | 198 |              if ($bbbsession['moderator']) { | 
                                                        
| 199 | 199 |                  print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', | 
                                                        
| 200 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');  | 
                                                        |
| 200 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');  | 
                                                        |
| 201 | 201 | break;  | 
                                                        
| 202 | 202 | }  | 
                                                        
| 203 | 203 |              print_error('view_error_unable_join_student', 'bigbluebuttonbn', | 
                                                        
| 204 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');  | 
                                                        |
| 204 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');  | 
                                                        |
| 205 | 205 | break;  | 
                                                        
| 206 | 206 | }  | 
                                                        
| 207 | 207 |          if ($response['returncode'] == 'FAILED') { | 
                                                        
@@ -222,7 +222,7 @@ discard block  | 
                                                    ||
| 222 | 222 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_create'], $bigbluebuttonbn);  | 
                                                        
| 223 | 223 | // Internal logger: Insert a record with the meeting created.  | 
                                                        
| 224 | 224 |          $overrides = array('meetingid' => $bbbsession['meetingid']); | 
                                                        
| 225 | -        $meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; | 
                                                        |
| 225 | +        $meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; | 
                                                        |
| 226 | 226 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_CREATE, $overrides, $meta);  | 
                                                        
| 227 | 227 | // Since the meeting is already running, we just join the session.  | 
                                                        
| 228 | 228 | bigbluebutton_bbb_view_join_meeting($bbbsession, $bigbluebuttonbn, $origin);  | 
                                                        
@@ -236,7 +236,7 @@ discard block  | 
                                                    ||
| 236 | 236 |          $overrides = array('meetingid' => $bbbsession['meetingid']); | 
                                                        
| 237 | 237 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_PLAYED, $overrides);  | 
                                                        
| 238 | 238 | // Execute the redirect.  | 
                                                        
| 239 | -        header('Location: '.urldecode($href)); | 
                                                        |
| 239 | +        header('Location: ' . urldecode($href)); | 
                                                        |
| 240 | 240 | break;  | 
                                                        
| 241 | 241 | default:  | 
                                                        
| 242 | 242 | bigbluebutton_bbb_view_close_window();  | 
                                                        
@@ -330,7 +330,7 @@ discard block  | 
                                                    ||
| 330 | 330 | $data['welcome'] .= '<br><br>';  | 
                                                        
| 331 | 331 | $data['welcome'] .= str_replace(  | 
                                                        
| 332 | 332 | '%duration%',  | 
                                                        
| 333 | - (string) $durationtime,  | 
                                                        |
| 333 | + (string)$durationtime,  | 
                                                        |
| 334 | 334 |              get_string('bbbdurationwarning', 'bigbluebuttonbn') | 
                                                        
| 335 | 335 | );  | 
                                                        
| 336 | 336 | }  | 
                                                        
@@ -420,7 +420,7 @@ discard block  | 
                                                    ||
| 420 | 420 | $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE);  | 
                                                        
| 421 | 421 |      if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) { | 
                                                        
| 422 | 422 | // No more users allowed to join.  | 
                                                        
| 423 | -        header('Location: '.$bbbsession['logoutURL']); | 
                                                        |
| 423 | +        header('Location: ' . $bbbsession['logoutURL']); | 
                                                        |
| 424 | 424 | return;  | 
                                                        
| 425 | 425 | }  | 
                                                        
| 426 | 426 | // Build the URL.  | 
                                                        
@@ -434,13 +434,13 @@ discard block  | 
                                                    ||
| 434 | 434 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_join'], $bigbluebuttonbn);  | 
                                                        
| 435 | 435 | // Internal logger: Instert a record with the meeting created.  | 
                                                        
| 436 | 436 |      $overrides = array('meetingid' => $bbbsession['meetingid']); | 
                                                        
| 437 | -    $meta = '{"origin":'.$origin.'}'; | 
                                                        |
| 437 | +    $meta = '{"origin":' . $origin . '}'; | 
                                                        |
| 438 | 438 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_JOIN, $overrides, $meta);  | 
                                                        
| 439 | 439 | // Before executing the redirect, increment the number of participants.  | 
                                                        
| 440 | 440 | bigbluebuttonbn_participant_joined($bbbsession['meetingid'],  | 
                                                        
| 441 | 441 | ($bbbsession['administrator'] || $bbbsession['moderator']));  | 
                                                        
| 442 | 442 | // Execute the redirect.  | 
                                                        
| 443 | -    header('Location: '.$joinurl); | 
                                                        |
| 443 | +    header('Location: ' . $joinurl); | 
                                                        |
| 444 | 444 | }  | 
                                                        
| 445 | 445 | |
| 446 | 446 | /**  | 
                                                        
@@ -452,13 +452,13 @@ discard block  | 
                                                    ||
| 452 | 452 | */  | 
                                                        
| 453 | 453 |  function bigbluebutton_bbb_view_errors($serrors, $id) { | 
                                                        
| 454 | 454 | global $CFG, $OUTPUT;  | 
                                                        
| 455 | - $errors = (array) json_decode(urldecode($serrors));  | 
                                                        |
| 455 | + $errors = (array)json_decode(urldecode($serrors));  | 
                                                        |
| 456 | 456 | $msgerrors = '';  | 
                                                        
| 457 | 457 |      foreach ($errors as $error) { | 
                                                        
| 458 | -        $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n"; | 
                                                        |
| 458 | +        $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n"; | 
                                                        |
| 459 | 459 | }  | 
                                                        
| 460 | 460 | echo $OUTPUT->header();  | 
                                                        
| 461 | 461 |      print_error('view_error_bigbluebutton', 'bigbluebuttonbn', | 
                                                        
| 462 | - $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors);  | 
                                                        |
| 462 | + $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors);  | 
                                                        |
| 463 | 463 | echo $OUTPUT->footer();  | 
                                                        
| 464 | 464 | }  |