public function is_finished() {

        if ($this->finished === null) {
            $endtime = $this->get_end();
            if ($endtime === 0 || $this->now < $endtime) {
                // It is not yet finished or no idea when it finishes.
                $this->finished = false;
            } else {
                $this->finished = true;
            }
        }

        return $this->finished;
    }
public function is_finished() {

        if ($this->finished === null) {
            $endtime = $this->get_end();
            if ($endtime === 0 || $this->now < $endtime) {
                // It is not yet finished or no idea when it finishes.
                $this->finished = false;
            } else {
                $this->finished = true;
            }
        }

        return $this->finished;
    }
public function is_finished ( ) { if ( $ this -> finished === null ) { $ endtime = $ this -> get_end ( ) ; if ( $ endtime === 0 || $ this -> now < $ endtime ) { // It is not yet finished or no idea when it finishes. $ this -> finished = false ; } else { $ this -> finished = true ; } } return $ this -> finished ; }
Has the course finished?

@return bool
Has the course finished?