From 94c8a3862666ac83786019db9e8a3110536e2df2 Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Mon, 3 May 2010 09:51:47 +0000 Subject: [PATCH] MDL-21695 Glossary module now uses new help strings AMOS BEGIN HLP glossary/aliases2.html,[aliases_help,mod_glossary] HLP glossary/allowcomments.html,[allowcomments_help,mod_glossary] HLP glossary/allowduplicatedentries.html,[allowduplicatedentries_help,mod_glossary] HLP glossary/allowprintview.html,[allowprintview_help,mod_glossary] HLP glossary/attachment2.html,[attachment_help,mod_glossary] HLP glossary/attachment.html,[attachment_help,mod_glossary] HLP glossary/casesensitive.html,[casesensitive_help,mod_glossary] HLP glossary/defaultapproval.html,[defaultapproval_help,mod_glossary] HLP glossary/destination.html,[destination_help,mod_glossary] HLP glossary/displayformat.html,[displayformat_help,mod_glossary] HLP glossary/editalways.html,[editalways_help,mod_glossary] HLP glossary/filetoimport.html,[filetoimport_help,mod_glossary] HLP glossary/fullmatch.html,[fullmatch_help,mod_glossary] HLP glossary/globalglossary.html,[isglobal_help,mod_glossary] HLP glossary/linkcategory.html,[linkcategory_help,mod_glossary] HLP glossary/mainglossary.html,[glossarytype_help,mod_glossary] HLP glossary/rssarticles.html,[rssarticles_help,mod_glossary] HLP glossary/rsstype.html,[rsstype_help,mod_glossary] HLP glossary/shows.html,[showspecial_help,mod_glossary] HLP glossary/shows.html,[showalphabet_help,mod_glossary] HLP glossary/shows.html,[showall_help,mod_glossary] HLP glossary/usedynalinkentry.html,[entryusedynalink_help,mod_glossary] HLP glossary/usedynalink.html,[usedynalink_help,mod_glossary] AMOS END --- lang/en/help/glossary/aliases2.html | 9 ------ lang/en/help/glossary/allowcomments.html | 2 -- .../help/glossary/allowduplicatedentries.html | 5 ---- lang/en/help/glossary/allowprintview.html | 7 ----- lang/en/help/glossary/attachment.html | 21 -------------- lang/en/help/glossary/casesensitive.html | 8 ------ lang/en/help/glossary/defaultapproval.html | 4 --- lang/en/help/glossary/description.html | 4 --- lang/en/help/glossary/destination.html | 7 ----- lang/en/help/glossary/displayformat.html | 25 ----------------- lang/en/help/glossary/editalways.html | 13 --------- lang/en/help/glossary/filetoimport.html | 3 -- lang/en/help/glossary/fullmatch.html | 6 ---- lang/en/help/glossary/globalglossary.html | 7 ----- lang/en/help/glossary/linkcategory.html | 5 ---- lang/en/help/glossary/mainglossary.html | 11 -------- lang/en/help/glossary/mods.html | 7 ----- lang/en/help/glossary/newentry.html | 5 ---- lang/en/help/glossary/rssarticles.html | 8 ------ lang/en/help/glossary/rsstype.html | 14 ---------- lang/en/help/glossary/shows.html | 9 ------ lang/en/help/glossary/usedynalink.html | 12 -------- lang/en/help/glossary/usedynalinkentry.html | 9 ------ mod/glossary/edit_form.php | 10 +++---- mod/glossary/editcategories.html | 2 +- mod/glossary/import.html | 8 ++---- mod/glossary/lang/en/glossary.php | 2 +- mod/glossary/mod_form.php | 28 +++++++++---------- 28 files changed, 24 insertions(+), 227 deletions(-) delete mode 100644 lang/en/help/glossary/aliases2.html delete mode 100644 lang/en/help/glossary/allowcomments.html delete mode 100644 lang/en/help/glossary/allowduplicatedentries.html delete mode 100644 lang/en/help/glossary/allowprintview.html delete mode 100644 lang/en/help/glossary/attachment.html delete mode 100644 lang/en/help/glossary/casesensitive.html delete mode 100644 lang/en/help/glossary/defaultapproval.html delete mode 100644 lang/en/help/glossary/description.html delete mode 100644 lang/en/help/glossary/destination.html delete mode 100644 lang/en/help/glossary/displayformat.html delete mode 100644 lang/en/help/glossary/editalways.html delete mode 100644 lang/en/help/glossary/filetoimport.html delete mode 100644 lang/en/help/glossary/fullmatch.html delete mode 100644 lang/en/help/glossary/globalglossary.html delete mode 100644 lang/en/help/glossary/linkcategory.html delete mode 100644 lang/en/help/glossary/mainglossary.html delete mode 100644 lang/en/help/glossary/mods.html delete mode 100644 lang/en/help/glossary/newentry.html delete mode 100644 lang/en/help/glossary/rssarticles.html delete mode 100644 lang/en/help/glossary/rsstype.html delete mode 100644 lang/en/help/glossary/shows.html delete mode 100644 lang/en/help/glossary/usedynalink.html delete mode 100644 lang/en/help/glossary/usedynalinkentry.html diff --git a/lang/en/help/glossary/aliases2.html b/lang/en/help/glossary/aliases2.html deleted file mode 100644 index 0abb5a23802..00000000000 --- a/lang/en/help/glossary/aliases2.html +++ /dev/null @@ -1,9 +0,0 @@ -

