| @@ -25,7 +25,7 @@ discard block | ||
| 25 | 25 | |
| 26 | 26 |  defined('MOODLE_INTERNAL') || die; | 
| 27 | 27 | |
| 28 | -require_once($CFG->dirroot.'/mod/bigbluebuttonbn/backup/moodle2/backup_bigbluebuttonbn_stepslib.php'); | |
| 28 | +require_once($CFG->dirroot . '/mod/bigbluebuttonbn/backup/moodle2/backup_bigbluebuttonbn_stepslib.php'); | |
| 29 | 29 | |
| 30 | 30 | /** | 
| 31 | 31 | * Backup task that provides all the settings and steps to perform one complete backup of the activity. | 
| @@ -62,14 +62,14 @@ discard block | ||
| 62 | 62 |      public static function encode_content_links($content) { | 
| 63 | 63 | global $CFG; | 
| 64 | 64 | |
| 65 | - $base = preg_quote($CFG->wwwroot.'/mod/bigbluebuttonbn', '#'); | |
| 65 | + $base = preg_quote($CFG->wwwroot . '/mod/bigbluebuttonbn', '#'); | |
| 66 | 66 | |
| 67 | 67 | // Link to the list of bigbluebuttonbns. | 
| 68 | -        $pattern = '#('.$base."\/index.php\?id\=)([0-9]+)#"; | |
| 68 | +        $pattern = '#(' . $base . "\/index.php\?id\=)([0-9]+)#"; | |
| 69 | 69 | $content = preg_replace($pattern, '$@BIGBLUEBUTTONBNINDEX*$2@$', $content); | 
| 70 | 70 | |
| 71 | 71 | // Link to bigbluebuttonbn view by moduleid. | 
| 72 | -        $pattern = '#('.$base."\/view.php\?id\=)([0-9]+)#"; | |
| 72 | +        $pattern = '#(' . $base . "\/view.php\?id\=)([0-9]+)#"; | |
| 73 | 73 | $content = preg_replace($pattern, '$@BIGBLUEBUTTONBNVIEWBYID*$2@$', $content); | 
| 74 | 74 | |
| 75 | 75 | return $content; | 
| @@ -48,7 +48,7 @@ | ||
| 48 | 48 |          $logs = new backup_nested_element('logs'); | 
| 49 | 49 | |
| 50 | 50 |          $log = new backup_nested_element('log', array('id'), array( | 
| 51 | - 'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta', )); | |
| 51 | + 'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta',)); | |
| 52 | 52 | |
| 53 | 53 | // Build the tree. | 
| 54 | 54 | $bigbluebuttonbn->add_child($logs); | 
| @@ -49,7 +49,7 @@ discard block | ||
| 49 | 49 | */ | 
| 50 | 50 |      protected function process_bigbluebuttonbn($data) { | 
| 51 | 51 | global $DB; | 
| 52 | - $data = (object) $data; | |
| 52 | + $data = (object)$data; | |
| 53 | 53 | $data->course = $this->get_courseid(); | 
| 54 | 54 | $data->timemodified = $this->apply_date_offset($data->timemodified); | 
| 55 | 55 | // Insert the bigbluebuttonbn record. | 
| @@ -65,7 +65,7 @@ discard block | ||
| 65 | 65 | */ | 
| 66 | 66 |      protected function process_bigbluebuttonbn_logs($data) { | 
| 67 | 67 | global $DB; | 
| 68 | - $data = (object) $data; | |
| 68 | + $data = (object)$data; | |
| 69 | 69 | // Apply modifications. | 
| 70 | 70 |          $data->courseid = $this->get_mappingid('course', $data->courseid); | 
| 71 | 71 |          $data->bigbluebuttonbnid = $this->get_new_parentid('bigbluebuttonbn'); | 
| @@ -25,7 +25,7 @@ | ||
| 25 | 25 | |
| 26 | 26 |  defined('MOODLE_INTERNAL') || die(); | 
| 27 | 27 | |
| 28 | -require_once($CFG->dirroot.'/mod/bigbluebuttonbn/backup/moodle2/restore_bigbluebuttonbn_stepslib.php'); | |
| 28 | +require_once($CFG->dirroot . '/mod/bigbluebuttonbn/backup/moodle2/restore_bigbluebuttonbn_stepslib.php'); | |
| 29 | 29 | |
| 30 | 30 | /** | 
| 31 | 31 | * Restore task that provides all the settings and steps to perform one complete restore of the activity. | 
| @@ -28,7 +28,7 @@ discard block | ||
| 28 | 28 |  defined('MOODLE_INTERNAL') || die(); | 
| 29 | 29 | |
| 30 | 30 | require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); | 
| 31 | -require_once($CFG->libdir.'/adminlib.php'); | |
| 31 | +require_once($CFG->libdir . '/adminlib.php'); | |
| 32 | 32 | |
| 33 | 33 | /** | 
| 34 | 34 | * Helper class for rendering HTML for settings.php. | 
| @@ -66,7 +66,7 @@ discard block | ||
| 66 | 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 | 71 |          $item = new \admin_setting_heading('bigbluebuttonbn_config_' . $name, $itemname, $itemdescription); | 
| 72 | 72 | $this->settings->add($item); | 
| @@ -148,7 +148,7 @@ discard block | ||
| 148 | 148 |      public function render_warning_message($name, $message, $type = 'warning', $closable = true) { | 
| 149 | 149 | global $OUTPUT; | 
| 150 | 150 |          $output = $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', | 
| 151 | - 'bigbluebuttonbn_' . $name)."\n"; | |
| 151 | + 'bigbluebuttonbn_' . $name) . "\n"; | |
| 152 | 152 |          if ($closable) { | 
| 153 | 153 | $output .= ' <button type="button" class="close" data-dismiss="alert">×</button>' . "\n"; | 
| 154 | 154 | } | 
| @@ -80,7 +80,7 @@ | ||
| 80 | 80 | 'objectid' => $this->objectid, | 
| 81 | 81 | 'contextinstanceid' => $this->contextinstanceid, | 
| 82 | 82 | 'other' => $this->other | 
| 83 | - ); | |
| 83 | + ); | |
| 84 | 84 | $string = $this->description; | 
| 85 | 85 |          foreach ($vars as $key => $value) { | 
| 86 | 86 |              $string = str_replace("##" . $key, $value, $string); | 
| @@ -26,7 +26,7 @@ | ||
| 26 | 26 | |
| 27 | 27 |  defined('MOODLE_INTERNAL') || die(); | 
| 28 | 28 | |
| 29 | -require_once(dirname(dirname(__FILE__)).'/locallib.php'); | |
| 29 | +require_once(dirname(dirname(__FILE__)) . '/locallib.php'); | |
| 30 | 30 | |
| 31 | 31 | /** | 
| 32 | 32 | * Performs data migrations and updates on upgrade. | 
| @@ -212,7 +212,7 @@ | ||
| 212 | 212 |              function($instanceid, $data) use ($user, $instanceidstocmids) { | 
| 213 | 213 | $context = \context_module::instance($instanceidstocmids[$instanceid]); | 
| 214 | 214 | $contextdata = helper::get_context_data($context, $user); | 
| 215 | - $finaldata = (object) array_merge((array) $contextdata, ['logs' => $data]); | |
| 215 | + $finaldata = (object)array_merge((array)$contextdata, ['logs' => $data]); | |
| 216 | 216 | helper::export_context_files($context, $user); | 
| 217 | 217 | writer::with_context($context)->export_data([], $finaldata); | 
| 218 | 218 | } | 
| @@ -61,11 +61,11 @@ discard block | ||
| 61 | 61 | */ | 
| 62 | 62 |      public static function _get_metadata(collection $collection) { | 
| 63 | 63 | |
| 64 | - // The table bigbluebuttonbn stores only the room properties. | |
| 65 | - // However, there is a chance that some personal information is stored as metadata. | |
| 66 | - // This would be done in the column 'participants' where rules can be set to define BBB roles. | |
| 67 | - // It is fair to say that only the userid is stored, which is useless if user is removed. | |
| 68 | - // But if this is a concern a refactoring on the way the rules are stored will be required. | |
| 64 | + // The table bigbluebuttonbn stores only the room properties. | |
| 65 | + // However, there is a chance that some personal information is stored as metadata. | |
| 66 | + // This would be done in the column 'participants' where rules can be set to define BBB roles. | |
| 67 | + // It is fair to say that only the userid is stored, which is useless if user is removed. | |
| 68 | + // But if this is a concern a refactoring on the way the rules are stored will be required. | |
| 69 | 69 |          $collection->add_database_table('bigbluebuttonbn', [ | 
| 70 | 70 | 'participants' => 'privacy:metadata:bigbluebuttonbn:participants', | 
| 71 | 71 | ], 'privacy:metadata:bigbluebuttonbn'); | 
| @@ -208,7 +208,7 @@ discard block | ||
| 208 | 208 | 'meetingid' => $record->meetingid, | 
| 209 | 209 | 'log' => $record->log, | 
| 210 | 210 | 'meta' => $record->meta, | 
| 211 | - ]; | |
| 211 | + ]; | |
| 212 | 212 | return $carry; | 
| 213 | 213 | }, | 
| 214 | 214 |              function($instanceid, $data) use ($user, $instanceidstocmids) { | 
| @@ -54,6 +54,7 @@ discard block | ||
| 54 | 54 | * Get the list of users who have data within a context. | 
| 55 | 55 | * | 
| 56 | 56 | * @param userlist $userlist The userlist containing the list of users who have data in this context/plugin combination. | 
| 57 | + * @return void | |
| 57 | 58 | */ | 
| 58 | 59 | public static function get_users_in_context(userlist $userlist); | 
| 59 | 60 | |
| @@ -61,6 +62,7 @@ discard block | ||
| 61 | 62 | * Delete multiple users within a single context. | 
| 62 | 63 | * | 
| 63 | 64 | * @param approved_userlist $userlist The approved context and user information to delete information for. | 
| 65 | + * @return void | |
| 64 | 66 | */ | 
| 65 | 67 | public static function delete_data_for_users(approved_userlist $userlist); | 
| 66 | 68 | } | 
| @@ -109,7 +109,7 @@ | ||
| 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() |