original_string: public function handle_form_submission(local\forms\editstep &$mform, \stdClass $data) {
          $this->set_title($data->title);
          $this->set_content($data->content);
          $this->set_targettype($data->targettype);
  
          $this->set_targetvalue($this->get_target()->get_value_from_form($data));
  
          foreach (self::get_config_keys() as $key) {
              if (!$this->get_target()->is_setting_forced($key)) {
                  if (isset($data->$key)) {
                      $value = $data->$key;
                  } else {
                      $value = configuration::TOURDEFAULT;
                  }
                  if ($value === configuration::TOURDEFAULT) {
                      $this->set_config($key, null);
                  } else {
                      $this->set_config($key, $value);
                  }
              }
          }
  
          $this->persist();
  
          return $this;
      }
code: public function handle_form_submission(local\forms\editstep &$mform, \stdClass $data) {
          $this->set_title($data->title);
          $this->set_content($data->content);
          $this->set_targettype($data->targettype);
  
          $this->set_targetvalue($this->get_target()->get_value_from_form($data));
  
          foreach (self::get_config_keys() as $key) {
              if (!$this->get_target()->is_setting_forced($key)) {
                  if (isset($data->$key)) {
                      $value = $data->$key;
                  } else {
                      $value = configuration::TOURDEFAULT;
                  }
                  if ($value === configuration::TOURDEFAULT) {
                      $this->set_config($key, null);
                  } else {
                      $this->set_config($key, $value);
                  }
              }
          }
  
          $this->persist();
  
          return $this;
      }
code_tokens: public function handle_form_submission ( local \ forms \ editstep & $ mform , \ stdClass $ data ) { $ this -> set_title ( $ data -> title ) ; $ this -> set_content ( $ data -> content ) ; $ this -> set_targettype ( $ data -> targettype ) ; $ this -> set_targetvalue ( $ this -> get_target ( ) -> get_value_from_form ( $ data ) ) ; foreach ( self :: get_config_keys ( ) as $ key ) { if ( ! $ this -> get_target ( ) -> is_setting_forced ( $ key ) ) { if ( isset ( $ data -> $ key ) ) { $ value = $ data -> $ key ; } else { $ value = configuration :: TOURDEFAULT ; } if ( $ value === configuration :: TOURDEFAULT ) { $ this -> set_config ( $ key , null ) ; } else { $ this -> set_config ( $ key , $ value ) ; } } } $ this -> persist ( ) ; return $ this ; }
docstring: Handle submission of the step editing form.
  
  @param   local\forms\editstep  $mform      The sumitted form.
  @param   stdClass        $data       The submitted data.
  @return  $this
docstring_tokens: Handle submission of the step editing form .