Skip to content

Commit

Permalink
Merge branch 'MDL-73254' of https://github.com/call-learning/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
rezaies committed Jan 24, 2022
2 parents 041b1be + 9877868 commit 0f803de
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions mod/bigbluebuttonbn/classes/instance.php
Original file line number Diff line number Diff line change
Expand Up @@ -731,9 +731,10 @@ public function get_current_user_password(): string {
*/
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;
Expand Down
8 changes: 4 additions & 4 deletions mod/bigbluebuttonbn/classes/meeting.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,10 @@ protected function create_meeting_data() {
// 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';
}
}
// 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());
Expand Down
2 changes: 1 addition & 1 deletion mod/bigbluebuttonbn/lang/en/bigbluebuttonbn.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
$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)';
Expand Down
6 changes: 3 additions & 3 deletions mod/bigbluebuttonbn/mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,9 @@ private function bigbluebuttonbn_mform_add_block_room_room(MoodleQuickForm &$mfo
$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];
Expand Down

0 comments on commit 0f803de

Please sign in to comment.