original_string: public function process_abandon($timestamp, $studentisonline) {
          global $DB;
  
          $transaction = $DB->start_delegated_transaction();
          $this->attempt->timemodified = $timestamp;
          $this->attempt->state = self::ABANDONED;
          $this->attempt->timecheckstate = null;
          $DB->update_record('quiz_attempts', $this->attempt);
  
          $this->fire_state_transition_event('\mod_quiz\event\attempt_abandoned', $timestamp);
  
          $transaction->allow_commit();
      }
code: public function process_abandon($timestamp, $studentisonline) {
          global $DB;
  
          $transaction = $DB->start_delegated_transaction();
          $this->attempt->timemodified = $timestamp;
          $this->attempt->state = self::ABANDONED;
          $this->attempt->timecheckstate = null;
          $DB->update_record('quiz_attempts', $this->attempt);
  
          $this->fire_state_transition_event('\mod_quiz\event\attempt_abandoned', $timestamp);
  
          $transaction->allow_commit();
      }
code_tokens: public function process_abandon ( $ timestamp , $ studentisonline ) { global $ DB ; $ transaction = $ DB -> start_delegated_transaction ( ) ; $ this -> attempt -> timemodified = $ timestamp ; $ this -> attempt -> state = self :: ABANDONED ; $ this -> attempt -> timecheckstate = null ; $ DB -> update_record ( 'quiz_attempts' , $ this -> attempt ) ; $ this -> fire_state_transition_event ( '\mod_quiz\event\attempt_abandoned' , $ timestamp ) ; $ transaction -> allow_commit ( ) ; }
docstring: Mark this attempt as abandoned.
  @param int $timestamp the time to deem as now.
  @param bool $studentisonline is the student currently interacting with Moodle?
docstring_tokens: Mark this attempt as abandoned .