original_string: public function update_definition(stdClass $newdefinition, $usermodified = null) {
          $this->update_or_check_guide($newdefinition, $usermodified, true);
          if (isset($newdefinition->guide['regrade']) && $newdefinition->guide['regrade']) {
              $this->mark_for_regrade();
          }
      }
code: public function update_definition(stdClass $newdefinition, $usermodified = null) {
          $this->update_or_check_guide($newdefinition, $usermodified, true);
          if (isset($newdefinition->guide['regrade']) && $newdefinition->guide['regrade']) {
              $this->mark_for_regrade();
          }
      }
code_tokens: public function update_definition ( stdClass $ newdefinition , $ usermodified = null ) { $ this -> update_or_check_guide ( $ newdefinition , $ usermodified , true ) ; if ( isset ( $ newdefinition -> guide [ 'regrade' ] ) && $ newdefinition -> guide [ 'regrade' ] ) { $ this -> mark_for_regrade ( ) ; } }
docstring: Saves the guide definition into the database
  
  @see parent::update_definition()
  @param stdClass $newdefinition guide definition data as coming from gradingform_guide_editguide::get_data()
  @param int $usermodified optional userid of the author of the definition, defaults to the current user
docstring_tokens: Saves the guide definition into the database