original_string: protected function fire_state_transition_event($eventclass, $timestamp) {
          global $USER;
          $quizrecord = $this->get_quiz();
          $params = array(
              'context' => $this->get_quizobj()->get_context(),
              'courseid' => $this->get_courseid(),
              'objectid' => $this->attempt->id,
              'relateduserid' => $this->attempt->userid,
              'other' => array(
                  'submitterid' => CLI_SCRIPT ? null : $USER->id,
                  'quizid' => $quizrecord->id
              )
          );
  
          $event = $eventclass::create($params);
          $event->add_record_snapshot('quiz', $this->get_quiz());
          $event->add_record_snapshot('quiz_attempts', $this->get_attempt());
          $event->trigger();
      }
code: protected function fire_state_transition_event($eventclass, $timestamp) {
          global $USER;
          $quizrecord = $this->get_quiz();
          $params = array(
              'context' => $this->get_quizobj()->get_context(),
              'courseid' => $this->get_courseid(),
              'objectid' => $this->attempt->id,
              'relateduserid' => $this->attempt->userid,
              'other' => array(
                  'submitterid' => CLI_SCRIPT ? null : $USER->id,
                  'quizid' => $quizrecord->id
              )
          );
  
          $event = $eventclass::create($params);
          $event->add_record_snapshot('quiz', $this->get_quiz());
          $event->add_record_snapshot('quiz_attempts', $this->get_attempt());
          $event->trigger();
      }
code_tokens: protected function fire_state_transition_event ( $ eventclass , $ timestamp ) { global $ USER ; $ quizrecord = $ this -> get_quiz ( ) ; $ params = array ( 'context' => $ this -> get_quizobj ( ) -> get_context ( ) , 'courseid' => $ this -> get_courseid ( ) , 'objectid' => $ this -> attempt -> id , 'relateduserid' => $ this -> attempt -> userid , 'other' => array ( 'submitterid' => CLI_SCRIPT ? null : $ USER -> id , 'quizid' => $ quizrecord -> id ) ) ; $ event = $ eventclass :: create ( $ params ) ; $ event -> add_record_snapshot ( 'quiz' , $ this -> get_quiz ( ) ) ; $ event -> add_record_snapshot ( 'quiz_attempts' , $ this -> get_attempt ( ) ) ; $ event -> trigger ( ) ; }
docstring: Fire a state transition event.
  the same event information.
  @param string $eventclass the event class name.
  @param int $timestamp the timestamp to include in the event.
  @return void
docstring_tokens: Fire a state transition event . the same event information .