protected function get_course($courseid) {
        if (!empty($this->cachedcourses[$courseid])) {
            return $this->cachedcourses[$courseid];
        }

        // No need to clone, only read.
        $this->cachedcourses[$courseid] = get_course($courseid, false);

        return $this->cachedcourses[$courseid];
    }
protected function get_course($courseid) {
        if (!empty($this->cachedcourses[$courseid])) {
            return $this->cachedcourses[$courseid];
        }

        // No need to clone, only read.
        $this->cachedcourses[$courseid] = get_course($courseid, false);

        return $this->cachedcourses[$courseid];
    }
protected function get_course ( $ courseid ) { if ( ! empty ( $ this -> cachedcourses [ $ courseid ] ) ) { return $ this -> cachedcourses [ $ courseid ] ; } // No need to clone, only read. $ this -> cachedcourses [ $ courseid ] = get_course ( $ courseid , false ) ; return $ this -> cachedcourses [ $ courseid ] ; }
Returns a course instance checking internal caching.

@param int $courseid
@return stdClass
Returns a course instance checking internal caching .