original_string: public static function preload_course($courseid) {
          // Users can call this multiple times without doing any harm
          if (isset(context::$cache_preloaded[$courseid])) {
              return;
          }
          $coursecontext = context_course::instance($courseid);
          $coursecontext->get_child_contexts();
  
          context::$cache_preloaded[$courseid] = true;
      }
code: public static function preload_course($courseid) {
          // Users can call this multiple times without doing any harm
          if (isset(context::$cache_preloaded[$courseid])) {
              return;
          }
          $coursecontext = context_course::instance($courseid);
          $coursecontext->get_child_contexts();
  
          context::$cache_preloaded[$courseid] = true;
      }
code_tokens: public static function preload_course ( $ courseid ) { // Users can call this multiple times without doing any harm if ( isset ( context :: $ cache_preloaded [ $ courseid ] ) ) { return ; } $ coursecontext = context_course :: instance ( $ courseid ) ; $ coursecontext -> get_child_contexts ( ) ; context :: $ cache_preloaded [ $ courseid ] = true ; }
docstring: Preload all contexts instances from course.
  
  To be used if you expect multiple queries for course activities...
  
  @static
  @param int $courseid
docstring_tokens: Preload all contexts instances from course .