2 require_once('../../config.php');
6 $button = optional_param("button$i", '', PARAM_ALPHAEXT
);
10 $topics[$i] = helplink('reading', get_string('helpreading'), 'moodle', false, true);
13 $topics[$i] = helplink('writing', get_string('helpwriting'));
16 $topics[$i] = helplink('questions', get_string('helpquestions'));
19 $topics[$i] = helplink('emoticons', get_string('helpemoticons'));
22 $topics[$i] = helplink('richtext', get_string('helprichtext'));
25 $topics[$i] = helplink('text', get_string('helptext'));
28 error('Unknown help topic '.$item);
31 $keyword = optional_param("keyword$i", '', PARAM_ALPHAEXT
);
33 break;//exit for loop - no more help items
35 $title = optional_param("title$i", '', PARAM_NOTAGS
);
36 $module = optional_param("module$i", 'moodle', PARAM_ALPHAEXT
);
37 $func[$i] = 'helpbutton';
38 $topics[$i] = helplink($keyword, $title, $module);
43 print_simple_box_start('center', '96%');
44 print_heading(get_string('editorhelptopics'));
48 foreach ($topics as $i => $topic){
49 echo('<li>'.$topics[$i].'</li>');
52 print_simple_box_end();
54 close_window_button();
56 echo '<p align="center"><a href="'.$CFG->wwwroot
.'/help.php?file=index.html">'. get_string('helpindex') .'</a></p>';
58 $CFG->docroot
= ''; // We don't want a doc link here
62 * A function to return a simple link to a help page. We don't want a popup here
63 * since these links are displayed in a pop up already.
66 * @param string $linktext
67 * @param string $module
70 function helplink($page, $linktext='', $module='moodle'){
72 return "<a href=\"$CFG->wwwroot/help.php?module=$module&file=$page.html\">$linktext</a>";