| @@ -27,7 +27,6 @@ | ||
| 27 | 27 | |
| 28 | 28 |  defined('MOODLE_INTERNAL') || die(); | 
| 29 | 29 | |
| 30 | -use context_module; | |
| 31 | 30 | use mod_bigbluebuttonbn\locallib\bigbluebutton; | 
| 32 | 31 | |
| 33 | 32 | require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); | 
| @@ -30,8 +30,8 @@ discard block | ||
| 30 | 30 | use context_module; | 
| 31 | 31 | use mod_bigbluebuttonbn\locallib\bigbluebutton; | 
| 32 | 32 | |
| 33 | -require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); | |
| 34 | -require_once($CFG->dirroot . '/lib/grouplib.php'); | |
| 33 | +require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); | |
| 34 | +require_once($CFG->dirroot.'/lib/grouplib.php'); | |
| 35 | 35 | |
| 36 | 36 | /** | 
| 37 | 37 | * Mobile output class for bigbluebuttonbn | 
| @@ -164,7 +164,7 @@ discard block | ||
| 164 | 164 | } | 
| 165 | 165 |              if ($response['returncode'] == 'FAILED') { | 
| 166 | 166 | // The meeting could not be created. | 
| 167 | - $errorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create'); | |
| 167 | + $errorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create'); | |
| 168 | 168 | $e = get_string($errorkey, 'bigbluebuttonbn'); | 
| 169 | 169 | return(self::mobile_print_error($e)); | 
| 170 | 170 | } | 
| @@ -281,7 +281,7 @@ discard block | ||
| 281 | 281 |                      'html' => $OUTPUT->render_from_template('mod_bigbluebuttonbn/mobile_view_notification', $data), | 
| 282 | 282 | ), | 
| 283 | 283 | ), | 
| 284 | - 'javascript' => file_get_contents($CFG->dirroot . '/mod/bigbluebuttonbn/mobile.notification.js'), | |
| 284 | + 'javascript' => file_get_contents($CFG->dirroot.'/mod/bigbluebuttonbn/mobile.notification.js'), | |
| 285 | 285 | 'otherdata' => '', | 
| 286 | 286 | 'files' => '' | 
| 287 | 287 | ); | 
| @@ -29,7 +29,7 @@ discard block | ||
| 29 | 29 | |
| 30 | 30 |  defined('MOODLE_INTERNAL') || die(); | 
| 31 | 31 | global $CFG; | 
| 32 | -require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); | |
| 32 | +require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); | |
| 33 | 33 | |
| 34 | 34 | /** | 
| 35 | 35 | * Wrapper for executing http requests on a BigBlueButton server. | 
| @@ -48,18 +48,18 @@ discard block | ||
| 48 | 48 | * @return string | 
| 49 | 49 | */ | 
| 50 | 50 |      public static function action_url($action = '', $data = array(), $metadata = array()) { | 
| 51 | - $baseurl = self::sanitized_url() . $action . '?'; | |
| 51 | + $baseurl = self::sanitized_url().$action.'?'; | |
| 52 | 52 | $metadata = array_combine( | 
| 53 | 53 | array_map( | 
| 54 | 54 |                  function($k) { | 
| 55 | - return 'meta_' . $k; | |
| 55 | + return 'meta_'.$k; | |
| 56 | 56 | } | 
| 57 | 57 | , array_keys($metadata) | 
| 58 | 58 | ), | 
| 59 | 59 | $metadata | 
| 60 | 60 | ); | 
| 61 | 61 | $params = http_build_query($data + $metadata, '', '&'); | 
| 62 | - return $baseurl . $params . '&checksum=' . sha1($action . $params . self::sanitized_secret()); | |
| 62 | + return $baseurl.$params.'&checksum='.sha1($action.$params.self::sanitized_secret()); | |
| 63 | 63 | } | 
| 64 | 64 | |
| 65 | 65 | /** | 
| @@ -75,7 +75,7 @@ discard block | ||
| 75 | 75 |          if (substr($serverurl, -4) == '/api') { | 
| 76 | 76 | $serverurl = rtrim($serverurl, '/api'); | 
| 77 | 77 | } | 
| 78 | - return $serverurl . '/api/'; | |
| 78 | + return $serverurl.'/api/'; | |
| 79 | 79 | } | 
| 80 | 80 | |
| 81 | 81 | /** | 
| @@ -96,9 +96,9 @@ discard block | ||
| 96 | 96 |          $pserverurl = parse_url(trim(config::get('server_url'))); | 
| 97 | 97 | $pserverurlport = ""; | 
| 98 | 98 |          if (isset($pserverurl['port'])) { | 
| 99 | - $pserverurlport = ":" . $pserverurl['port']; | |
| 99 | + $pserverurlport = ":".$pserverurl['port']; | |
| 100 | 100 | } | 
| 101 | - return $pserverurl['scheme'] . "://" . $pserverurl['host'] . $pserverurlport . "/"; | |
| 101 | + return $pserverurl['scheme']."://".$pserverurl['host'].$pserverurlport."/"; | |
| 102 | 102 | } | 
| 103 | 103 | |
| 104 | 104 | /** | 
| @@ -152,15 +152,15 @@ discard block | ||
| 152 | 152 | $bbbsession['serverversion'] = (string) $serverversion; | 
| 153 | 153 | |
| 154 | 154 | // Operation URLs. | 
| 155 | - $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id; | |
| 156 | - $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $cm->id . | |
| 157 | - '&bn=' . $bbbsession['bigbluebuttonbn']->id; | |
| 158 | - $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . | |
| 159 | - 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; | |
| 160 | - $bbbsession['meetingEventsURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=meeting' . | |
| 161 | - '_events&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; | |
| 162 | - $bbbsession['joinURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=join&id=' . $cm->id . | |
| 163 | - '&bn=' . $bbbsession['bigbluebuttonbn']->id; | |
| 155 | + $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id; | |
| 156 | + $bbbsession['logoutURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$cm->id. | |
| 157 | + '&bn='.$bbbsession['bigbluebuttonbn']->id; | |
| 158 | + $bbbsession['recordingReadyURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=recording_'. | |
| 159 | + 'ready&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id; | |
| 160 | + $bbbsession['meetingEventsURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=meeting'. | |
| 161 | + '_events&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id; | |
| 162 | + $bbbsession['joinURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=join&id='.$cm->id. | |
| 163 | + '&bn='.$bbbsession['bigbluebuttonbn']->id; | |
| 164 | 164 | |
| 165 | 165 | return $bbbsession; | 
| 166 | 166 | } | 
| @@ -267,7 +267,7 @@ discard block | ||
| 267 | 267 |          if ($viewinstance) { | 
| 268 | 268 | $bbbsession = self::build_bbb_session_fromviewinstance($viewinstance); | 
| 269 | 269 |              if ($bbbsession) { | 
| 270 | - require_once($CFG->dirroot . "/mod/bigbluebuttonbn/brokerlib.php"); | |
| 270 | + require_once($CFG->dirroot."/mod/bigbluebuttonbn/brokerlib.php"); | |
| 271 | 271 | $info = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], false); | 
| 272 | 272 | $running = false; | 
| 273 | 273 |                  if ($info['returncode'] == 'SUCCESS') { | 
| @@ -61,7 +61,7 @@ discard block | ||
| 61 | 61 | */ | 
| 62 | 62 |      public static function view_bigbluebuttonbn($bigbluebuttonbnid) { | 
| 63 | 63 | global $DB, $CFG; | 
| 64 | - require_once($CFG->dirroot . "/mod/bigbluebuttonbn/lib.php"); | |
| 64 | + require_once($CFG->dirroot."/mod/bigbluebuttonbn/lib.php"); | |
| 65 | 65 | |
| 66 | 66 | $params = self::validate_parameters(self::view_bigbluebuttonbn_parameters(), | 
| 67 | 67 | array( | 
| @@ -109,7 +109,7 @@ discard block | ||
| 109 | 109 | * @since Moodle 3.3 | 
| 110 | 110 | */ | 
| 111 | 111 |      public static function get_bigbluebuttonbns_by_courses_parameters() { | 
| 112 | - return new external_function_parameters ( | |
| 112 | + return new external_function_parameters( | |
| 113 | 113 | array( | 
| 114 | 114 | 'courseids' => new external_multiple_structure( | 
| 115 | 115 | new external_value(PARAM_INT, 'Course id'), 'Array of course ids', VALUE_DEFAULT, array() | 
| @@ -225,7 +225,7 @@ discard block | ||
| 225 | 225 | */ | 
| 226 | 226 |      public static function can_join($cmid) { | 
| 227 | 227 | global $SESSION, $CFG; | 
| 228 | - require_once($CFG->dirroot . "/mod/bigbluebuttonbn/locallib.php"); | |
| 228 | + require_once($CFG->dirroot."/mod/bigbluebuttonbn/locallib.php"); | |
| 229 | 229 | |
| 230 | 230 | $params = self::validate_parameters(self::can_join_parameters(), | 
| 231 | 231 | array( | 
| @@ -58,7 +58,7 @@ | ||
| 58 | 58 | mod_bigbluebuttonbn\locallib\bigbluebutton::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'; | 
| @@ -138,7 +138,7 @@ discard block | ||
| 138 | 138 | $lastaccess = json_decode($lastaccess->meta); | 
| 139 | 139 | // If the user acceded from Timeline it should be redirected to the Dashboard. | 
| 140 | 140 |          if (isset($lastaccess->origin) && $lastaccess->origin == BIGBLUEBUTTON_ORIGIN_TIMELINE) { | 
| 141 | - redirect($CFG->wwwroot . '/my/'); | |
| 141 | + redirect($CFG->wwwroot.'/my/'); | |
| 142 | 142 | } | 
| 143 | 143 | // Close the tab or window where BBB was opened. | 
| 144 | 144 | bigbluebuttonbn_bbb_view_close_window(); | 
| @@ -340,7 +340,7 @@ discard block | ||
| 340 | 340 | * @return string | 
| 341 | 341 | */ | 
| 342 | 342 |  function bigbluebuttonbn_bbb_view_create_meeting_data_record($record) { | 
| 343 | -    if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) { | |
| 343 | +    if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) { | |
| 344 | 344 | return 'true'; | 
| 345 | 345 | } | 
| 346 | 346 | return 'false'; | 
| @@ -353,7 +353,7 @@ discard block | ||
| 353 | 353 | * @return integer | 
| 354 | 354 | */ | 
| 355 | 355 |  function bigbluebuttonbn_bbb_view_create_meeting_data_duration($closingtime) { | 
| 356 | -    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) { | |
| 356 | +    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) { | |
| 357 | 357 | return bigbluebuttonbn_get_duration($closingtime); | 
| 358 | 358 | } | 
| 359 | 359 | return 0; | 
| @@ -26,7 +26,7 @@ discard block | ||
| 26 | 26 | |
| 27 | 27 |  defined('MOODLE_INTERNAL') || die(); | 
| 28 | 28 | global $CFG; | 
| 29 | -require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); | |
| 29 | +require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); | |
| 30 | 30 | |
| 31 | 31 | /** | 
| 32 | 32 | * Methods used to render view BBB in mobile. | 
| @@ -138,7 +138,7 @@ discard block | ||
| 138 | 138 | * @return string | 
| 139 | 139 | */ | 
| 140 | 140 |      public static function create_meeting_data_record($record) { | 
| 141 | -        if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) { | |
| 141 | +        if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) { | |
| 142 | 142 | return 'true'; | 
| 143 | 143 | } | 
| 144 | 144 | return 'false'; | 
| @@ -151,7 +151,7 @@ discard block | ||
| 151 | 151 | * @return integer | 
| 152 | 152 | */ | 
| 153 | 153 |      public static function create_meeting_data_duration($closingtime) { | 
| 154 | -        if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) { | |
| 154 | +        if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) { | |
| 155 | 155 | return bigbluebuttonbn_get_duration($closingtime); | 
| 156 | 156 | } | 
| 157 | 157 | return 0; |