protected function definition()

in forms.php [38:54]


    protected function definition() {
        $mform = $this->_form;

        $mform->addElement('hidden', 'course');
        $mform->setType('course', PARAM_INT);

        // Sync options.
        $syncoptions = [
            MICROSOFT365_COURSE_SYNC_NONE => get_string('course_sync_option_not_synced', 'block_microsoft'),
            MICROSOFT365_COURSE_SYNC_GROUPS => get_string('course_sync_option_groups', 'block_microsoft'),
            MICROSOFT365_COURSE_SYNC_TEAMS => get_string('course_sync_option_teams', 'block_microsoft'),
        ];
        $mform->addElement('select', 'sync', get_string('course_sync_option', 'block_microsoft'), $syncoptions);
        $mform->setDefault('sync', MICROSOFT365_COURSE_SYNC_NONE);

        $this->add_action_buttons();
    }