original_string: 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);
          }
      }
code: 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);
          }
      }
code_tokens: 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 ) ; } }
docstring: Loads the given course into the navigation
  
  @param stdClass $course
  @return navigation_node
docstring_tokens: Loads the given course into the navigation