public function can_access_course($courseid) {
        $this->init_course_access();
        if (!array_key_exists($courseid, $this->courseaccess)) {
            $this->courseaccess[$courseid] = can_access_course($this->get_course($courseid)) ? 1 : 0;
            $this->cachechangedcourse = true;
        }
        return $this->courseaccess[$courseid];
    }
public function can_access_course($courseid) {
        $this->init_course_access();
        if (!array_key_exists($courseid, $this->courseaccess)) {
            $this->courseaccess[$courseid] = can_access_course($this->get_course($courseid)) ? 1 : 0;
            $this->cachechangedcourse = true;
        }
        return $this->courseaccess[$courseid];
    }
public function can_access_course ( $ courseid ) { $ this -> init_course_access ( ) ; if ( ! array_key_exists ( $ courseid , $ this -> courseaccess ) ) { $ this -> courseaccess [ $ courseid ] = can_access_course ( $ this -> get_course ( $ courseid ) ) ? 1 : 0 ; $ this -> cachechangedcourse = true ; } return $ this -> courseaccess [ $ courseid ] ; }
Checks if current user has access to the course

This method calls global function {@link can_access_course} and caches results

@param int $courseid
@return bool
Checks if current user has access to the course