Keywords

- -

Each entry in the glossary can have an associated list of keywords (or aliases).

- -

Enter each alias on a new line (not separated by commas).

- -

The aliased words and phrases can be used as alternative ways to refer to the entry. - For example, if you are using the glossary auto-linking filter then the aliases will be used - (as well as the main name of the entry) when deciding what words to link to this entry.

diff --git a/lang/en/help/glossary/allowcomments.html b/lang/en/help/glossary/allowcomments.html deleted file mode 100644 index c64cc00b5a1..00000000000 --- a/lang/en/help/glossary/allowcomments.html +++ /dev/null @@ -1,2 +0,0 @@ -

Allow comments on entries

-

If set to Yes, all users with permission to create comments will be able to add comments to glossary entries.

diff --git a/lang/en/help/glossary/allowduplicatedentries.html b/lang/en/help/glossary/allowduplicatedentries.html deleted file mode 100644 index 512212eb769..00000000000 --- a/lang/en/help/glossary/allowduplicatedentries.html +++ /dev/null @@ -1,5 +0,0 @@ -

Allow duplicated entries

- -

If you turn this option on, then multiple entries are allowed to - use the same concept name.

- diff --git a/lang/en/help/glossary/allowprintview.html b/lang/en/help/glossary/allowprintview.html deleted file mode 100644 index fdbd28594e6..00000000000 --- a/lang/en/help/glossary/allowprintview.html +++ /dev/null @@ -1,7 +0,0 @@ -

Allow print view

- -

Students can be allowed to use the print view of the glossary.

- -

You can choose whether this feature is enabled or disabled.

- -

Teachers always can use the print view.

diff --git a/lang/en/help/glossary/attachment.html b/lang/en/help/glossary/attachment.html deleted file mode 100644 index 5ad556b6fe9..00000000000 --- a/lang/en/help/glossary/attachment.html +++ /dev/null @@ -1,21 +0,0 @@ -

Attachments for entries

- -

You can optionally attach ONE file from your own computer - to any glossary entry. This file is uploaded to the - server and stored with your entry.

- -

This is useful when you want to share a picture, for example, - or a Word document.

- -

This file can be of any type, however it is highly recommended - that the file is named using standard 3-letter internet - suffixes such as .doc for a Word document, .jpg or .png - for an image, and so on. This will make it easier for others - to download and view your attachment in their browsers.

- -

If you re-edit an entry and attach a new file, then any - previous attached files for that entry will be replaced.

- -

If you re-edit an entry with an attachment and leave - this space blank, then the original attachment will be - retained.

diff --git a/lang/en/help/glossary/casesensitive.html b/lang/en/help/glossary/casesensitive.html deleted file mode 100644 index 1cc7698932b..00000000000 --- a/lang/en/help/glossary/casesensitive.html +++ /dev/null @@ -1,8 +0,0 @@ -

Case sensitive matching

- -

This setting specifies whether matching exact upper and lower case is - necessary when performing automatic linking to these entries.

- -

For example, if this is turned on, then a word like "html" in a forum - posting will NOT be linked to a glossary entry called "HTML".

