protected function load_course(stdClass $course) {
        global $SITE;
        if ($course->id == $SITE->id) {
            // This is always loaded during initialisation
            return $this->rootnodes['site'];
        } else if (array_key_exists($course->id, $this->addedcourses)) {
            // The course has already been loaded so return a reference
            return $this->addedcourses[$course->id];
        } else {
            // Add the course
            return $this->add_course($course);
        }
    }
protected function load_course(stdClass $course) {
        global $SITE;
        if ($course->id == $SITE->id) {
            // This is always loaded during initialisation
            return $this->rootnodes['site'];
        } else if (array_key_exists($course->id, $this->addedcourses)) {
            // The course has already been loaded so return a reference
            return $this->addedcourses[$course->id];
        } else {
            // Add the course
            return $this->add_course($course);
        }
    }
protected function load_course ( stdClass $ course ) { global $ SITE ; if ( $ course -> id == $ SITE -> id ) { // This is always loaded during initialisation return $ this -> rootnodes [ 'site' ] ; } else if ( array_key_exists ( $ course -> id , $ this -> addedcourses ) ) { // The course has already been loaded so return a reference return $ this -> addedcourses [ $ course -> id ] ; } else { // Add the course return $ this -> add_course ( $ course ) ; } }
Loads the given course into the navigation

@param stdClass $course
@return navigation_node
Loads the given course into the navigation