[MDL-22449]

Adding some help to wiki
This commit is contained in:
Jordi Piguillem 2010-09-09 09:18:05 +00:00
parent d543cc3cae
commit 9e25c7b480
3 changed files with 18 additions and 2 deletions

View file

@ -44,6 +44,8 @@ class mod_wiki_create_form extends moodleform {
} }
$mform->addElement('text', 'pagetitle', get_string('newpagetitle', 'wiki'), $textoptions); $mform->addElement('text', 'pagetitle', get_string('newpagetitle', 'wiki'), $textoptions);
$mform->addElement('static', 'format', get_string('format', 'wiki'));
$mform->addHelpButton('format', 'format', 'wiki');
foreach ($formats as $format) { foreach ($formats as $format) {
if ($format == $defaultformat) { if ($format == $defaultformat) {
$attr = array('checked'=>'checked'); $attr = array('checked'=>'checked');
@ -52,7 +54,9 @@ class mod_wiki_create_form extends moodleform {
} else { } else {
$attr = array(); $attr = array();
} }
$mform->addElement('radio', 'pageformat', '', get_string('format'.$format, 'wiki'), $format, $attr); $mform->addElement('radio', 'pageformat', '', get_string('format'.$format, 'wiki'), $format, $attr);
} }
//hiddens //hiddens

View file

@ -57,8 +57,11 @@ class mod_wiki_edit_form extends moodleform {
if ($format != 'html') { if ($format != 'html') {
$mform->addElement('wikieditor', 'newcontent', get_string('content'), array('cols' => 50, 'rows' => 20, 'wiki_format' => $format)); $mform->addElement('wikieditor', 'newcontent', get_string('content'), array('cols' => 50, 'rows' => 20, 'wiki_format' => $format));
$mform->addHelpButton('newcontent', 'format'.$format, 'wiki');
} else { } else {
$mform->addElement('editor', 'newcontent_editor', get_string('content'), null, page_wiki_edit::$attachmentoptions); $mform->addElement('editor', 'newcontent_editor', get_string('content'), null, page_wiki_edit::$attachmentoptions);
$mform->addHelpButton('newcontent_editor', 'formathtml', 'wiki');
} }
//hiddens //hiddens

View file

@ -36,7 +36,7 @@ $string['defaultformat_help'] = 'This setting determines the default format used
* HTML - The HTML editor is available * HTML - The HTML editor is available
* Creole - A common wiki markup language for which a small edit toolbar is available * Creole - A common wiki markup language for which a small edit toolbar is available
* Nwiki - The markup language used in the contributed Nwiki module'; * Nwiki - Mediawiki-like markup language used in the contributed Nwiki module';
$string['deletecomment'] = 'Deleting comment'; $string['deletecomment'] = 'Deleting comment';
$string['deleteupload'] = 'Delete'; $string['deleteupload'] = 'Delete';
$string['deletedbegins'] = 'Deleted begins'; $string['deletedbegins'] = 'Deleted begins';
@ -54,9 +54,18 @@ $string['firstpagetitle'] = 'First page name';
$string['firstpagetitle_help'] = 'Title of the first page of the wiki.'; $string['firstpagetitle_help'] = 'Title of the first page of the wiki.';
$string['forceformat'] = 'Force format'; $string['forceformat'] = 'Force format';
$string['forceformat_help'] = 'If the format is forced (checkbox ticked), there is no option to choose a format when editing a wiki page.'; $string['forceformat_help'] = 'If the format is forced (checkbox ticked), there is no option to choose a format when editing a wiki page.';
$string['format'] = 'Format';
$string['format_help'] = 'Format used when editing wiki pages.
* HTML - The HTML editor is available
* Creole - A common wiki markup language for which a small edit toolbar is available
* Nwiki - Mediawiki-like markup language used in the contributed Nwiki module';
$string['formathtml'] = 'HTML Format'; $string['formathtml'] = 'HTML Format';
$string['formathtml_help'] = '<a href="http://docs.moodle.org/en/HTML_format">HTML Format</a>';
$string['formatcreole'] = 'Creole Format'; $string['formatcreole'] = 'Creole Format';
$string['formatnwiki'] = 'NWIKI Format'; $string['formatcreole_help'] = '<a href="http://docs.moodle.org/en/Creole_format">Creole Format</a>';
$string['formatnwiki'] = 'NWiki Format';
$string['formatnwiki_help'] = '<a href="http://docs.moodle.org/en/NWiki_format">NWiki Format</a>';
$string['history'] = 'History'; $string['history'] = 'History';
$string['html'] = 'HTML'; $string['html'] = 'HTML';
$string['insertcomment'] = 'Insert comment'; $string['insertcomment'] = 'Insert comment';