3 * help.php - Displays help page.
5 * Prints a very simple page and includes
6 * page content or a string from elsewhere.
7 * Usually this will appear in a popup
8 * See {@link helpbutton()} in {@link lib/moodlelib.php}
10 * @author Martin Dougiamas
14 define('NO_MOODLE_COOKIES', true);
16 require_once('config.php');
18 $identifier = required_param('identifier', PARAM_SAFEDIR
);
19 $component = required_param('component', PARAM_SAFEDIR
);
20 $lang = required_param('component', PARAM_LANG
); // TODO: maybe split into separate scripts
21 $ajax = optional_param('ajax', 0, PARAM_BOOL
);
27 $SESSION->lang
= $lang; // does not actually modify session because we do not use cookies here
29 $sm = get_string_manager();
31 //TODO: this is a minimalistic help page, needs a lot more love
33 $PAGE->set_url('/help.php');
34 $PAGE->set_pagelayout('popup'); // not really a popup because this page gets dispalyed directly only when JS disabled
37 @header
('Content-Type: text/plain; charset=utf-8');
39 echo $OUTPUT->header();
42 if ($sm->string_exists($identifier.'_hlp', $component)) {
43 echo get_string($identifier.'_hlp', $component);
45 echo "<p><strong>TODO</strong>: fix help for [{$identifier}_hlp, $component]</p>";
49 echo $OUTPUT->footer();