public function process_going_overdue($timestamp, $studentisonline) {
        global $DB;

        $transaction = $DB->start_delegated_transaction();
        $this->attempt->timemodified = $timestamp;
        $this->attempt->state = self::OVERDUE;
        // If we knew the attempt close time, we could compute when the graceperiod ends.
        // Instead we'll just fix it up through cron.
        $this->attempt->timecheckstate = $timestamp;
        $DB->update_record('quiz_attempts', $this->attempt);

        $this->fire_state_transition_event('\mod_quiz\event\attempt_becameoverdue', $timestamp);

        $transaction->allow_commit();

        quiz_send_overdue_message($this);
    }
public function process_going_overdue($timestamp, $studentisonline) {
        global $DB;

        $transaction = $DB->start_delegated_transaction();
        $this->attempt->timemodified = $timestamp;
        $this->attempt->state = self::OVERDUE;
        // If we knew the attempt close time, we could compute when the graceperiod ends.
        // Instead we'll just fix it up through cron.
        $this->attempt->timecheckstate = $timestamp;
        $DB->update_record('quiz_attempts', $this->attempt);

        $this->fire_state_transition_event('\mod_quiz\event\attempt_becameoverdue', $timestamp);

        $transaction->allow_commit();

        quiz_send_overdue_message($this);
    }
public function process_going_overdue ( $ timestamp , $ studentisonline ) { global $ DB ; $ transaction = $ DB -> start_delegated_transaction ( ) ; $ this -> attempt -> timemodified = $ timestamp ; $ this -> attempt -> state = self :: OVERDUE ; // If we knew the attempt close time, we could compute when the graceperiod ends. // Instead we'll just fix it up through cron. $ this -> attempt -> timecheckstate = $ timestamp ; $ DB -> update_record ( 'quiz_attempts' , $ this -> attempt ) ; $ this -> fire_state_transition_event ( '\mod_quiz\event\attempt_becameoverdue' , $ timestamp ) ; $ transaction -> allow_commit ( ) ; quiz_send_overdue_message ( $ this ) ; }
Mark this attempt as now overdue.
@param int $timestamp the time to deem as now.
@param bool $studentisonline is the student currently interacting with Moodle?
Mark this attempt as now overdue .