Skip to content

Commit

Permalink
A different approach to changing default recurrence type
Browse files Browse the repository at this point in the history
  • Loading branch information
Karen Liu committed Nov 28, 2023
1 parent 37e38e0 commit 5c222b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,16 @@ public function definition() {

// Add options for recurring meeting.
$recurrencetype = [
ZOOM_RECURRINGTYPE_NOTIME => get_string('recurrence_option_no_time', 'zoom'),
ZOOM_RECURRINGTYPE_DAILY => get_string('recurrence_option_daily', 'zoom'),
ZOOM_RECURRINGTYPE_WEEKLY => get_string('recurrence_option_weekly', 'zoom'),
ZOOM_RECURRINGTYPE_MONTHLY => get_string('recurrence_option_monthly', 'zoom'),
ZOOM_RECURRINGTYPE_NOTIME => get_string('recurrence_option_no_time', 'zoom'),
];
$mform->addElement('select', 'recurrence_type', get_string('recurrencetype', 'zoom'), $recurrencetype);
// If the defaultrecurring option is active, set default recurrence_type to be No Fixed Time.
if ($config->defaultrecurring == 1) {
$mform->setDefault('recurrence_type', ZOOM_RECURRINGTYPE_NOTIME);
}
$mform->hideif('recurrence_type', 'recurring', 'notchecked');

// Repeat Interval options.
Expand Down

0 comments on commit 5c222b1

Please sign in to comment.