original_string: public function definition_after_data() {
  
          $mform = $this->_form;
  
          // The default end date depends on the course format.
          $format = course_get_format((object)array('format' => get_config('moodlecourse', 'format')));
  
          // Check if course end date form field should be enabled by default.
          // If a default date is provided to the form element, it is magically enabled by default in the
          // MoodleQuickForm_date_time_selector class, otherwise it's disabled by default.
          if (get_config('moodlecourse', 'courseenddateenabled')) {
              $enddate = $format->get_default_course_enddate($mform, array('startdate' => 'defaults[startdate]'));
              $mform->setDefault('defaults[enddate]', $enddate);
          }
      }
code: public function definition_after_data() {
  
          $mform = $this->_form;
  
          // The default end date depends on the course format.
          $format = course_get_format((object)array('format' => get_config('moodlecourse', 'format')));
  
          // Check if course end date form field should be enabled by default.
          // If a default date is provided to the form element, it is magically enabled by default in the
          // MoodleQuickForm_date_time_selector class, otherwise it's disabled by default.
          if (get_config('moodlecourse', 'courseenddateenabled')) {
              $enddate = $format->get_default_course_enddate($mform, array('startdate' => 'defaults[startdate]'));
              $mform->setDefault('defaults[enddate]', $enddate);
          }
      }
code_tokens: public function definition_after_data ( ) { $ mform = $ this -> _form ; // The default end date depends on the course format. $ format = course_get_format ( ( object ) array ( 'format' => get_config ( 'moodlecourse' , 'format' ) ) ) ; // Check if course end date form field should be enabled by default. // If a default date is provided to the form element, it is magically enabled by default in the // MoodleQuickForm_date_time_selector class, otherwise it's disabled by default. if ( get_config ( 'moodlecourse' , 'courseenddateenabled' ) ) { $ enddate = $ format -> get_default_course_enddate ( $ mform , array ( 'startdate' => 'defaults[startdate]' ) ) ; $ mform -> setDefault ( 'defaults[enddate]' , $ enddate ) ; } }
docstring: Sets the enddate default after set_data is called.
docstring_tokens: Sets the enddate default after set_data is called .