2004-09-29 18:19:39 +00:00
|
|
|
<?php
|
2006-08-22 22:04:06 +00:00
|
|
|
/**
|
|
|
|
* help.php - Displays help page.
|
|
|
|
*
|
|
|
|
* Prints a very simple page and includes
|
|
|
|
* page content or a string from elsewhere.
|
|
|
|
* Usually this will appear in a popup
|
|
|
|
* See {@link helpbutton()} in {@link lib/moodlelib.php}
|
|
|
|
*
|
|
|
|
* @author Martin Dougiamas
|
|
|
|
* @package moodlecore
|
|
|
|
*/
|
2010-04-10 09:10:08 +00:00
|
|
|
|
|
|
|
define('NO_MOODLE_COOKIES', true);
|
|
|
|
|
2006-08-22 22:04:06 +00:00
|
|
|
require_once('config.php');
|
|
|
|
|
2010-04-10 09:10:08 +00:00
|
|
|
$identifier = required_param('identifier', PARAM_SAFEDIR);
|
|
|
|
$component = required_param('component', PARAM_SAFEDIR);
|
|
|
|
$lang = required_param('component', PARAM_LANG);
|
|
|
|
|
|
|
|
if (!$lang) {
|
|
|
|
$lang = 'en';
|
|
|
|
}
|
|
|
|
|
|
|
|
$SESSION->lang = $lang; // does not actually modify session because we do not use cookies here
|
2010-04-10 07:24:56 +00:00
|
|
|
|
2010-04-10 09:10:08 +00:00
|
|
|
// send basic headers only, we do not need full html page here
|
|
|
|
@header('Content-Type: text/plain; charset=utf-8');
|
2006-08-22 22:04:06 +00:00
|
|
|
|
2010-04-10 09:10:08 +00:00
|
|
|
if (strpos('_hlp', $identifier) === false) {
|
|
|
|
echo '<strong>Old 1.9 style help files need to be converted to standard strings with "_hlp" suffix: '.$component.'/'.$identifier.'</strong>';
|
|
|
|
die;
|
|
|
|
}
|
2006-08-22 22:12:17 +00:00
|
|
|
|
2010-04-10 09:10:08 +00:00
|
|
|
echo get_string($identifier, $component);
|