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));
        }
    }
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));
        }
    }
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 ) ) ; } }
Update this attempt timecheckstate if necessary.
@param int|null the timecheckstate
Update this attempt timecheckstate if necessary .