예제 #1
0
    if (file_exists($plugins . '/' . $plugin_file . ".php")) {
        require_once $plugins . '/' . $plugin_file . ".php";
        // instantiate the object
        $class = basename($plugin_file, ".php");
        $resourceobj = new $class();
        $method = array($resourceobj, 'language_strings');
        //check whether the language string element has been defined
        if (is_callable($method, true)) {
            $resourceobj->language_strings($string);
        }
    }
}
//import tab plugin language strings
$tabs = $CFG->dirroot . '/blocks/ilp/classes/dashboard/tabs';
// get all the currently installed tab plugins plugins
$tab_plugins = ilp_records_to_menu($dbc->get_dashboard_tabs(), 'id', 'name');
//this section gets language strings for all tab plugins
foreach ($tab_plugins as $plugin_file) {
    if (file_exists($tabs . '/' . $plugin_file . ".php")) {
        require_once $tabs . '/' . $plugin_file . ".php";
        // instantiate the object
        $class = basename($plugin_file, ".php");
        $tabobj = new $class();
        $method = array($tabobj, 'language_strings');
        //check whether the language string element has been defined
        if (is_callable($method, true)) {
            $tabobj->language_strings($string);
        }
    }
}
$plugins = $CFG->dirroot . '/blocks/ilp/classes/dashboard/mis';