- diff --git a/lang/en/help/glossary/defaultapproval.html b/lang/en/help/glossary/defaultapproval.html deleted file mode 100644 index 2728e311d5e..00000000000 --- a/lang/en/help/glossary/defaultapproval.html +++ /dev/null @@ -1,4 +0,0 @@ -

Approved by default

- -

This setting allows the teacher to define what happens to new entries added by students. They can be - automatically made available to everyone, otherwise the teacher will have to approve each one.

diff --git a/lang/en/help/glossary/description.html b/lang/en/help/glossary/description.html deleted file mode 100644 index 4249022bc6c..00000000000 --- a/lang/en/help/glossary/description.html +++ /dev/null @@ -1,4 +0,0 @@ -

Description

- -

This field allows you to describe the purpose of the glossary, and - to possibly provide instructions or background information, links etc.

diff --git a/lang/en/help/glossary/destination.html b/lang/en/help/glossary/destination.html deleted file mode 100644 index 858151aa2ab..00000000000 --- a/lang/en/help/glossary/destination.html +++ /dev/null @@ -1,7 +0,0 @@ -

Defining the destination of imported entries

- -

You can specify where you want to import entries to:

- diff --git a/lang/en/help/glossary/displayformat.html b/lang/en/help/glossary/displayformat.html deleted file mode 100644 index 8c46f8f1ac9..00000000000 --- a/lang/en/help/glossary/displayformat.html +++ /dev/null @@ -1,25 +0,0 @@ -

Display format

- -

This setting specifies the way that each entry will be shown within the glossary. The default formats are:

- -
-
Simple, dictionary style:
-
Looks like a conventional dictionary with separate entries. No authors are displayed and attachments are shown as links.
-
Continuous without author:
-
Shows the entries one after other without any kind of separation but the editing icons.
-
Full with author:
-
A forum-like display format showing author's data. Attachments are shown as links.
-
Full without author:
-
A forum-like display format that does not show author's data. Attachments are shown as links.
-
Encyclopedia:
-
Like 'Full with author' but attached images are shown inline.
-
Entry list:
-
This lists the concepts as links.
-
FAQ:
-
Useful for displaying lists of Frequently Asked Questions. It automatically appends the words QUESTION and ANSWER in the concept and definition respectively.
-
- - -
-

Moodle administrators can create new formats following the instructions in - mod/glossary/formats/README.txt.

diff --git a/lang/en/help/glossary/editalways.html b/lang/en/help/glossary/editalways.html deleted file mode 100644 index 8b4ba145063..00000000000 --- a/lang/en/help/glossary/editalways.html +++ /dev/null @@ -1,13 +0,0 @@ -

Edit always

- -

This option allows you to decide if students can edit their entries -at any time.

- -

You can select:

- - - diff --git a/lang/en/help/glossary/filetoimport.html b/lang/en/help/glossary/filetoimport.html deleted file mode 100644 index 1478b59e89c..00000000000 --- a/lang/en/help/glossary/filetoimport.html +++ /dev/null @@ -1,3 +0,0 @@ -

File to import

- -

Select the XML file on your own computer which contains the entries to import.

diff --git a/lang/en/help/glossary/fullmatch.html b/lang/en/help/glossary/fullmatch.html deleted file mode 100644 index c10570b14f2..00000000000 --- a/lang/en/help/glossary/fullmatch.html +++ /dev/null @@ -1,6 +0,0 @@ -

Whole words matching

- -

If automatic linking is enabled, then turning this setting on will force only - whole words to be linked.

- -

For example, a glossary entry named "construct" will not create a link inside the word "constructivism".

diff --git a/lang/en/help/glossary/globalglossary.html b/lang/en/help/glossary/globalglossary.html deleted file mode 100644 index 22e6849e5b5..00000000000 --- a/lang/en/help/glossary/globalglossary.html +++ /dev/null @@ -1,7 +0,0 @@ -

Defining a global glossary

- -

Only administrators, and other users with the capability site:doanything allowed, can define a glossary to be global.

- -

Any course may contain a global glossary (but particularly the front page).

- -

The difference to a normal local glossary is that the entries are used to create automatic links throughout the whole site (and not just in the same course the glossary belongs to).

