MDL-22449, improve wiki help info

This commit is contained in:
Dongsheng Cai 2010-11-17 09:04:46 +00:00
parent d4f866ea5f
commit 6f1b029b6f
3 changed files with 14 additions and 5 deletions

View File

@ -52,14 +52,21 @@ class mod_wiki_edit_form extends moodleform {
$fileitemid = $this->_customdata['fileitemid'];
}
//editor
$mform->addElement('header', 'general', get_string('general'));
if (isset($this->_customdata['pagetitle'])) {
$pagetitle = get_string('editingpage', 'wiki', $this->_customdata['pagetitle']);
} else {
$pagetitle = get_string('editing', 'wiki');
}
//editor
$mform->addElement('header', 'general', $pagetitle);
$fieldname = get_string('format' . $format, 'wiki');
if ($format != 'html') {
$mform->addElement('wikieditor', 'newcontent', get_string('content'), array('cols' => 50, 'rows' => 20, 'wiki_format' => $format));
$mform->addElement('wikieditor', 'newcontent', $fieldname, array('cols' => 50, 'rows' => 20, 'wiki_format' => $format));
$mform->addHelpButton('newcontent', 'format'.$format, 'wiki');
} else {
$mform->addElement('editor', 'newcontent_editor', get_string('content'), null, page_wiki_edit::$attachmentoptions);
$mform->addElement('editor', 'newcontent_editor', $fieldname, null, page_wiki_edit::$attachmentoptions);
$mform->addHelpButton('newcontent_editor', 'formathtml', 'wiki');
}

View File

@ -48,7 +48,9 @@ $string['diff_help'] = 'Selected versions of the page may be compared in order t
$string['edit'] = 'Edit';
$string['editcomment'] = 'Edit comment';
$string['editblocks'] = 'Turn edit blocks on';
$string['editing'] = 'Editing wiki page';
$string['editingcomment'] = 'Editing comment';
$string['editingpage'] = 'Editing this page \'{$a}\'';
$string['editblocks'] = 'Turn edit blocks on';
$string['filenotuploadederror'] = 'File \'{$a}\' could not be uploaded correctly.';
$string['filtername'] = 'Wiki Auto-linking';

View File

@ -527,7 +527,7 @@ class page_wiki_edit extends page_wiki {
$url .= "&section=" . $this->section;
}
$params = array('attachmentoptions' => page_wiki_edit::$attachmentoptions, 'format' => $version->contentformat, 'version' => $versionnumber);
$params = array('attachmentoptions' => page_wiki_edit::$attachmentoptions, 'format' => $version->contentformat, 'version' => $versionnumber, 'pagetitle'=>$this->page->title);
$data = new StdClass();
$data->newcontent = $content;