mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-73254 mod_bigbluebuttonbn: Fix hide recording functionality
* The hide recording is working in combination with several settings and should allow the Record button to be hidden either globally on in a given activity
This commit is contained in:
parent
e63604fb6d
commit
9877868c6f
@ -731,9 +731,10 @@ EOF;
|
||||
*/
|
||||
public function should_show_recording_button(): bool {
|
||||
global $CFG;
|
||||
|
||||
if (!empty($CFG->bigbluebuttonbn_recording_hide_button_editable)) {
|
||||
return (bool) $this->get_instance_var('recordhidebutton');
|
||||
$recordhidebutton = (bool) $this->get_instance_var('recordhidebutton');
|
||||
$recordallfromstart = (bool) $this->get_instance_var('recordallfromstart');
|
||||
return !($recordhidebutton || $recordallfromstart);
|
||||
}
|
||||
|
||||
return !$CFG->bigbluebuttonbn_recording_hide_button_default;
|
||||
|
@ -336,11 +336,11 @@ class meeting {
|
||||
// Check if auto_start_record is enable.
|
||||
if ($data['record'] == 'true' && $this->instance->should_record_from_start()) {
|
||||
$data['autoStartRecording'] = 'true';
|
||||
}
|
||||
// Check if hide_record_button is enable.
|
||||
if (!$this->instance->should_show_recording_button()) {
|
||||
$data['allowStartStopRecording'] = 'false';
|
||||
}
|
||||
}
|
||||
$data['welcome'] = trim($this->instance->get_welcome_message());
|
||||
$voicebridge = intval($this->instance->get_voice_bridge());
|
||||
if ($voicebridge > 0 && $voicebridge < 79999) {
|
||||
|
@ -146,7 +146,7 @@ $string['config_recording_all_from_start_default_description'] = 'If checked the
|
||||
$string['config_recording_all_from_start_editable'] = 'Record all from start can be edited';
|
||||
$string['config_recording_all_from_start_editable_description'] = 'If checked the interface includes an option for enable and disable the record all from start feature.';
|
||||
$string['config_recording_hide_button_default'] = 'Hide recording button';
|
||||
$string['config_recording_hide_button_default_description'] = 'If checked the button for record will be hide';
|
||||
$string['config_recording_hide_button_default_description'] = 'If checked the button for record will be hidden';
|
||||
$string['config_recording_hide_button_editable'] = 'Hide recording button can be edited';
|
||||
$string['config_recording_hide_button_editable_description'] = 'If checked the interface includes an option for enable and disable the hide recording button feature.';
|
||||
$string['config_recording_refresh_period'] = 'Recording refresh period (in seconds)';
|
||||
|
@ -382,9 +382,9 @@ class mod_bigbluebuttonbn_mod_form extends moodleform_mod {
|
||||
$this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
|
||||
$field['description_key'], $cfg['recording_hide_button_default']);
|
||||
|
||||
$mform->disabledIf('recordallfromstart', 'record', $condition = 'notchecked', $value = '0');
|
||||
$mform->disabledIf('recordhidebutton', 'record', $condition = 'notchecked', $value = '0');
|
||||
$mform->disabledIf('recordhidebutton', 'recordallfromstart', $condition = 'notchecked', $value = '0');
|
||||
$mform->disabledIf('recordallfromstart', 'record');
|
||||
$mform->disabledIf('recordhidebutton', 'record');
|
||||
$mform->hideIf('recordhidebutton', 'recordallfromstart', 'checked');
|
||||
// End Record all from start and hide button.
|
||||
|
||||
$field = ['type' => 'hidden', 'name' => 'muteonstart', 'data_type' => PARAM_INT, 'description_key' => null];
|
||||
|
Loading…
x
Reference in New Issue
Block a user