diff --git a/lang/en/help/glossary/linkcategory.html b/lang/en/help/glossary/linkcategory.html deleted file mode 100644 index 83da1249594..00000000000 --- a/lang/en/help/glossary/linkcategory.html +++ /dev/null @@ -1,5 +0,0 @@ -

Automatically linking categories

- -

You can specify if you want the categories to be automatically linked or not.

- -

Note: Categories are linked based on a case sensitive, whole match.

diff --git a/lang/en/help/glossary/mainglossary.html b/lang/en/help/glossary/mainglossary.html deleted file mode 100644 index f7ed7347313..00000000000 --- a/lang/en/help/glossary/mainglossary.html +++ /dev/null @@ -1,11 +0,0 @@ -

Defining the main glossary of the course

- -

The glossary system allows you to export entries from any secondary glossary -to the main one of the course. In order to do this, you need to identify one -glossary as the main one.

- -

Note: You can only have one main glossary per course.

- -

Before Moodle 1.7, only Teachers could edit the main glossary. In Moodle -1.7 and later, if you wish to control who can edit any glossary (including -the main one) you need to use the Override roles interface.

diff --git a/lang/en/help/glossary/mods.html b/lang/en/help/glossary/mods.html deleted file mode 100644 index af9c3f0bf2c..00000000000 --- a/lang/en/help/glossary/mods.html +++ /dev/null @@ -1,7 +0,0 @@ -

 Glossary

-
-

This activity allows participants to create and maintain a list of definitions, like a dictionary.

-

The entries can be searched or browsed in many different formats.

-

The glossary also allows teachers to export entries from one glossary to another (the main one) within the same course.

-

Finally, it is possible to automatically create links to these entries from throughout the course.

-
diff --git a/lang/en/help/glossary/newentry.html b/lang/en/help/glossary/newentry.html deleted file mode 100644 index 9f323de2c0c..00000000000 --- a/lang/en/help/glossary/newentry.html +++ /dev/null @@ -1,5 +0,0 @@ -Last modified entry will always display the entry that was last modified, -and Random entry will choose a new one at random every time. The option -Next entry will cycle through the entries in order. This last option is -especially useful when a number of days is also chosen, allowing you to make a -Quote of the week or a Tip of the day that everyone sees. diff --git a/lang/en/help/glossary/rssarticles.html b/lang/en/help/glossary/rssarticles.html deleted file mode 100644 index c21180b66d5..00000000000 --- a/lang/en/help/glossary/rssarticles.html +++ /dev/null @@ -1,8 +0,0 @@ -

Number of RSS recent articles

- -

This option allows you to select the number of articles - to include in the RSS Feed.

- -

A number between 5 and 20 would be normal for most glossaries. - Increase the number if the glossary is updated frequently.

- diff --git a/lang/en/help/glossary/rsstype.html b/lang/en/help/glossary/rsstype.html deleted file mode 100644 index 0b83235eca7..00000000000 --- a/lang/en/help/glossary/rsstype.html +++ /dev/null @@ -1,14 +0,0 @@ -

RSS feed for this glossary

- -

This option allows you to enable RSS feeds from this glossary.

- -

You can select between two types of feeds:

- - - diff --git a/lang/en/help/glossary/shows.html b/lang/en/help/glossary/shows.html deleted file mode 100644 index 382fdfbd037..00000000000 --- a/lang/en/help/glossary/shows.html +++ /dev/null @@ -1,9 +0,0 @@ -

Browsing options in Alphabet Display

- -

You can customize the way a user can browse a glossary. Browsing and searching are always available, but you can define three more options:

- -

SHOW SPECIAL Enable or disable browsing by special characters like @, #, etc.

- -

SHOW ALPHABET Enable or disable browsing by alphabetic letters.

- -

SHOW ALL Enable or disable browsing of all entries at once.

diff --git a/lang/en/help/glossary/usedynalink.html b/lang/en/help/glossary/usedynalink.html deleted file mode 100644 index 7c3ee0bde93..00000000000 --- a/lang/en/help/glossary/usedynalink.html +++ /dev/null @@ -1,12 +0,0 @@ -

Enabling automatic linking in a glossary

- -

Turning this feature on will allow individual entries in this glossary to be automatically linked whenever - the concept words and phrases appear throughout the rest of the same course. This includes forum - postings, internal resources, week summaries and so on.

- -

