@@ -43,7 +43,7 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | protected function init($crud = 'r', $edulevel = self::LEVEL_PARTICIPATING) { |
| 45 | 45 | parent::init($crud, $edulevel); |
| 46 | - $this->description = "The user with id '##userid' viewed the bigbluebuttonbn activity " . |
|
| 46 | + $this->description = "The user with id '##userid' viewed the bigbluebuttonbn activity ". |
|
| 47 | 47 | "with id '##objectid' for the course id '##courseid'."; |
| 48 | 48 | } |
| 49 | 49 | |
@@ -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() |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | defined('MOODLE_INTERNAL') || die(); |
| 29 | 29 | |
| 30 | -require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 30 | +require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 31 | 31 | require_once($CFG->libdir.'/adminlib.php'); |
| 32 | 32 | |
| 33 | 33 | /** |
@@ -63,12 +63,12 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | public function render_group_header($name, $itemname = null, $itemdescription = null) { |
| 65 | 65 | if ($itemname === null) { |
| 66 | - $itemname = get_string('config_' . $name, 'bigbluebuttonbn'); |
|
| 66 | + $itemname = get_string('config_'.$name, 'bigbluebuttonbn'); |
|
| 67 | 67 | } |
| 68 | 68 | if ($itemdescription === null) { |
| 69 | - $itemdescription = get_string('config_' .$name . '_description', 'bigbluebuttonbn'); |
|
| 69 | + $itemdescription = get_string('config_'.$name.'_description', 'bigbluebuttonbn'); |
|
| 70 | 70 | } |
| 71 | - $item = new \admin_setting_heading('bigbluebuttonbn_config_' . $name, $itemname, $itemdescription); |
|
| 71 | + $item = new \admin_setting_heading('bigbluebuttonbn_config_'.$name, $itemname, $itemdescription); |
|
| 72 | 72 | $this->settings->add($item); |
| 73 | 73 | } |
| 74 | 74 | |
@@ -97,9 +97,9 @@ discard block |
||
| 97 | 97 | * @return Object |
| 98 | 98 | */ |
| 99 | 99 | public function render_group_element_text($name, $default = null, $type = PARAM_RAW) { |
| 100 | - $item = new \admin_setting_configtext('bigbluebuttonbn_' . $name, |
|
| 101 | - get_string('config_' . $name, 'bigbluebuttonbn'), |
|
| 102 | - get_string('config_' . $name . '_description', 'bigbluebuttonbn'), |
|
| 100 | + $item = new \admin_setting_configtext('bigbluebuttonbn_'.$name, |
|
| 101 | + get_string('config_'.$name, 'bigbluebuttonbn'), |
|
| 102 | + get_string('config_'.$name.'_description', 'bigbluebuttonbn'), |
|
| 103 | 103 | $default, $type); |
| 104 | 104 | return $item; |
| 105 | 105 | } |
@@ -113,9 +113,9 @@ discard block |
||
| 113 | 113 | * @return Object |
| 114 | 114 | */ |
| 115 | 115 | public function render_group_element_checkbox($name, $default = null) { |
| 116 | - $item = new \admin_setting_configcheckbox('bigbluebuttonbn_' . $name, |
|
| 117 | - get_string('config_' . $name, 'bigbluebuttonbn'), |
|
| 118 | - get_string('config_' . $name . '_description', 'bigbluebuttonbn'), |
|
| 116 | + $item = new \admin_setting_configcheckbox('bigbluebuttonbn_'.$name, |
|
| 117 | + get_string('config_'.$name, 'bigbluebuttonbn'), |
|
| 118 | + get_string('config_'.$name.'_description', 'bigbluebuttonbn'), |
|
| 119 | 119 | $default); |
| 120 | 120 | return $item; |
| 121 | 121 | } |
@@ -130,9 +130,9 @@ discard block |
||
| 130 | 130 | * @return Object |
| 131 | 131 | */ |
| 132 | 132 | public function render_group_element_configmultiselect($name, $defaultsetting, $choices) { |
| 133 | - $item = new \admin_setting_configmultiselect('bigbluebuttonbn_' . $name, |
|
| 134 | - get_string('config_' . $name, 'bigbluebuttonbn'), |
|
| 135 | - get_string('config_' . $name . '_description', 'bigbluebuttonbn'), |
|
| 133 | + $item = new \admin_setting_configmultiselect('bigbluebuttonbn_'.$name, |
|
| 134 | + get_string('config_'.$name, 'bigbluebuttonbn'), |
|
| 135 | + get_string('config_'.$name.'_description', 'bigbluebuttonbn'), |
|
| 136 | 136 | $defaultsetting, $choices); |
| 137 | 137 | return $item; |
| 138 | 138 | } |
@@ -147,9 +147,9 @@ discard block |
||
| 147 | 147 | * @return Object |
| 148 | 148 | */ |
| 149 | 149 | public function render_group_element_configselect($name, $defaultsetting, $choices) { |
| 150 | - $item = new \admin_setting_configselect('bigbluebuttonbn_' . $name, |
|
| 151 | - get_string('config_' . $name, 'bigbluebuttonbn'), |
|
| 152 | - get_string('config_' . $name . '_description', 'bigbluebuttonbn'), |
|
| 150 | + $item = new \admin_setting_configselect('bigbluebuttonbn_'.$name, |
|
| 151 | + get_string('config_'.$name, 'bigbluebuttonbn'), |
|
| 152 | + get_string('config_'.$name.'_description', 'bigbluebuttonbn'), |
|
| 153 | 153 | $defaultsetting, $choices); |
| 154 | 154 | return $item; |
| 155 | 155 | } |
@@ -166,14 +166,14 @@ discard block |
||
| 166 | 166 | */ |
| 167 | 167 | public function render_warning_message($name, $message, $type = 'warning', $closable = true) { |
| 168 | 168 | global $OUTPUT; |
| 169 | - $output = $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
|
| 170 | - 'bigbluebuttonbn_' . $name)."\n"; |
|
| 169 | + $output = $OUTPUT->box_start('box boxalignleft adminerror alert alert-'.$type.' alert-block fade in', |
|
| 170 | + 'bigbluebuttonbn_'.$name)."\n"; |
|
| 171 | 171 | if ($closable) { |
| 172 | - $output .= ' <button type="button" class="close" data-dismiss="alert">×</button>' . "\n"; |
|
| 172 | + $output .= ' <button type="button" class="close" data-dismiss="alert">×</button>'."\n"; |
|
| 173 | 173 | } |
| 174 | - $output .= ' ' . $message . "\n"; |
|
| 175 | - $output .= $OUTPUT->box_end() . "\n"; |
|
| 176 | - $item = new \admin_setting_heading('bigbluebuttonbn_' . $name, '', $output); |
|
| 174 | + $output .= ' '.$message."\n"; |
|
| 175 | + $output .= $OUTPUT->box_end()."\n"; |
|
| 176 | + $item = new \admin_setting_heading('bigbluebuttonbn_'.$name, '', $output); |
|
| 177 | 177 | $this->settings->add($item); |
| 178 | 178 | return $item; |
| 179 | 179 | } |
@@ -195,8 +195,8 @@ discard block |
||
| 195 | 195 | $filemanageroptions['mainfile'] = true; |
| 196 | 196 | |
| 197 | 197 | $filemanager = new \admin_setting_configstoredfile('mod_bigbluebuttonbn/presentationdefault', |
| 198 | - get_string('config_' . $name, 'bigbluebuttonbn'), |
|
| 199 | - get_string('config_' . $name . '_description', 'bigbluebuttonbn'), |
|
| 198 | + get_string('config_'.$name, 'bigbluebuttonbn'), |
|
| 199 | + get_string('config_'.$name.'_description', 'bigbluebuttonbn'), |
|
| 200 | 200 | 'presentationdefault', |
| 201 | 201 | 0, |
| 202 | 202 | $filemanageroptions); |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | !isset($CFG->bigbluebuttonbn['recordings_imported_editable']) || |
| 92 | 92 | !isset($CFG->bigbluebuttonbn['recordings_preview_default']) || |
| 93 | 93 | !isset($CFG->bigbluebuttonbn['recordings_preview_editable']) |
| 94 | - ); |
|
| 94 | + ); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | defined('MOODLE_INTERNAL') || die(); |
| 29 | 29 | |
| 30 | -require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 30 | +require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 31 | 31 | require_once($CFG->libdir.'/adminlib.php'); |
| 32 | 32 | |
| 33 | 33 | /** |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | !isset($CFG->bigbluebuttonbn['recording_all_from_start_default']) || |
| 63 | 63 | !isset($CFG->bigbluebuttonbn['recording_all_from_start_editable']) || |
| 64 | 64 | !isset($CFG->bigbluebuttonbn['recording_hide_button_default']) || |
| 65 | - !isset($CFG->bigbluebuttonbn['recording_hide_button_editable']) ); |
|
| 65 | + !isset($CFG->bigbluebuttonbn['recording_hide_button_editable'])); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | return; |
| 86 | 86 | } |
| 87 | 87 | echo $OUTPUT->box_start('generalbox boxaligncenter'); |
| 88 | - echo '<br><div class="alert alert-' . $type . '">' . $message . '</div>'; |
|
| 88 | + echo '<br><div class="alert alert-'.$type.'">'.$message.'</div>'; |
|
| 89 | 89 | echo $OUTPUT->box_end(); |
| 90 | 90 | } |
| 91 | 91 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | } |
| 105 | 105 | $typeprofiles = bigbluebuttonbn_get_instance_type_profiles(); |
| 106 | 106 | $enabledfeatures = bigbluebuttonbn_get_enabled_features($typeprofiles, $type); |
| 107 | - $pinginterval = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_ping_interval') * 1000; |
|
| 107 | + $pinginterval = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_ping_interval') * 1000; |
|
| 108 | 108 | // JavaScript for locales. |
| 109 | 109 | $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn'); |
| 110 | 110 | // JavaScript variables. |
@@ -375,10 +375,10 @@ discard block |
||
| 375 | 375 | return ''; |
| 376 | 376 | } |
| 377 | 377 | return bigbluebuttonbn_render_warning( |
| 378 | - (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_message'), |
|
| 379 | - (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_box_type'), |
|
| 380 | - (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_href'), |
|
| 381 | - (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_text'), |
|
| 382 | - (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_class') |
|
| 378 | + (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_message'), |
|
| 379 | + (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_box_type'), |
|
| 380 | + (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_button_href'), |
|
| 381 | + (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_button_text'), |
|
| 382 | + (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_button_class') |
|
| 383 | 383 | ); |
| 384 | 384 | } |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | // Update a record. |
| 262 | 262 | $DB->update_record('bigbluebuttonbn', $bigbluebuttonbn); |
| 263 | 263 | // Get the meetingid column in the bigbluebuttonbn table. |
| 264 | - $bigbluebuttonbn->meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('id' => $bigbluebuttonbn->id)); |
|
| 264 | + $bigbluebuttonbn->meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('id' => $bigbluebuttonbn->id)); |
|
| 265 | 265 | // Log update action. |
| 266 | 266 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_EDIT); |
| 267 | 267 | // Complete the process. |
@@ -315,9 +315,9 @@ discard block |
||
| 315 | 315 | function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { |
| 316 | 316 | global $DB; |
| 317 | 317 | $sql = "SELECT * FROM {bigbluebuttonbn_logs} "; |
| 318 | - $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?"; |
|
| 318 | + $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ".$DB->sql_compare_text('meta')." = ?"; |
|
| 319 | 319 | $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}")); |
| 320 | - $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}"; |
|
| 320 | + $meta = "{\"has_recordings\":".empty($logs) ? "true" : "false"."}"; |
|
| 321 | 321 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta); |
| 322 | 322 | } |
| 323 | 323 | |
@@ -335,8 +335,8 @@ discard block |
||
| 335 | 335 | */ |
| 336 | 336 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
| 337 | 337 | if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) { |
| 338 | - return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' . |
|
| 339 | - get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string) $completed . ' ' . |
|
| 338 | + return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '. |
|
| 339 | + get_string('view_message_session_for', 'bigbluebuttonbn').' '.(string) $completed.' '. |
|
| 340 | 340 | get_string('view_message_times', 'bigbluebuttonbn'); |
| 341 | 341 | } |
| 342 | 342 | return ''; |
@@ -357,12 +357,12 @@ discard block |
||
| 357 | 357 | if (is_object($courseorid)) { |
| 358 | 358 | $course = $courseorid; |
| 359 | 359 | } else { |
| 360 | - $course = (object)array('id' => $courseorid); |
|
| 360 | + $course = (object) array('id' => $courseorid); |
|
| 361 | 361 | } |
| 362 | 362 | if (is_object($userorid)) { |
| 363 | 363 | $user = $userorid; |
| 364 | 364 | } else { |
| 365 | - $user = (object)array('id' => $userorid); |
|
| 365 | + $user = (object) array('id' => $userorid); |
|
| 366 | 366 | } |
| 367 | 367 | $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} "; |
| 368 | 368 | $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)"; |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | function bigbluebuttonbn_reset_course_items() { |
| 389 | 389 | $items = array("events" => 0, "tags" => 0, "logs" => 0); |
| 390 | 390 | // Include recordings only if enabled. |
| 391 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled()) { |
|
| 391 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled()) { |
|
| 392 | 392 | $items["recordings"] = 0; |
| 393 | 393 | } |
| 394 | 394 | return $items; |
@@ -694,7 +694,7 @@ discard block |
||
| 694 | 694 | function bigbluebuttonbn_process_pre_save_instance(&$bigbluebuttonbn) { |
| 695 | 695 | require_once(__DIR__.'/locallib.php'); |
| 696 | 696 | $bigbluebuttonbn->timemodified = time(); |
| 697 | - if ((integer)$bigbluebuttonbn->instance == 0) { |
|
| 697 | + if ((integer) $bigbluebuttonbn->instance == 0) { |
|
| 698 | 698 | $bigbluebuttonbn->meetingid = 0; |
| 699 | 699 | $bigbluebuttonbn->timecreated = time(); |
| 700 | 700 | $bigbluebuttonbn->timemodified = 0; |
@@ -1130,7 +1130,7 @@ discard block |
||
| 1130 | 1130 | ) { |
| 1131 | 1131 | global $CFG, $DB; |
| 1132 | 1132 | |
| 1133 | - require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 1133 | + require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 1134 | 1134 | |
| 1135 | 1135 | // Get mod info. |
| 1136 | 1136 | $cm = get_fast_modinfo($event->courseid)->instances['bigbluebuttonbn'][$event->instance]; |
@@ -1208,7 +1208,7 @@ discard block |
||
| 1208 | 1208 | function bigbluebuttonbn_extend_settings_navigation(settings_navigation $settingsnav, navigation_node $nodenav) { |
| 1209 | 1209 | global $PAGE, $USER; |
| 1210 | 1210 | // Don't add validate completion if the callback for meetingevents is NOT enabled. |
| 1211 | - if (!(boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 1211 | + if (!(boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 1212 | 1212 | return; |
| 1213 | 1213 | } |
| 1214 | 1214 | // Don't add validate completion if user is not allowed to edit the activity. |
@@ -1216,7 +1216,7 @@ discard block |
||
| 1216 | 1216 | if (!has_capability('moodle/course:manageactivities', $context, $USER->id)) { |
| 1217 | 1217 | return; |
| 1218 | 1218 | } |
| 1219 | - $completionvalidate = '#action=completion_validate&bigbluebuttonbn=' . $PAGE->cm->instance; |
|
| 1219 | + $completionvalidate = '#action=completion_validate&bigbluebuttonbn='.$PAGE->cm->instance; |
|
| 1220 | 1220 | $nodenav->add(get_string('completionvalidatestate', 'bigbluebuttonbn'), |
| 1221 | 1221 | $completionvalidate, navigation_node::TYPE_CONTAINER); |
| 1222 | 1222 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | * @uses FEATURE_GRADE_OUTCOMES |
| 104 | 104 | * @uses FEATURE_SHOW_DESCRIPTION |
| 105 | 105 | * @param string $feature |
| 106 | - * @return mixed True if yes (some features may use other values) |
|
| 106 | + * @return null|boolean True if yes (some features may use other values) |
|
| 107 | 107 | */ |
| 108 | 108 | function bigbluebuttonbn_supports($feature) { |
| 109 | 109 | if (!$feature) { |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | * |
| 311 | 311 | * @param object $bigbluebuttonbn Id of the module instance |
| 312 | 312 | * |
| 313 | - * @return bool Success/Failure |
|
| 313 | + * @return boolean|null Success/Failure |
|
| 314 | 314 | */ |
| 315 | 315 | function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { |
| 316 | 316 | global $DB; |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | * @param object $mod |
| 332 | 332 | * @param object $bigbluebuttonbn |
| 333 | 333 | * |
| 334 | - * @return bool |
|
| 334 | + * @return string |
|
| 335 | 335 | */ |
| 336 | 336 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
| 337 | 337 | if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) { |
@@ -917,7 +917,7 @@ discard block |
||
| 917 | 917 | * @param stdClass $context context object |
| 918 | 918 | * @param string $filearea file area |
| 919 | 919 | * |
| 920 | - * @return false|null false if file not valid |
|
| 920 | + * @return boolean false if file not valid |
|
| 921 | 921 | */ |
| 922 | 922 | function bigbluebuttonbn_pluginfile_valid($context, $filearea) { |
| 923 | 923 | |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} "; |
| 357 | 357 | $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)"; |
| 358 | 358 | $result = $DB->count_records_sql($sql, array($course->id, $bigbluebuttonbn->id, $user->id, |
| 359 | - BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED)); |
|
| 359 | + BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED)); |
|
| 360 | 360 | return $result; |
| 361 | 361 | } |
| 362 | 362 | |
@@ -589,12 +589,12 @@ discard block |
||
| 589 | 589 | $str = '<div class="bigbluebuttonbn overview">'."\n"; |
| 590 | 590 | $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
| 591 | 591 | $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
| 592 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
| 592 | + '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
| 593 | 593 | $str .= ' </div>'."\n"; |
| 594 | 594 | $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
| 595 | 595 | '</div>'."\n"; |
| 596 | 596 | $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
| 597 | - .'</div>'."\n"; |
|
| 597 | + .'</div>'."\n"; |
|
| 598 | 598 | $str .= '</div>'."\n"; |
| 599 | 599 | return $str; |
| 600 | 600 | } |
@@ -836,7 +836,7 @@ discard block |
||
| 836 | 836 | 'bigbluebuttonbn', |
| 837 | 837 | $bigbluebuttonbn->id, |
| 838 | 838 | $bigbluebuttonbn->completionexpected |
| 839 | - ); |
|
| 839 | + ); |
|
| 840 | 840 | } |
| 841 | 841 | } |
| 842 | 842 | |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | defined('MOODLE_INTERNAL') || die(); |
| 30 | 30 | |
| 31 | -require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 31 | +require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * Class containing the scheduled task for lti module. |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | defined('MOODLE_INTERNAL') || die(); |
| 29 | 29 | |
| 30 | -require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 30 | +require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * Helper class for sending notifications. |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | */ |
| 116 | 116 | public static function htmlmsg_recording_ready($bigbluebuttonbn) { |
| 117 | 117 | return '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
| 118 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
| 118 | + ' "'.$bigbluebuttonbn->name.'" '. |
|
| 119 | 119 | get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
| 120 | 120 | } |
| 121 | 121 | |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | // Enqueue it. |
| 159 | 159 | \core\task\manager::queue_adhoc_task($task); |
| 160 | 160 | } catch (Exception $e) { |
| 161 | - mtrace("Error while enqueuing completion_uopdate_state task. " . (string) $e); |
|
| 161 | + mtrace("Error while enqueuing completion_uopdate_state task. ".(string) $e); |
|
| 162 | 162 | } |
| 163 | 163 | } |
| 164 | 164 | } |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | * |
| 112 | 112 | * @param object $bigbluebuttonbn |
| 113 | 113 | * |
| 114 | - * @return void |
|
| 114 | + * @return string |
|
| 115 | 115 | */ |
| 116 | 116 | public static function htmlmsg_recording_ready($bigbluebuttonbn) { |
| 117 | 117 | return '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | * Helper function to retrieve imported recordings from the Moodle database. |
| 318 | 318 | * The references are stored as events in bigbluebuttonbn_logs. |
| 319 | 319 | * |
| 320 | - * @param string $courseid |
|
| 320 | + * @param integer $courseid |
|
| 321 | 321 | * @param string $bigbluebuttonbnid |
| 322 | 322 | * @param bool $subset |
| 323 | 323 | * |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | /** |
| 346 | 346 | * Helper function to retrive the default config.xml file. |
| 347 | 347 | * |
| 348 | - * @return string |
|
| 348 | + * @return null|SimpleXMLElement |
|
| 349 | 349 | */ |
| 350 | 350 | function bigbluebuttonbn_get_default_config_xml() { |
| 351 | 351 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | * @param object $a |
| 428 | 428 | * @param object $b |
| 429 | 429 | * |
| 430 | - * @return array |
|
| 430 | + * @return integer |
|
| 431 | 431 | */ |
| 432 | 432 | function bigbluebuttonbn_recording_build_sorter($a, $b) { |
| 433 | 433 | global $CFG; |
@@ -541,7 +541,7 @@ discard block |
||
| 541 | 541 | * @param string $data |
| 542 | 542 | * @param string $contenttype |
| 543 | 543 | * |
| 544 | - * @return object |
|
| 544 | + * @return null|SimpleXMLElement |
|
| 545 | 545 | */ |
| 546 | 546 | function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 547 | 547 | if (extension_loaded('curl')) { |
@@ -582,7 +582,7 @@ discard block |
||
| 582 | 582 | * @param string $data |
| 583 | 583 | * @param string $contenttype |
| 584 | 584 | * |
| 585 | - * @return object |
|
| 585 | + * @return string |
|
| 586 | 586 | */ |
| 587 | 587 | function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 588 | 588 | global $CFG; |
@@ -977,7 +977,7 @@ discard block |
||
| 977 | 977 | * @param integer $instance |
| 978 | 978 | * @param integer $voicebridge |
| 979 | 979 | * |
| 980 | - * @return string |
|
| 980 | + * @return boolean |
|
| 981 | 981 | */ |
| 982 | 982 | function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) { |
| 983 | 983 | global $DB; |
@@ -1325,7 +1325,7 @@ discard block |
||
| 1325 | 1325 | * @param string $meetingid |
| 1326 | 1326 | * @param string $configxml |
| 1327 | 1327 | * |
| 1328 | - * @return object |
|
| 1328 | + * @return null|SimpleXMLElement |
|
| 1329 | 1329 | */ |
| 1330 | 1330 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1331 | 1331 | $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
@@ -1379,7 +1379,7 @@ discard block |
||
| 1379 | 1379 | * @param array $recording |
| 1380 | 1380 | * @param array $tools |
| 1381 | 1381 | * |
| 1382 | - * @return array |
|
| 1382 | + * @return null|stdClass |
|
| 1383 | 1383 | */ |
| 1384 | 1384 | function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) { |
| 1385 | 1385 | if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) { |
@@ -2016,7 +2016,7 @@ discard block |
||
| 2016 | 2016 | * |
| 2017 | 2017 | * @param array $bbbsession |
| 2018 | 2018 | * @param array $recording |
| 2019 | - * @param object $rowdata |
|
| 2019 | + * @param stdClass $rowdata |
|
| 2020 | 2020 | * |
| 2021 | 2021 | * @return object |
| 2022 | 2022 | */ |
@@ -2211,7 +2211,7 @@ discard block |
||
| 2211 | 2211 | * |
| 2212 | 2212 | * @param array $bbbsession |
| 2213 | 2213 | * @param array $recordings |
| 2214 | - * @param array $tools |
|
| 2214 | + * @param string[] $tools |
|
| 2215 | 2215 | * |
| 2216 | 2216 | * @return array |
| 2217 | 2217 | */ |
@@ -2292,7 +2292,7 @@ discard block |
||
| 2292 | 2292 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
| 2293 | 2293 | * in the getRecordings request considering only those that belong to deleted activities. |
| 2294 | 2294 | * |
| 2295 | - * @param string $courseid |
|
| 2295 | + * @param integer $courseid |
|
| 2296 | 2296 | * @param string $bigbluebuttonbnid |
| 2297 | 2297 | * @param bool $subset |
| 2298 | 2298 | * |
@@ -2316,7 +2316,7 @@ discard block |
||
| 2316 | 2316 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
| 2317 | 2317 | * in the getRecordings request considering only those that belong to imported recordings. |
| 2318 | 2318 | * |
| 2319 | - * @param string $courseid |
|
| 2319 | + * @param integer $courseid |
|
| 2320 | 2320 | * @param string $bigbluebuttonbnid |
| 2321 | 2321 | * @param bool $subset |
| 2322 | 2322 | * |
@@ -2339,7 +2339,7 @@ discard block |
||
| 2339 | 2339 | /** |
| 2340 | 2340 | * Helper function to get recordings and imported recordings together. |
| 2341 | 2341 | * |
| 2342 | - * @param string $courseid |
|
| 2342 | + * @param integer $courseid |
|
| 2343 | 2343 | * @param string $bigbluebuttonbnid |
| 2344 | 2344 | * @param bool $subset |
| 2345 | 2345 | * @param bool $includedeleted |
@@ -2357,7 +2357,7 @@ discard block |
||
| 2357 | 2357 | * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events |
| 2358 | 2358 | * in bigbluebuttonbn_logs. |
| 2359 | 2359 | * |
| 2360 | - * @param string $courseid |
|
| 2360 | + * @param integer $courseid |
|
| 2361 | 2361 | * @param string $bigbluebuttonbnid |
| 2362 | 2362 | * @param bool $subset |
| 2363 | 2363 | * @param bool $includedeleted |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | global $CFG; |
| 34 | 34 | |
| 35 | -require_once(__DIR__ . '/lib.php'); |
|
| 35 | +require_once(__DIR__.'/lib.php'); |
|
| 36 | 36 | |
| 37 | 37 | /** @var BIGBLUEBUTTONBN_UPDATE_CACHE boolean set to true indicates that cache has to be updated */ |
| 38 | 38 | const BIGBLUEBUTTONBN_UPDATE_CACHE = true; |
@@ -145,8 +145,8 @@ discard block |
||
| 145 | 145 | $data = null; |
| 146 | 146 | if (!is_null($pname) && !is_null($purl)) { |
| 147 | 147 | $method = 'POST'; |
| 148 | - $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
| 149 | - $purl . "' /></module></modules>"; |
|
| 148 | + $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
| 149 | + $purl."' /></module></modules>"; |
|
| 150 | 150 | } |
| 151 | 151 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data); |
| 152 | 152 | if ($xml) { |
@@ -242,8 +242,8 @@ discard block |
||
| 242 | 242 | || defined('BEHAT_UTIL')) { |
| 243 | 243 | // Just return the fake recording. |
| 244 | 244 | global $CFG; |
| 245 | - require_once($CFG->libdir . '/testing/generator/lib.php'); |
|
| 246 | - require_once(__DIR__ . '/tests/generator/lib.php'); |
|
| 245 | + require_once($CFG->libdir.'/testing/generator/lib.php'); |
|
| 246 | + require_once(__DIR__.'/tests/generator/lib.php'); |
|
| 247 | 247 | return mod_bigbluebuttonbn_generator::bigbluebuttonbn_get_recordings_array_fetch($meetingidsarray); |
| 248 | 248 | } |
| 249 | 249 | $recordings = array(); |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | if (is_object($value)) { |
| 417 | 417 | $value = ''; |
| 418 | 418 | } |
| 419 | - $metadataarray['meta_' . $key] = $value; |
|
| 419 | + $metadataarray['meta_'.$key] = $value; |
|
| 420 | 420 | } |
| 421 | 421 | return $metadataarray; |
| 422 | 422 | } |
@@ -556,7 +556,7 @@ discard block |
||
| 556 | 556 | return $xml; |
| 557 | 557 | } catch (Exception $e) { |
| 558 | 558 | libxml_use_internal_errors($previous); |
| 559 | - $error = 'Caught exception: ' . $e->getMessage(); |
|
| 559 | + $error = 'Caught exception: '.$e->getMessage(); |
|
| 560 | 560 | debugging($error, DEBUG_DEVELOPER); |
| 561 | 561 | return null; |
| 562 | 562 | } |
@@ -567,7 +567,7 @@ discard block |
||
| 567 | 567 | $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS); |
| 568 | 568 | return $response; |
| 569 | 569 | } catch (Exception $e) { |
| 570 | - $error = 'Caught exception: ' . $e->getMessage(); |
|
| 570 | + $error = 'Caught exception: '.$e->getMessage(); |
|
| 571 | 571 | debugging($error, DEBUG_DEVELOPER); |
| 572 | 572 | libxml_use_internal_errors($previous); |
| 573 | 573 | return null; |
@@ -586,7 +586,7 @@ discard block |
||
| 586 | 586 | */ |
| 587 | 587 | function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 588 | 588 | global $CFG; |
| 589 | - require_once($CFG->libdir . '/filelib.php'); |
|
| 589 | + require_once($CFG->libdir.'/filelib.php'); |
|
| 590 | 590 | $c = new curl(); |
| 591 | 591 | $c->setopt(array('SSL_VERIFYPEER' => true)); |
| 592 | 592 | if ($method == 'POST') { |
@@ -595,8 +595,8 @@ discard block |
||
| 595 | 595 | } |
| 596 | 596 | $options = array(); |
| 597 | 597 | $options['CURLOPT_HTTPHEADER'] = array( |
| 598 | - 'Content-Type: ' . $contenttype, |
|
| 599 | - 'Content-Length: ' . strlen($data), |
|
| 598 | + 'Content-Type: '.$contenttype, |
|
| 599 | + 'Content-Length: '.strlen($data), |
|
| 600 | 600 | 'Content-Language: en-US', |
| 601 | 601 | ); |
| 602 | 602 | |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | * @return void |
| 618 | 618 | */ |
| 619 | 619 | function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) { |
| 620 | - $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
| 620 | + $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
| 621 | 621 | if (bigbluebuttonbn_is_meeting_running($meetingid)) { |
| 622 | 622 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
| 623 | 623 | } |
@@ -637,9 +637,9 @@ discard block |
||
| 637 | 637 | if ($userroles) { |
| 638 | 638 | $where = ''; |
| 639 | 639 | foreach ($userroles as $userrole) { |
| 640 | - $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid; |
|
| 640 | + $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid; |
|
| 641 | 641 | } |
| 642 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
| 642 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
| 643 | 643 | } |
| 644 | 644 | return $userroles; |
| 645 | 645 | } |
@@ -984,9 +984,9 @@ discard block |
||
| 984 | 984 | if ($voicebridge == 0) { |
| 985 | 985 | return true; |
| 986 | 986 | } |
| 987 | - $select = 'voicebridge = ' . $voicebridge; |
|
| 987 | + $select = 'voicebridge = '.$voicebridge; |
|
| 988 | 988 | if ($instance != 0) { |
| 989 | - $select .= ' AND id <>' . $instance; |
|
| 989 | + $select .= ' AND id <>'.$instance; |
|
| 990 | 990 | } |
| 991 | 991 | if (!$DB->get_records_select('bigbluebuttonbn', $select)) { |
| 992 | 992 | return true; |
@@ -1122,7 +1122,7 @@ discard block |
||
| 1122 | 1122 | function bigbluebuttonbn_generate_nonce() { |
| 1123 | 1123 | $mt = microtime(); |
| 1124 | 1124 | $rand = mt_rand(); |
| 1125 | - return md5($mt . $rand); |
|
| 1125 | + return md5($mt.$rand); |
|
| 1126 | 1126 | } |
| 1127 | 1127 | |
| 1128 | 1128 | /** |
@@ -1170,7 +1170,7 @@ discard block |
||
| 1170 | 1170 | $params['other'] = $options['other']; |
| 1171 | 1171 | } |
| 1172 | 1172 | $event = call_user_func_array( |
| 1173 | - '\mod_bigbluebuttonbn\event\\' . $type . '::create', |
|
| 1173 | + '\mod_bigbluebuttonbn\event\\'.$type.'::create', |
|
| 1174 | 1174 | array($params) |
| 1175 | 1175 | ); |
| 1176 | 1176 | $event->add_record_snapshot('course_modules', $cm); |
@@ -1328,7 +1328,7 @@ discard block |
||
| 1328 | 1328 | * @return object |
| 1329 | 1329 | */ |
| 1330 | 1330 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1331 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
| 1331 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
| 1332 | 1332 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
| 1333 | 1333 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 1334 | 1334 | $urldefaultconfig, |
@@ -1348,9 +1348,9 @@ discard block |
||
| 1348 | 1348 | * @return string |
| 1349 | 1349 | */ |
| 1350 | 1350 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
| 1351 | - $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
| 1351 | + $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
| 1352 | 1352 | $sharedsecret = \mod_bigbluebuttonbn\locallib\config::get('shared_secret'); |
| 1353 | - $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . $sharedsecret); |
|
| 1353 | + $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.$sharedsecret); |
|
| 1354 | 1354 | return $configxmlparams; |
| 1355 | 1355 | } |
| 1356 | 1356 | |
@@ -1456,7 +1456,7 @@ discard block |
||
| 1456 | 1456 | global $USER; |
| 1457 | 1457 | $starttime = $starttime - ($starttime % 1000); |
| 1458 | 1458 | // Set formatted date. |
| 1459 | - $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
| 1459 | + $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
| 1460 | 1460 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
| 1461 | 1461 | } |
| 1462 | 1462 | |
@@ -1504,11 +1504,11 @@ discard block |
||
| 1504 | 1504 | $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload); |
| 1505 | 1505 | } |
| 1506 | 1506 | $head = html_writer::start_tag('div', array( |
| 1507 | - 'id' => 'recording-actionbar-' . $recording['recordID'], |
|
| 1507 | + 'id' => 'recording-actionbar-'.$recording['recordID'], |
|
| 1508 | 1508 | 'data-recordingid' => $recording['recordID'], |
| 1509 | 1509 | 'data-meetingid' => $recording['meetingID'])); |
| 1510 | 1510 | $tail = html_writer::end_tag('div'); |
| 1511 | - return $head . $actionbar . $tail; |
|
| 1511 | + return $head.$actionbar.$tail; |
|
| 1512 | 1512 | } |
| 1513 | 1513 | |
| 1514 | 1514 | /** |
@@ -1572,7 +1572,7 @@ discard block |
||
| 1572 | 1572 | * @return string |
| 1573 | 1573 | */ |
| 1574 | 1574 | function bigbluebuttonbn_get_recording_data_row_preview($recording) { |
| 1575 | - $options = array('id' => 'preview-' . $recording['recordID']); |
|
| 1575 | + $options = array('id' => 'preview-'.$recording['recordID']); |
|
| 1576 | 1576 | if ($recording['published'] === 'false') { |
| 1577 | 1577 | $options['hidden'] = 'hidden'; |
| 1578 | 1578 | } |
@@ -1604,7 +1604,7 @@ discard block |
||
| 1604 | 1604 | $recordingpreview .= html_writer::start_tag('div', array('class' => '')); |
| 1605 | 1605 | $recordingpreview .= html_writer::empty_tag( |
| 1606 | 1606 | 'img', |
| 1607 | - array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left') |
|
| 1607 | + array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left') |
|
| 1608 | 1608 | ); |
| 1609 | 1609 | $recordingpreview .= html_writer::end_tag('div'); |
| 1610 | 1610 | } |
@@ -1639,7 +1639,7 @@ discard block |
||
| 1639 | 1639 | if ($recording['published'] === 'false') { |
| 1640 | 1640 | $visibility = 'hidden '; |
| 1641 | 1641 | } |
| 1642 | - $id = 'playbacks-' . $recording['recordID']; |
|
| 1642 | + $id = 'playbacks-'.$recording['recordID']; |
|
| 1643 | 1643 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1644 | 1644 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
| 1645 | 1645 | 'title' => $title, $visibility => $visibility)); |
@@ -1665,13 +1665,13 @@ discard block |
||
| 1665 | 1665 | return ''; |
| 1666 | 1666 | } |
| 1667 | 1667 | $text = bigbluebuttonbn_get_recording_type_text($playback['type']); |
| 1668 | - $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
|
| 1669 | - '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1668 | + $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id. |
|
| 1669 | + '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type']; |
|
| 1670 | 1670 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1671 | - $href .= '&href=' . urlencode(trim($playback['url'])); |
|
| 1671 | + $href .= '&href='.urlencode(trim($playback['url'])); |
|
| 1672 | 1672 | } |
| 1673 | 1673 | $linkattributes = array( |
| 1674 | - 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], |
|
| 1674 | + 'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'], |
|
| 1675 | 1675 | 'class' => 'btn btn-sm btn-default', |
| 1676 | 1676 | 'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);', |
| 1677 | 1677 | 'data-action' => 'play', |
@@ -1683,7 +1683,7 @@ discard block |
||
| 1683 | 1683 | $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
| 1684 | 1684 | unset($linkattributes['data-href']); |
| 1685 | 1685 | } |
| 1686 | - return $OUTPUT->action_link('#', $text, null, $linkattributes) . ' '; |
|
| 1686 | + return $OUTPUT->action_link('#', $text, null, $linkattributes).' '; |
|
| 1687 | 1687 | } |
| 1688 | 1688 | |
| 1689 | 1689 | /** |
@@ -1696,7 +1696,7 @@ discard block |
||
| 1696 | 1696 | function bigbluebuttonbn_get_recording_type_text($playbacktype) { |
| 1697 | 1697 | // Check first if string exists, and if it does'nt just default to the capitalised version of the string. |
| 1698 | 1698 | $text = ucwords($playbacktype); |
| 1699 | - $typestringid = 'view_recording_format_' . $playbacktype; |
|
| 1699 | + $typestringid = 'view_recording_format_'.$playbacktype; |
|
| 1700 | 1700 | if (get_string_manager()->string_exists($typestringid, 'bigbluebuttonbn')) { |
| 1701 | 1701 | $text = get_string($typestringid, 'bigbluebuttonbn'); |
| 1702 | 1702 | } |
@@ -1726,7 +1726,7 @@ discard block |
||
| 1726 | 1726 | $validatedurls[$urlhost] = true; |
| 1727 | 1727 | $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD'); |
| 1728 | 1728 | if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) { |
| 1729 | - $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code']; |
|
| 1729 | + $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code']; |
|
| 1730 | 1730 | debugging($error, DEBUG_DEVELOPER); |
| 1731 | 1731 | $validatedurls[$urlhost] = false; |
| 1732 | 1732 | } |
@@ -1817,12 +1817,12 @@ discard block |
||
| 1817 | 1817 | * @return string |
| 1818 | 1818 | */ |
| 1819 | 1819 | function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) { |
| 1820 | - $htmltext = '<span>' . htmlentities($text) . '</span>'; |
|
| 1820 | + $htmltext = '<span>'.htmlentities($text).'</span>'; |
|
| 1821 | 1821 | if (empty($data)) { |
| 1822 | 1822 | return $htmltext; |
| 1823 | 1823 | } |
| 1824 | - $target = $data['action'] . '-' . $data['target']; |
|
| 1825 | - $id = 'recording-' . $target . '-' . $data['recordingid']; |
|
| 1824 | + $target = $data['action'].'-'.$data['target']; |
|
| 1825 | + $id = 'recording-'.$target.'-'.$data['recordingid']; |
|
| 1826 | 1826 | $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20', |
| 1827 | 1827 | 'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'], |
| 1828 | 1828 | 'data-target' => $data['target'], 'data-source' => $source); |
@@ -1830,7 +1830,7 @@ discard block |
||
| 1830 | 1830 | $tail = html_writer::end_tag('div'); |
| 1831 | 1831 | $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']); |
| 1832 | 1832 | $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload); |
| 1833 | - return $head . $htmltext . $htmllink . $tail; |
|
| 1833 | + return $head.$htmltext.$htmllink.$tail; |
|
| 1834 | 1834 | } |
| 1835 | 1835 | |
| 1836 | 1836 | /** |
@@ -1848,10 +1848,10 @@ discard block |
||
| 1848 | 1848 | } |
| 1849 | 1849 | $target = $data['action']; |
| 1850 | 1850 | if (isset($data['target'])) { |
| 1851 | - $target .= '-' . $data['target']; |
|
| 1851 | + $target .= '-'.$data['target']; |
|
| 1852 | 1852 | } |
| 1853 | - $id = 'recording-' . $target . '-' . $recording['recordID']; |
|
| 1854 | - $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;'; |
|
| 1853 | + $id = 'recording-'.$target.'-'.$recording['recordID']; |
|
| 1854 | + $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this); return false;'; |
|
| 1855 | 1855 | if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
| 1856 | 1856 | // With icon for $manageaction. |
| 1857 | 1857 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
@@ -1866,13 +1866,13 @@ discard block |
||
| 1866 | 1866 | ); |
| 1867 | 1867 | } |
| 1868 | 1868 | if (isset($data['disabled'])) { |
| 1869 | - $iconattributes['class'] .= ' fa-' . $data['disabled']; |
|
| 1869 | + $iconattributes['class'] .= ' fa-'.$data['disabled']; |
|
| 1870 | 1870 | $linkattributes['class'] = 'disabled'; |
| 1871 | 1871 | unset($linkattributes['onclick']); |
| 1872 | 1872 | } |
| 1873 | 1873 | $icon = new pix_icon( |
| 1874 | - 'i/' . $data['tag'], |
|
| 1875 | - get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
|
| 1874 | + 'i/'.$data['tag'], |
|
| 1875 | + get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'), |
|
| 1876 | 1876 | 'moodle', |
| 1877 | 1877 | $iconattributes |
| 1878 | 1878 | ); |
@@ -1912,7 +1912,7 @@ discard block |
||
| 1912 | 1912 | if ($bbbsession['managerecordings']) { |
| 1913 | 1913 | $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn'); |
| 1914 | 1914 | $table->align[] = 'left'; |
| 1915 | - $table->size[] = (count($tools) * 40) . 'px'; |
|
| 1915 | + $table->size[] = (count($tools) * 40).'px'; |
|
| 1916 | 1916 | } |
| 1917 | 1917 | // Get the groups of the user. |
| 1918 | 1918 | $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']); |
@@ -1967,7 +1967,7 @@ discard block |
||
| 1967 | 1967 | */ |
| 1968 | 1968 | function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) { |
| 1969 | 1969 | $row = new html_table_row(); |
| 1970 | - $row->id = 'recording-tr-' . $recording['recordID']; |
|
| 1970 | + $row->id = 'recording-tr-'.$recording['recordID']; |
|
| 1971 | 1971 | $row->attributes['data-imported'] = 'false'; |
| 1972 | 1972 | $texthead = ''; |
| 1973 | 1973 | $texttail = ''; |
@@ -1979,13 +1979,13 @@ discard block |
||
| 1979 | 1979 | } |
| 1980 | 1980 | $rowdata->date_formatted = str_replace(' ', ' ', $rowdata->date_formatted); |
| 1981 | 1981 | $row->cells = array(); |
| 1982 | - $row->cells[] = $texthead . $rowdata->playback . $texttail; |
|
| 1983 | - $row->cells[] = $texthead . $rowdata->recording . $texttail; |
|
| 1984 | - $row->cells[] = $texthead . $rowdata->description . $texttail; |
|
| 1982 | + $row->cells[] = $texthead.$rowdata->playback.$texttail; |
|
| 1983 | + $row->cells[] = $texthead.$rowdata->recording.$texttail; |
|
| 1984 | + $row->cells[] = $texthead.$rowdata->description.$texttail; |
|
| 1985 | 1985 | if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) { |
| 1986 | 1986 | $row->cells[] = $rowdata->preview; |
| 1987 | 1987 | } |
| 1988 | - $row->cells[] = $texthead . $rowdata->date_formatted . $texttail; |
|
| 1988 | + $row->cells[] = $texthead.$rowdata->date_formatted.$texttail; |
|
| 1989 | 1989 | $row->cells[] = $rowdata->duration_formatted; |
| 1990 | 1990 | if ($bbbsession['managerecordings']) { |
| 1991 | 1991 | $row->cells[] = $rowdata->actionbar; |
@@ -2111,7 +2111,7 @@ discard block |
||
| 2111 | 2111 | // Enqueue it. |
| 2112 | 2112 | \core\task\manager::queue_adhoc_task($task); |
| 2113 | 2113 | } catch (Exception $e) { |
| 2114 | - mtrace("Error while enqueuing completion_update_state task. " . (string) $e); |
|
| 2114 | + mtrace("Error while enqueuing completion_update_state task. ".(string) $e); |
|
| 2115 | 2115 | } |
| 2116 | 2116 | } |
| 2117 | 2117 | |
@@ -2279,17 +2279,17 @@ discard block |
||
| 2279 | 2279 | * @return string containing the sql used for getting the target bigbluebuttonbn instances |
| 2280 | 2280 | */ |
| 2281 | 2281 | function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
| 2282 | - $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
| 2282 | + $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
| 2283 | 2283 | if (empty($courseid)) { |
| 2284 | 2284 | $courseid = 0; |
| 2285 | 2285 | } |
| 2286 | 2286 | if (empty($bigbluebuttonbnid)) { |
| 2287 | - return $sql . " AND courseid = {$courseid}"; |
|
| 2287 | + return $sql." AND courseid = {$courseid}"; |
|
| 2288 | 2288 | } |
| 2289 | 2289 | if ($subset) { |
| 2290 | - return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2290 | + return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2291 | 2291 | } |
| 2292 | - return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2292 | + return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2293 | 2293 | } |
| 2294 | 2294 | |
| 2295 | 2295 | /** |
@@ -2303,17 +2303,17 @@ discard block |
||
| 2303 | 2303 | * @return string containing the sql used for getting the target bigbluebuttonbn instances |
| 2304 | 2304 | */ |
| 2305 | 2305 | function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
| 2306 | - $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'"; |
|
| 2306 | + $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'"; |
|
| 2307 | 2307 | if (empty($courseid)) { |
| 2308 | 2308 | $courseid = 0; |
| 2309 | 2309 | } |
| 2310 | 2310 | if (empty($bigbluebuttonbnid)) { |
| 2311 | - return $sql . " AND courseid = '{$courseid}'"; |
|
| 2311 | + return $sql." AND courseid = '{$courseid}'"; |
|
| 2312 | 2312 | } |
| 2313 | 2313 | if ($subset) { |
| 2314 | - return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2314 | + return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2315 | 2315 | } |
| 2316 | - return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2316 | + return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2317 | 2317 | } |
| 2318 | 2318 | |
| 2319 | 2319 | /** |
@@ -2372,7 +2372,7 @@ discard block |
||
| 2372 | 2372 | } |
| 2373 | 2373 | // Prepare select for loading records based on existent bigbluebuttonbns. |
| 2374 | 2374 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
| 2375 | - $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
| 2375 | + $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
| 2376 | 2376 | // Include only Create events and exclude those with record not true. |
| 2377 | 2377 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
| 2378 | 2378 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2557,8 +2557,8 @@ discard block |
||
| 2557 | 2557 | require_once($CFG->dirroot.'/calendar/lib.php'); |
| 2558 | 2558 | $activitytime = ''; |
| 2559 | 2559 | if ($time) { |
| 2560 | - $activitytime = calendar_day_representation($time) . ' ' . |
|
| 2561 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
| 2560 | + $activitytime = calendar_day_representation($time).' '. |
|
| 2561 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2562 | 2562 | calendar_time_representation($time); |
| 2563 | 2563 | } |
| 2564 | 2564 | return $activitytime; |
@@ -3107,16 +3107,16 @@ discard block |
||
| 3107 | 3107 | return $output; |
| 3108 | 3108 | } |
| 3109 | 3109 | $output .= $OUTPUT->box_start( |
| 3110 | - 'box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
|
| 3110 | + 'box boxalignleft adminerror alert alert-'.$type.' alert-block fade in', |
|
| 3111 | 3111 | 'bigbluebuttonbn_view_general_warning' |
| 3112 | - ) . "\n"; |
|
| 3113 | - $output .= ' ' . $message . "\n"; |
|
| 3114 | - $output .= ' <div class="singlebutton pull-right">' . "\n"; |
|
| 3112 | + )."\n"; |
|
| 3113 | + $output .= ' '.$message."\n"; |
|
| 3114 | + $output .= ' <div class="singlebutton pull-right">'."\n"; |
|
| 3115 | 3115 | if (!empty($href)) { |
| 3116 | 3116 | $output .= bigbluebuttonbn_render_warning_button($href, $text, $class); |
| 3117 | 3117 | } |
| 3118 | - $output .= ' </div>' . "\n"; |
|
| 3119 | - $output .= $OUTPUT->box_end() . "\n"; |
|
| 3118 | + $output .= ' </div>'."\n"; |
|
| 3119 | + $output .= $OUTPUT->box_end()."\n"; |
|
| 3120 | 3120 | return $output; |
| 3121 | 3121 | } |
| 3122 | 3122 | |
@@ -3140,11 +3140,11 @@ discard block |
||
| 3140 | 3140 | if ($class == '') { |
| 3141 | 3141 | $class = 'btn btn-secondary'; |
| 3142 | 3142 | } |
| 3143 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
| 3144 | - $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
| 3145 | - $output .= ' title="' . $title . '"' . "\n"; |
|
| 3146 | - $output .= ' >' . $text . '</button>' . "\n"; |
|
| 3147 | - $output .= ' </form>' . "\n"; |
|
| 3143 | + $output = ' <form method="post" action="'.$href.'" class="form-inline">'."\n"; |
|
| 3144 | + $output .= ' <button type="submit" class="'.$class.'"'."\n"; |
|
| 3145 | + $output .= ' title="'.$title.'"'."\n"; |
|
| 3146 | + $output .= ' >'.$text.'</button>'."\n"; |
|
| 3147 | + $output .= ' </form>'."\n"; |
|
| 3148 | 3148 | return $output; |
| 3149 | 3149 | } |
| 3150 | 3150 | |
@@ -3208,7 +3208,7 @@ discard block |
||
| 3208 | 3208 | function bigbluebuttonbn_user_can_join_meeting($bigbluebuttonbn, $mid = null, $userid = null) { |
| 3209 | 3209 | // By default, use a meetingid without groups. |
| 3210 | 3210 | if (empty($mid)) { |
| 3211 | - $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
| 3211 | + $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
| 3212 | 3212 | } |
| 3213 | 3213 | // When meeting is running, all authorized users can join right in. |
| 3214 | 3214 | if (bigbluebuttonbn_is_meeting_running($mid)) { |
@@ -3277,7 +3277,7 @@ discard block |
||
| 3277 | 3277 | * @return boolean |
| 3278 | 3278 | */ |
| 3279 | 3279 | function bigbluebuttonbn_has_html5_client() { |
| 3280 | - $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check"; |
|
| 3280 | + $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check"; |
|
| 3281 | 3281 | $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD'); |
| 3282 | 3282 | return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200); |
| 3283 | 3283 | } |
@@ -3305,7 +3305,7 @@ discard block |
||
| 3305 | 3305 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
| 3306 | 3306 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
| 3307 | 3307 | // Database info related to the activity. |
| 3308 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
| 3308 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
| 3309 | 3309 | $bbbsession['bigbluebuttonbn']->id; |
| 3310 | 3310 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 3311 | 3311 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -3337,12 +3337,12 @@ discard block |
||
| 3337 | 3337 | if ($bbbsession['bigbluebuttonbn']->record) { |
| 3338 | 3338 | // Check if is enable record all from start. |
| 3339 | 3339 | if ($bbbsession['recordallfromstart']) { |
| 3340 | - $bbbsession['welcome'] .= '<br><br>' . get_string( |
|
| 3340 | + $bbbsession['welcome'] .= '<br><br>'.get_string( |
|
| 3341 | 3341 | 'bbbrecordallfromstartwarning', |
| 3342 | 3342 | 'bigbluebuttonbn' |
| 3343 | 3343 | ); |
| 3344 | 3344 | } else { |
| 3345 | - $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 3345 | + $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 3346 | 3346 | } |
| 3347 | 3347 | } |
| 3348 | 3348 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
@@ -3357,7 +3357,7 @@ discard block |
||
| 3357 | 3357 | $bbbsession['originServerName'] = $parsedurl['host']; |
| 3358 | 3358 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
| 3359 | 3359 | $bbbsession['originServerCommonName'] = ''; |
| 3360 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
| 3360 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
| 3361 | 3361 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
| 3362 | 3362 | // Setting for clienttype, assign flash if not enabled, or default if not editable. |
| 3363 | 3363 | $bbbsession['clienttype'] = BIGBLUEBUTTON_CLIENTTYPE_FLASH; |
@@ -3464,7 +3464,7 @@ discard block |
||
| 3464 | 3464 | if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
| 3465 | 3465 | $metadata["bn-recording-status"] = json_encode( |
| 3466 | 3466 | array( |
| 3467 | - 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
|
| 3467 | + 'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'), |
|
| 3468 | 3468 | 'context' => $bbbsession['bigbluebuttonbnURL'], |
| 3469 | 3469 | ) |
| 3470 | 3470 | ); |