original_string: public function set_metadata($name, $value) {
          $firststep = $this->get_step(0);
          if (!$firststep->has_metadata_var($name)) {
              $this->observer->notify_metadata_added($this, $name);
          } else if ($value !== $firststep->get_metadata_var($name)) {
              $this->observer->notify_metadata_modified($this, $name);
          }
          $firststep->set_metadata_var($name, $value);
      }
code: public function set_metadata($name, $value) {
          $firststep = $this->get_step(0);
          if (!$firststep->has_metadata_var($name)) {
              $this->observer->notify_metadata_added($this, $name);
          } else if ($value !== $firststep->get_metadata_var($name)) {
              $this->observer->notify_metadata_modified($this, $name);
          }
          $firststep->set_metadata_var($name, $value);
      }
code_tokens: public function set_metadata ( $ name , $ value ) { $ firststep = $ this -> get_step ( 0 ) ; if ( ! $ firststep -> has_metadata_var ( $ name ) ) { $ this -> observer -> notify_metadata_added ( $ this , $ name ) ; } else if ( $ value !== $ firststep -> get_metadata_var ( $ name ) ) { $ this -> observer -> notify_metadata_modified ( $ this , $ name ) ; } $ firststep -> set_metadata_var ( $ name , $ value ) ; }
docstring: Set some metadata for this question attempt.
  @param string $name the name of the metadata variable to return.
  @param string $value the value to set that metadata variable to.
docstring_tokens: Set some metadata for this question attempt .