Note that enabling linking for the glossary does not automatically turn on linking for each entry - - linking needs to be set for each entry individually.

- -

If you do not want particular text to be linked (in a forum posting, say) then you should add <nolink> and </nolink> tags around the text.

- -

Note that category names are also linked.

diff --git a/lang/en/help/glossary/usedynalinkentry.html b/lang/en/help/glossary/usedynalinkentry.html deleted file mode 100644 index 07a40500695..00000000000 --- a/lang/en/help/glossary/usedynalinkentry.html +++ /dev/null @@ -1,9 +0,0 @@ -

Enabling automatic linking in a entry

- -

Turning this feature on will allow the entry to be automatically linked, whenever - the concept words and phrases appear throughout the rest of the same course. This includes forum - postings, internal resources, week summaries and so on.

- -

If you do not want particular text to be linked (in a forum posting, say) then you should add <nolink> and </nolink> tags around the text.

- -

To be able to turn on this feature, auto linking must be enabled at glossary level.

diff --git a/mod/glossary/edit_form.php b/mod/glossary/edit_form.php index 23db0f11d55..ebfaeb2d3c0 100644 --- a/mod/glossary/edit_form.php +++ b/mod/glossary/edit_form.php @@ -34,10 +34,10 @@ class mod_glossary_entry_form extends moodleform { $mform->addElement('textarea', 'aliases', get_string('aliases', 'glossary'), 'rows="2" cols="40"'); $mform->setType('aliases', PARAM_TEXT); - $mform->setHelpButton('aliases', array('aliases2', strip_tags(get_string('aliases', 'glossary')), 'glossary')); + $mform->addHelpButton('aliases', 'aliases', 'glossary'); $mform->addElement('filemanager', 'attachment_filemanager', get_string('attachment', 'glossary'), null, $attachmentoptions); - $mform->setHelpButton('attachment_filemanager', array('attachment2', get_string('attachment', 'glossary'), 'glossary')); + $mform->addHelpButton('attachment_filemanager', 'attachment', 'glossary'); if (!$glossary->usedynalink) { $mform->addElement('hidden', 'usedynalink', $CFG->glossary_linkentries); @@ -52,16 +52,16 @@ class mod_glossary_entry_form extends moodleform { $mform->addElement('header', 'linkinghdr', get_string('linking', 'glossary')); $mform->addElement('checkbox', 'usedynalink', get_string('entryusedynalink', 'glossary')); - $mform->setHelpButton('usedynalink', array('usedynalinkentry', strip_tags(get_string('usedynalink', 'glossary')), 'glossary')); + $mform->addHelpButton('usedynalink', 'entryusedynalink', 'glossary'); $mform->setDefault('usedynalink', $CFG->glossary_linkentries); $mform->addElement('checkbox', 'casesensitive', get_string('casesensitive', 'glossary')); - $mform->setHelpButton('casesensitive', array('casesensitive', strip_tags(get_string('casesensitive', 'glossary')), 'glossary')); + $mform->addHelpButton('casesensitive', 'casesensitive', 'glossary'); $mform->disabledIf('casesensitive', 'usedynalink'); $mform->setDefault('casesensitive', $CFG->glossary_casesensitive); $mform->addElement('checkbox', 'fullmatch', get_string('fullmatch', 'glossary')); - $mform->setHelpButton('fullmatch', array('fullmatch', strip_tags(get_string('fullmatch', 'glossary')), 'glossary')); + $mform->addHelpButton('fullmatch', 'fullmatch', 'glossary'); $mform->disabledIf('fullmatch', 'usedynalink'); $mform->setDefault('fullmatch', $CFG->glossary_fullmatch); } diff --git a/mod/glossary/editcategories.html b/mod/glossary/editcategories.html index 839c0b4291c..b6c252eb30b 100644 --- a/mod/glossary/editcategories.html +++ b/mod/glossary/editcategories.html @@ -27,7 +27,7 @@ } ?>> - old_help_icon("linkcategory", get_string("linkcategory", "glossary"), "glossary") ?> + help_icon('linkcategory', 'glossary') ?> diff --git a/mod/glossary/import.html b/mod/glossary/import.html index 44d6eac12f3..72b7de5616e 100644 --- a/mod/glossary/import.html +++ b/mod/glossary/import.html @@ -6,7 +6,7 @@ echo '('; print_string("maxsize", "", display_size(get_max_upload_file_size($CFG->maxbytes, $course->maxbytes))); echo ') '; - echo $OUTPUT->old_help_icon("filetoimport", get_string("filetoimport", "glossary"), "glossary"); + echo $OUTPUT->help_icon('filetoimport', 'glossary'); ?> @@ -24,11 +24,9 @@ old_help_icon("destination", get_string("destination", "glossary"), "glossary") ?> + help_icon('destination', 'glossary') ?> : - " /> - old_help_icon("importcategories", get_string("importcategories", "glossary"), "glossary") ?> - + " /> diff --git a/mod/glossary/lang/en/glossary.php b/mod/glossary/lang/en/glossary.php index 4a2d1b6f64a..fdaebca03e8 100644 --- a/mod/glossary/lang/en/glossary.php +++ b/mod/glossary/lang/en/glossary.php @@ -37,6 +37,7 @@ $string['allowcomments'] = 'Allow comments on entries'; $string['allowcomments_help'] = 'If enabled, all participants with permission to create comments will be able to add comments to glossary entries.'; $string['allowduplicatedentries'] = 'Duplicate entries allowed'; $string['allowduplicatedentries_help'] = 'If enabled, multiple entries can have the same concept name.'; +$string['allowprintview'] = 'Allow print view'; $string['allowprintview_help'] = 'If enabled, students are provided with a link to a printer-friendly version of the glossary. The link is always available to teachers.'; $string['allowratings'] = 'Allow entries to be rated?'; $string['answer'] = 'Answer'; @@ -162,7 +163,6 @@ $string['fillfields'] = 'Concept and definition are mandatory fields.'; $string['filtername'] = 'Glossary Auto-linking'; $string['fullmatch'] = 'Match whole words only'; $string['fullmatch_help'] = 'This setting specifies whether only whole words will be linked, for example, a glossary entry named "construct" will not create a link inside the word "constructivism".'; -$string['globalglossary'] = 'Global glossary'; $string['glossaryadministration'] = 'Glossary Administration'; $string['glossary:approve'] = 'Approve unapproved entries'; $string['glossary:comment'] = 'Create comments'; diff --git a/mod/glossary/mod_form.php b/mod/glossary/mod_form.php index c00dff98bbc..9b5198cba93 100644 --- a/mod/glossary/mod_form.php +++ b/mod/glossary/mod_form.php @@ -28,7 +28,7 @@ class mod_glossary_mod_form extends moodleform_mod { if (has_capability('mod/glossary:manageentries', get_context_instance(CONTEXT_SYSTEM))) { $mform->addElement('checkbox', 'globalglossary', get_string('isglobal', 'glossary')); - $mform->setHelpButton('globalglossary', array('globalglossary', get_string('globalglossary', 'glossary'), 'glossary')); + $mform->addHelpButton('globalglossary', 'isglobal', 'glossary'); }else{ $mform->addElement('hidden', 'globalglossary'); @@ -37,28 +37,28 @@ class mod_glossary_mod_form extends moodleform_mod { $options = array(1=>get_string('mainglossary', 'glossary'), 0=>get_string('secondaryglossary', 'glossary')); $mform->addElement('select', 'mainglossary', get_string('glossarytype', 'glossary'), $options); - $mform->setHelpButton('mainglossary', array('mainglossary', get_string('mainglossary', 'glossary'), 'glossary')); + $mform->addHelpButton('mainglossary', 'glossarytype', 'glossary'); $mform->setDefault('mainglossary', 0); $mform->addElement('selectyesno', 'allowduplicatedentries', get_string('allowduplicatedentries', 'glossary')); $mform->setDefault('allowduplicatedentries', $CFG->glossary_dupentries); - $mform->setHelpButton('allowduplicatedentries', array('allowduplicatedentries', get_string('allowduplicatedentries', 'glossary'), 'glossary')); + $mform->addHelpButton('allowduplicatedentries', 'allowduplicatedentries', 'glossary'); $mform->addElement('selectyesno', 'allowcomments', get_string('allowcomments', 'glossary')); $mform->setDefault('allowcomments', $CFG->glossary_allowcomments); - $mform->setHelpButton('allowcomments', array('allowcomments', get_string('allowcomments', 'glossary'), 'glossary')); + $mform->addHelpButton('allowcomments', 'allowcomments', 'glossary'); $mform->addElement('selectyesno', 'allowprintview', get_string('allowprintview', 'glossary')); $mform->setDefault('allowprintview', 1); - $mform->setHelpButton('allowprintview', array('allowprintview', get_string('allowprintview', 'glossary'), 'glossary')); + $mform->addHelpButton('allowprintview', 'allowprintview', 'glossary'); $mform->addElement('selectyesno', 'usedynalink', get_string('usedynalink', 'glossary')); $mform->setDefault('usedynalink', $CFG->glossary_linkbydefault); - $mform->setHelpButton('usedynalink', array('usedynalink', get_string('usedynalink', 'glossary'), 'glossary')); + $mform->addHelpButton('usedynalink', 'usedynalink', 'glossary'); $mform->addElement('selectyesno', 'defaultapproval', get_string('defaultapproval', 'glossary')); $mform->setDefault('defaultapproval', $CFG->glossary_defaultapproval); - $mform->setHelpButton('defaultapproval', array('defaultapproval', get_string('defaultapproval', 'glossary'), 'glossary')); + $mform->addHelpButton('defaultapproval', 'defaultapproval', 'glossary'); //get and update available formats $recformats = glossary_get_available_formats(); @@ -73,23 +73,23 @@ class mod_glossary_mod_form extends moodleform_mod { asort($formats); $mform->addElement('select', 'displayformat', get_string('displayformat', 'glossary'), $formats); $mform->setDefault('displayformat', 'dictionary'); - $mform->setHelpButton('displayformat', array('displayformat', get_string('displayformat', 'glossary'), 'glossary')); + $mform->addHelpButton('displayformat', 'displayformat', 'glossary'); $mform->addElement('selectyesno', 'showspecial', get_string('showspecial', 'glossary')); $mform->setDefault('showspecial', 1); - $mform->setHelpButton('showspecial', array('shows', get_string('showspecial', 'glossary'), 'glossary')); + $mform->addHelpButton('showspecial', 'showspecial', 'glossary'); $mform->addElement('selectyesno', 'showalphabet', get_string('showalphabet', 'glossary')); $mform->setDefault('showalphabet', 1); - $mform->setHelpButton('showalphabet', array('shows', get_string('showalphabet', 'glossary'), 'glossary')); + $mform->addHelpButton('showalphabet', 'showalphabet', 'glossary'); $mform->addElement('selectyesno', 'showall', get_string('showall', 'glossary')); $mform->setDefault('showall', 1); - $mform->setHelpButton('showall', array('shows', get_string('showall', 'glossary'), 'glossary')); + $mform->addHelpButton('showall', 'showall', 'glossary'); $mform->addElement('selectyesno', 'editalways', get_string('editalways', 'glossary')); $mform->setDefault('editalways', 0); - $mform->setHelpButton('editalways', array('editalways', get_string('editalways', 'glossary'), 'glossary')); + $mform->addHelpButton('editalways', 'editalways', 'glossary'); if ($CFG->enablerssfeeds && isset($CFG->glossary_enablerssfeeds) && $CFG->glossary_enablerssfeeds) { //------------------------------------------------------------------------------- @@ -99,7 +99,7 @@ class mod_glossary_mod_form extends moodleform_mod { $choices[1] = get_string('withauthor', 'glossary'); $choices[2] = get_string('withoutauthor', 'glossary'); $mform->addElement('select', 'rsstype', get_string('rsstype'), $choices); - $mform->setHelpButton('rsstype', array('rsstype', get_string('rsstype'), 'glossary')); + $mform->addHelpButton('rsstype', 'rsstype', 'glossary'); $choices = array(); $choices[0] = '0'; @@ -116,7 +116,7 @@ class mod_glossary_mod_form extends moodleform_mod { $choices[40] = '40'; $choices[50] = '50'; $mform->addElement('select', 'rssarticles', get_string('rssarticles'), $choices); - $mform->setHelpButton('rssarticles', array('rssarticles', get_string('rssarticles'), 'glossary')); + $mform->addHelpButton('rssarticles', 'rssarticles', 'glossary'); $mform->disabledIf('rssarticles', 'rsstype', 'eq', 0); }