original_string: public function update_timecheckstate($time) {
          global $DB;
          if ($this->attempt->timecheckstate !== $time) {
              $this->attempt->timecheckstate = $time;
              $DB->set_field('quiz_attempts', 'timecheckstate', $time, array('id' => $this->attempt->id));
          }
      }
code: public function update_timecheckstate($time) {
          global $DB;
          if ($this->attempt->timecheckstate !== $time) {
              $this->attempt->timecheckstate = $time;
              $DB->set_field('quiz_attempts', 'timecheckstate', $time, array('id' => $this->attempt->id));
          }
      }
code_tokens: public function update_timecheckstate ( $ time ) { global $ DB ; if ( $ this -> attempt -> timecheckstate !== $ time ) { $ this -> attempt -> timecheckstate = $ time ; $ DB -> set_field ( 'quiz_attempts' , 'timecheckstate' , $ time , array ( 'id' => $ this -> attempt -> id ) ) ; } }
docstring: Update this attempt timecheckstate if necessary.
  @param int|null the timecheckstate
docstring_tokens: Update this attempt timecheckstate if necessary .