public static function load_template($component, $template, $themename, $includecomments = false) {
        global $DB, $CFG, $PAGE;

        $params = self::validate_parameters(self::load_template_parameters(),
                                            array('component' => $component,
                                                  'template' => $template,
                                                  'themename' => $themename,
                                                  'includecomments' => $includecomments));

        $loader = new mustache_template_source_loader();
        // Will throw exceptions if the template does not exist.
        return $loader->load(
            $params['component'],
            $params['template'],
            $params['themename'],
            $params['includecomments']
        );
    }