original_string: public function config_form_definition(\MoodleQuickForm $mform) {
          $mform->addElement('header', 'course_handler_header', get_string('customfieldsettings', 'core_course'));
          $mform->setExpanded('course_handler_header', true);
  
          // If field is locked.
          $mform->addElement('selectyesno', 'configdata[locked]', get_string('customfield_islocked', 'core_course'));
          $mform->addHelpButton('configdata[locked]', 'customfield_islocked', 'core_course');
  
          // Field data visibility.
          $visibilityoptions = [self::VISIBLETOALL => get_string('customfield_visibletoall', 'core_course'),
              self::VISIBLETOTEACHERS => get_string('customfield_visibletoteachers', 'core_course'),
              self::NOTVISIBLE => get_string('customfield_notvisible', 'core_course')];
          $mform->addElement('select', 'configdata[visibility]', get_string('customfield_visibility', 'core_course'),
              $visibilityoptions);
          $mform->addHelpButton('configdata[visibility]', 'customfield_visibility', 'core_course');
      }
code: public function config_form_definition(\MoodleQuickForm $mform) {
          $mform->addElement('header', 'course_handler_header', get_string('customfieldsettings', 'core_course'));
          $mform->setExpanded('course_handler_header', true);
  
          // If field is locked.
          $mform->addElement('selectyesno', 'configdata[locked]', get_string('customfield_islocked', 'core_course'));
          $mform->addHelpButton('configdata[locked]', 'customfield_islocked', 'core_course');
  
          // Field data visibility.
          $visibilityoptions = [self::VISIBLETOALL => get_string('customfield_visibletoall', 'core_course'),
              self::VISIBLETOTEACHERS => get_string('customfield_visibletoteachers', 'core_course'),
              self::NOTVISIBLE => get_string('customfield_notvisible', 'core_course')];
          $mform->addElement('select', 'configdata[visibility]', get_string('customfield_visibility', 'core_course'),
              $visibilityoptions);
          $mform->addHelpButton('configdata[visibility]', 'customfield_visibility', 'core_course');
      }
code_tokens: public function config_form_definition ( \ MoodleQuickForm $ mform ) { $ mform -> addElement ( 'header' , 'course_handler_header' , get_string ( 'customfieldsettings' , 'core_course' ) ) ; $ mform -> setExpanded ( 'course_handler_header' , true ) ; // If field is locked. $ mform -> addElement ( 'selectyesno' , 'configdata[locked]' , get_string ( 'customfield_islocked' , 'core_course' ) ) ; $ mform -> addHelpButton ( 'configdata[locked]' , 'customfield_islocked' , 'core_course' ) ; // Field data visibility. $ visibilityoptions = [ self :: VISIBLETOALL => get_string ( 'customfield_visibletoall' , 'core_course' ) , self :: VISIBLETOTEACHERS => get_string ( 'customfield_visibletoteachers' , 'core_course' ) , self :: NOTVISIBLE => get_string ( 'customfield_notvisible' , 'core_course' ) ] ; $ mform -> addElement ( 'select' , 'configdata[visibility]' , get_string ( 'customfield_visibility' , 'core_course' ) , $ visibilityoptions ) ; $ mform -> addHelpButton ( 'configdata[visibility]' , 'customfield_visibility' , 'core_course' ) ; }
docstring: Allows to add custom controls to the field configuration form that will be saved in configdata
  
  @param \MoodleQuickForm $mform
docstring_tokens: Allows to add custom controls to the field configuration form that will be saved in configdata