Skip to content

Commit

Permalink
MDL-73218 mod_bigbluebuttonbn: Remove phased out settings
Browse files Browse the repository at this point in the history
* Remove deprecated settings :
  - bigbluebuttonbn_recordings_validate_url,
  - bigbluebuttonbn_recordings_html_default,
  - bigbluebuttonbn_recordings_html_editable
  • Loading branch information
laurentdavid committed Jan 17, 2022
1 parent 0e18847 commit 3d197d7
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 66 deletions.
6 changes: 0 additions & 6 deletions mod/bigbluebuttonbn/classes/local/config.php
Expand Up @@ -72,15 +72,12 @@ protected static function defaultvalues() {
'participant_moderator_default' => '0',
'scheduled_pre_opening' => '10',
'recordings_enabled' => true,
'recordings_html_default' => false,
'recordings_html_editable' => false,
'recordings_deleted_default' => false,
'recordings_deleted_editable' => false,
'recordings_imported_default' => false,
'recordings_imported_editable' => false,
'recordings_preview_default' => true,
'recordings_preview_editable' => false,
'recordings_validate_url' => true,
'recording_default' => true,
'recording_editable' => true,
'recording_refresh_period' => recording::RECORDING_REFRESH_DEFAULT_PERIOD,
Expand Down Expand Up @@ -188,15 +185,12 @@ public static function get_options() {
'sendnotifications_enabled' => self::get('sendnotifications_enabled'),
'recordings_enabled' => self::get('recordings_enabled'),
'meetingevents_enabled' => self::get('meetingevents_enabled'),
'recordings_html_default' => self::get('recordings_html_default'),
'recordings_html_editable' => self::get('recordings_html_editable'),
'recordings_deleted_default' => self::get('recordings_deleted_default'),
'recordings_deleted_editable' => self::get('recordings_deleted_editable'),
'recordings_imported_default' => self::get('recordings_imported_default'),
'recordings_imported_editable' => self::get('recordings_imported_editable'),
'recordings_preview_default' => self::get('recordings_preview_default'),
'recordings_preview_editable' => self::get('recordings_preview_editable'),
'recordings_validate_url' => self::get('recordings_validate_url'),
'recording_default' => self::get('recording_default'),
'recording_editable' => self::get('recording_editable'),
'recording_refresh_period' => self::get('recording_refresh_period'),
Expand Down
3 changes: 0 additions & 3 deletions mod/bigbluebuttonbn/classes/local/helpers/mod_helper.php
Expand Up @@ -122,9 +122,6 @@ protected static function process_pre_save_checkboxes($bigbluebuttonbn) {
if (!isset($bigbluebuttonbn->lockonjoinconfigurable)) {
$bigbluebuttonbn->lockonjoinconfigurable = 0;
}
if (!isset($bigbluebuttonbn->recordings_validate_url)) {
$bigbluebuttonbn->recordings_validate_url = 1;
}
}

/**
Expand Down
5 changes: 1 addition & 4 deletions mod/bigbluebuttonbn/classes/output/recording_row_preview.php
Expand Up @@ -69,11 +69,8 @@ public function export_for_template(renderer_base $output): stdClass {

if (isset($playback['preview'])) {
foreach ($playback['preview'] as $image) {
$validated = true;
$url = trim($image['url']);
if ($CFG->bigbluebuttonbn_recordings_validate_url) {
$validated = bigbluebutton_proxy::is_remote_resource_valid($url);
}
$validated = bigbluebutton_proxy::is_remote_resource_valid($url);
if ($validated) {
$thumbnails[] = $url . '?' . time();
}
Expand Down
5 changes: 1 addition & 4 deletions mod/bigbluebuttonbn/classes/setting_validator.php
Expand Up @@ -75,15 +75,12 @@ public static function section_import_recordings_shown() {
*/
public static function section_show_recordings_shown() {
global $CFG;
return (!isset($CFG->bigbluebuttonbn['recordings_html_default']) ||
!isset($CFG->bigbluebuttonbn['recordings_html_editable']) ||
!isset($CFG->bigbluebuttonbn['recordings_deleted_default']) ||
return (!isset($CFG->bigbluebuttonbn['recordings_deleted_default']) ||
!isset($CFG->bigbluebuttonbn['recordings_deleted_editable']) ||
!isset($CFG->bigbluebuttonbn['recordings_imported_default']) ||
!isset($CFG->bigbluebuttonbn['recordings_imported_editable']) ||
!isset($CFG->bigbluebuttonbn['recordings_preview_default']) ||
!isset($CFG->bigbluebuttonbn['recordings_preview_editable']) ||
!isset($CFG->bigbluebuttonbn['recordings_validate_url']) ||
!isset($CFG->bigbluebuttonbn['recording_protect_editable'])
);
}
Expand Down
33 changes: 0 additions & 33 deletions mod/bigbluebuttonbn/classes/settings.php
Expand Up @@ -376,28 +376,6 @@ protected function add_showrecordings_settings(): void {
get_string('config_recordings_description', 'bigbluebuttonbn')
);
$showrecordingsettings->add($item);
$item = new admin_setting_configcheckbox(
'bigbluebuttonbn_recordings_html_default',
get_string('config_recordings_html_default', 'bigbluebuttonbn'),
get_string('config_recordings_html_default_description', 'bigbluebuttonbn'),
1
);
$this->add_conditional_element(
'recordings_html_default',
$item,
$showrecordingsettings
);
$item = new admin_setting_configcheckbox(
'bigbluebuttonbn_recordings_html_editable',
get_string('config_recordings_html_editable', 'bigbluebuttonbn'),
get_string('config_recordings_html_editable_description', 'bigbluebuttonbn'),
0
);
$this->add_conditional_element(
'recordings_html_editable',
$item,
$showrecordingsettings
);
$item = new admin_setting_configcheckbox(
'bigbluebuttonbn_recordings_deleted_default',
get_string('config_recordings_deleted_default', 'bigbluebuttonbn'),
Expand Down Expand Up @@ -475,17 +453,6 @@ protected function add_showrecordings_settings(): void {
$item,
$showrecordingsettings
);
$item = new admin_setting_configcheckbox(
'bigbluebuttonbn_recordings_validate_url',
get_string('config_recordings_validate_url', 'bigbluebuttonbn'),
get_string('config_recordings_validate_url_description', 'bigbluebuttonbn'),
1
);
$this->add_conditional_element(
'recordings_validate_url',
$item,
$showrecordingsettings
);
$item = new admin_setting_configcheckbox(
'bigbluebuttonbn_recording_protect_editable',
get_string('config_recording_protect_editable', 'bigbluebuttonbn'),
Expand Down
6 changes: 0 additions & 6 deletions mod/bigbluebuttonbn/lang/en/bigbluebuttonbn.php
Expand Up @@ -156,10 +156,6 @@
$string['config_recordings_description'] = 'These settings are feature specific';
$string['config_recordings_general'] = 'Show recording settings';
$string['config_recordings_general_description'] = 'These settings are used only when showing recordings';
$string['config_recordings_html_default'] = 'UI as html is enabled by default';
$string['config_recordings_html_default_description'] = 'If enabled the recording table is shown in plain HTML by default.';
$string['config_recordings_html_editable'] = 'UI as html feature can be edited';
$string['config_recordings_html_editable_description'] = 'UI as html value by default can be edited when the instance is added or updated.';
$string['config_recordings_deleted_default'] = 'Include recordings from deleted activities enabled by default';
$string['config_recordings_deleted_default_description'] = 'If enabled the recording table will include the recordings belonging to deleted activities if there is any.';
$string['config_recordings_deleted_editable'] = 'Include recordings from deleted activities feature can be edited';
Expand All @@ -174,8 +170,6 @@
$string['config_recordings_preview_editable_description'] = 'Preview feature can be edited when the instance is added or updated.';
$string['config_recordings_sortorder'] = 'Order the recordings in ascending order.';
$string['config_recordings_sortorder_description'] = 'By default recordings are displayed in descending order. When checked they will be sorted in ascending order.';
$string['config_recordings_validate_url'] = 'Validate URL';
$string['config_recordings_validate_url_description'] = 'If checked the playback URL will be validated before the user access it.';

$string['config_importrecordings'] = 'Configuration for "Import recordings" feature';
$string['config_importrecordings_description'] = 'These settings are feature specific';
Expand Down
11 changes: 1 addition & 10 deletions mod/bigbluebuttonbn/mod_form.php
Expand Up @@ -511,15 +511,6 @@ private function bigbluebuttonbn_mform_add_block_locksettings(MoodleQuickForm &$
*/
private function bigbluebuttonbn_mform_add_block_room_recordings(MoodleQuickForm &$mform, array $cfg): void {
$recordingsettings = false;
$field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT,
'description_key' => null];
if ($cfg['recordings_html_editable']) {
$field['type'] = 'checkbox';
$field['description_key'] = 'mod_form_field_recordings_html';
$recordingsettings = true;
}
$this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
$field['description_key'], $cfg['recordings_html_default']);
$field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT,
'description_key' => null];
if ($cfg['recordings_deleted_editable']) {
Expand Down Expand Up @@ -569,7 +560,7 @@ private function bigbluebuttonbn_mform_add_block_room(MoodleQuickForm &$mform, a
$mform->addElement('header', 'room', get_string('mod_form_block_room', 'bigbluebuttonbn'));
$this->bigbluebuttonbn_mform_add_block_room_room($mform, $cfg);
}
if ($cfg['recordings_html_editable'] || $cfg['recordings_deleted_editable'] ||
if ($cfg['recordings_deleted_editable'] ||
$cfg['recordings_imported_editable'] || $cfg['recordings_preview_editable']) {
$mform->addElement('header', 'recordings', get_string('mod_form_block_recordings', 'bigbluebuttonbn'));
$this->bigbluebuttonbn_mform_add_block_room_recordings($mform, $cfg);
Expand Down

0 comments on commit 3d197d7

Please sign in to comment.