This commit is contained in:
Andrew Nicols 2022-01-18 11:15:25 +08:00
commit 68a711ba9b
7 changed files with 3 additions and 66 deletions

View File

@ -72,15 +72,12 @@ class config {
'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,
@ -188,15 +185,12 @@ class config {
'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'),

View File

@ -122,9 +122,6 @@ class mod_helper {
if (!isset($bigbluebuttonbn->lockonjoinconfigurable)) {
$bigbluebuttonbn->lockonjoinconfigurable = 0;
}
if (!isset($bigbluebuttonbn->recordings_validate_url)) {
$bigbluebuttonbn->recordings_validate_url = 1;
}
}
/**

View File

@ -69,11 +69,8 @@ class recording_row_preview implements renderable, templatable {
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();
}

View File

@ -75,15 +75,12 @@ class setting_validator {
*/
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'])
);
}

View File

@ -376,28 +376,6 @@ class settings {
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'),
@ -475,17 +453,6 @@ class settings {
$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'),

View File

@ -156,10 +156,6 @@ $string['config_recordings'] = 'Configuration for "Show recordings" feature';
$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';
@ -174,8 +170,6 @@ $string['config_recordings_preview_editable'] = 'Preview feature can be edited';
$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';

View File

@ -508,15 +508,6 @@ class mod_bigbluebuttonbn_mod_form extends moodleform_mod {
*/
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']) {
@ -566,7 +557,7 @@ class mod_bigbluebuttonbn_mod_form extends moodleform_mod {
$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);