public function get_end_time($attempt) {
        $timeclose = false;
        foreach ($this->rules as $rule) {
            $ruletimeclose = $rule->end_time($attempt);
            if ($ruletimeclose !== false && ($timeclose === false || $ruletimeclose < $timeclose)) {
                $timeclose = $ruletimeclose;
            }
        }
        return $timeclose;
    }
public function get_end_time($attempt) {
        $timeclose = false;
        foreach ($this->rules as $rule) {
            $ruletimeclose = $rule->end_time($attempt);
            if ($ruletimeclose !== false && ($timeclose === false || $ruletimeclose < $timeclose)) {
                $timeclose = $ruletimeclose;
            }
        }
        return $timeclose;
    }
public function get_end_time ( $ attempt ) { $ timeclose = false ; foreach ( $ this -> rules as $ rule ) { $ ruletimeclose = $ rule -> end_time ( $ attempt ) ; if ( $ ruletimeclose !== false && ( $ timeclose === false || $ ruletimeclose < $ timeclose ) ) { $ timeclose = $ ruletimeclose ; } } return $ timeclose ; }
Compute when the attempt must be submitted.

@param object $attempt the data from the relevant quiz_attempts row.
@return int|false the attempt close time.
False if there is no limit.
Compute when the attempt must be submitted .