original_string: protected function add_event_repeat_elements($mform) {
          $event = $this->_customdata['event'];
  
          $mform->addElement('hidden', 'repeatid');
          $mform->setType('repeatid', PARAM_INT);
  
          if (!empty($event->repeatid)) {
              $group = [];
              $group[] = $mform->createElement('radio', 'repeateditall', null, get_string('repeateditall', 'calendar',
                      $event->eventrepeats), 1);
              $group[] = $mform->createElement('radio', 'repeateditall', null, get_string('repeateditthis', 'calendar'), 0);
              $mform->addGroup($group, 'repeatgroup', get_string('repeatedevents', 'calendar'), '<br />', false);
  
              $mform->setDefault('repeateditall', 1);
              $mform->setAdvanced('repeatgroup');
          }
      }
code: protected function add_event_repeat_elements($mform) {
          $event = $this->_customdata['event'];
  
          $mform->addElement('hidden', 'repeatid');
          $mform->setType('repeatid', PARAM_INT);
  
          if (!empty($event->repeatid)) {
              $group = [];
              $group[] = $mform->createElement('radio', 'repeateditall', null, get_string('repeateditall', 'calendar',
                      $event->eventrepeats), 1);
              $group[] = $mform->createElement('radio', 'repeateditall', null, get_string('repeateditthis', 'calendar'), 0);
              $mform->addGroup($group, 'repeatgroup', get_string('repeatedevents', 'calendar'), '<br />', false);
  
              $mform->setDefault('repeateditall', 1);
              $mform->setAdvanced('repeatgroup');
          }
      }
code_tokens: protected function add_event_repeat_elements ( $ mform ) { $ event = $ this -> _customdata [ 'event' ] ; $ mform -> addElement ( 'hidden' , 'repeatid' ) ; $ mform -> setType ( 'repeatid' , PARAM_INT ) ; if ( ! empty ( $ event -> repeatid ) ) { $ group = [ ] ; $ group [ ] = $ mform -> createElement ( 'radio' , 'repeateditall' , null , get_string ( 'repeateditall' , 'calendar' , $ event -> eventrepeats ) , 1 ) ; $ group [ ] = $ mform -> createElement ( 'radio' , 'repeateditall' , null , get_string ( 'repeateditthis' , 'calendar' ) , 0 ) ; $ mform -> addGroup ( $ group , 'repeatgroup' , get_string ( 'repeatedevents' , 'calendar' ) , '<br />' , false ) ; $ mform -> setDefault ( 'repeateditall' , 1 ) ; $ mform -> setAdvanced ( 'repeatgroup' ) ; } }
docstring: Add the repeat elements for the form when editing an existing event.
  
  @param MoodleQuickForm $mform
docstring_tokens: Add the repeat elements for the form when editing an existing event .