From f6149b091057c692de21755046193b0e23b6242d Mon Sep 17 00:00:00 2001 From: willcast Date: Sun, 2 Nov 2003 02:37:44 +0000 Subject: [PATCH] - Applying proper coding conventions to the default settings' variables --- lang/en/glossary.php | 16 +++++++------- mod/glossary/README.txt | 43 +++++++++++++++++------------------ mod/glossary/config.html | 48 ++++++++++++++++++++-------------------- mod/glossary/edit.html | 10 ++++----- mod/glossary/mod.html | 10 ++++----- 5 files changed, 64 insertions(+), 63 deletions(-) diff --git a/lang/en/glossary.php b/lang/en/glossary.php index 8c7dd3763d..5f85e8d556 100644 --- a/lang/en/glossary.php +++ b/lang/en/glossary.php @@ -25,14 +25,14 @@ $string['commentdeleted'] = "The comment has been deleted."; $string['commentupdated'] = "The comment has been updated."; $string['comments'] = "Comments"; $string['commentson'] = "Comments on"; -$string['configstudents_can_post_entries'] = "Define if the students can or cannot post entries by default"; -$string['configallow_duplicated_entries'] = "Define if a glossary will allows duplicated entries by default"; -$string['configallow_comments'] = "Define if a glossary will accept comments on entries by default"; -$string['configautomatically_link_glossaries'] = "Define if a glossary should be automatically linked by default"; -$string['configdefault_approval_status'] = "Define the approval status by default of an entry posted by a student"; -$string['configautomatically_link_entry'] = "Define if an entry should be automatically linked by default"; -$string['configcase_sensitive'] = "Define if an entry, when linked, is case sensitive by default"; -$string['configmatch_whole_words'] = "Define if an entry, when linked, should match the case in the target text by default"; +$string['cnfstudentcanpost'] = "Define if the students can or cannot post entries by default"; +$string['cnfallowdupentries'] = "Define if a glossary will allows duplicated entries by default"; +$string['cngallowcomments'] = "Define if a glossary will accept comments on entries by default"; +$string['cnflinkglossaries'] = "Define if a glossary should be automatically linked by default"; +$string['cnfapprovalstatus'] = "Define the approval status by default of an entry posted by a student"; +$string['cnflinkentry'] = "Define if an entry should be automatically linked by default"; +$string['cnfcasesensitive'] = "Define if an entry, when linked, is case sensitive by default"; +$string['cnffullmatch'] = "Define if an entry, when linked, should match the case in the target text by default"; $string['concept'] = "Concept"; $string['concepts'] = "Concepts"; $string['dateview'] = "Browse by date"; diff --git a/mod/glossary/README.txt b/mod/glossary/README.txt index 71fa1b67a0..b4fda58788 100644 --- a/mod/glossary/README.txt +++ b/mod/glossary/README.txt @@ -1,31 +1,32 @@ -Glossary version 0.1 ----------------------- - - +Glossary version 0.5 dev +------------------------ By Williams Castillo (castillow@tutopia.com) +This is the Glossary module. Created and maintained by Williams Castillo. This are my first lines in PHP... It means that, although I've tried to do my best, it might (in fact, it does) shows my inexperience... in PHP... and moodle as well. -This is the Glossary module created and maintained by Williams Castillo. - -It allows to create main and secondary glossaries within courses. Some of its features are: -- Entries could be added by teachers (default) or by student (optional) -- Entries from a secondary glossary could be exported by the teacher to the main glossary of the course. -- The course creator could specify if a glossary should or should not allow duplicated entries. -- You can browse entries by its first letters or all-in-one-page. -- YOu can search by concept (and optionally by definition). -- +Basically, this module allows you to maintain a repository of data in the form of concepts, Entry->Definitions, etc. Thus: +- Entries could be automatically linked from within moodle resources, labels, forum posts, etc. +- Glossaries can be viewed in a printer-friendly version format +- The display format of the entries is modular so you can create your own formats (and share them with the Moodle community!) +- Entries are posted by teachers and can be posted by students as well +- Entries can be approved before make them public. +- Entries can have an optional attached file. +- Entries can be commented by any registered user. +- Entries can be categorized (one entry can belongs to zero or more categories) +- Entries can be browsed by letters (initials), categories or by date. Quick install instructions -1) Copy the files inside lang/en (glossary.php and help/*.*) to your lang/en folder. Please, forgive my english... I tried to do my best... I'll appreciate if you send me correct translations of these files (I've also included the spanish translation as well). -2) Create a folder inside your moodle/mod folder and copy all other files inside it. -3) If you are using a them that uses its own set of icons (like cordoroyblue), you will need to copy the icon.gif and export.gif into your folder of custom icons. -4) Visit your admin page to install the module -5) Enjoy it. - +1) Be sure you have at least Moodle 1.2 dev installed +2) Be sure to have the latest version of the module +3) Be sure to have the latest language for english (en) and your own language. +3) Create a directory inside you /mod directory and name it: glossary +4) Copy all the files in this directory inside the one you've created in step 3. +5) Pay a visit to your admin area +6) Have fun. -Please, send me your comments and suggestions. It will help me improve this module. +Comments and suggestions are always welcome. All the best, -Will +Will \ No newline at end of file diff --git a/mod/glossary/config.html b/mod/glossary/config.html index 7140996891..5e35d6c1fa 100644 --- a/mod/glossary/config.html +++ b/mod/glossary/config.html @@ -11,11 +11,11 @@

students_can_post_entries: - students_can_post_entries) { + if ($CFG->cnfstudentcanpost) { $yselected = " SELECTED "; } else { $nselected = " SELECTED "; @@ -26,17 +26,17 @@ - +

allow_duplicated_entries: - allow_duplicated_entries) { + if ($CFG->cnfallowdupentries) { $yselected = " SELECTED "; } else { $nselected = " SELECTED "; @@ -47,17 +47,17 @@ - +

allow_comments: - allow_comments) { + if ($CFG->cngallowcomments) { $yselected = " SELECTED "; } else { $nselected = " SELECTED "; @@ -68,17 +68,17 @@ - +

automatically_link_glossaries: - automatically_link_glossaries) { + if ($CFG->cnflinkglossaries) { $yselected = " SELECTED "; } else { $nselected = " SELECTED "; @@ -89,17 +89,17 @@ - +

default_approval_status: - default_approval_status) { + if ($CFG->cnfapprovalstatus) { $yselected = " SELECTED "; } else { $nselected = " SELECTED "; @@ -110,7 +110,7 @@ - + @@ -119,11 +119,11 @@

automatically_link_entry: - automatically_link_entry) { + if ($CFG->cnflinkentry) { $yselected = " SELECTED "; } else { $nselected = " SELECTED "; @@ -134,17 +134,17 @@ - +

case_sensitive: - case_sensitive) { + if ($CFG->cnfcasesensitive) { $yselected = " SELECTED "; } else { $nselected = " SELECTED "; @@ -155,17 +155,17 @@ - +

match_whole_words: - match_whole_words) { + if ($CFG->cnffullmatch) { $yselected = " SELECTED "; } else { $nselected = " SELECTED "; @@ -176,7 +176,7 @@ - + diff --git a/mod/glossary/edit.html b/mod/glossary/edit.html index dfcbd44518..faa4a8e4e6 100644 --- a/mod/glossary/edit.html +++ b/mod/glossary/edit.html @@ -55,7 +55,7 @@ if (isset($errors)) { if ($newentry->usedynalink) { $selected = "checked"; } - } elseif ( $CFG->automatically_link_entry ) { + } elseif ( $CFG->cnflinkentry ) { $selected = "checked"; } ?> @@ -71,7 +71,7 @@ if (isset($errors)) { if ( $newentry->casesensitive ) { echo "selected"; } - } elseif ( $CFG->case_sensitive ) { + } elseif ( $CFG->cnfcasesensitive ) { echo "selected"; } ?> @@ -81,7 +81,7 @@ if (isset($errors)) { if ( !$newentry->casesensitive ) { echo "selected"; } - } elseif ( !$CFG->case_sensitive ) { + } elseif ( !$CFG->cnfcasesensitive ) { echo "selected"; } ?>> @@ -98,7 +98,7 @@ if (isset($errors)) { if ( $newentry->fullmatch ) { echo "selected"; } - } elseif ( $CFG->match_whole_words ) { + } elseif ( $CFG->cnffullmatch ) { echo "selected"; } ?> @@ -108,7 +108,7 @@ if (isset($errors)) { if ( !$newentry->fullmatch ) { echo "selected"; } - } elseif ( !$CFG->match_whole_words ) { + } elseif ( !$CFG->cnffullmatch ) { echo "selected"; } ?>> diff --git a/mod/glossary/mod.html b/mod/glossary/mod.html index fa297ee888..89a3b58d04 100644 --- a/mod/glossary/mod.html +++ b/mod/glossary/mod.html @@ -5,19 +5,19 @@ global $CFG; if (!isset($form->studentcanpost)) { - $form->studentcanpost = $CFG->students_can_post_entries; + $form->studentcanpost = $CFG->cnfstudentcanpost; } if (!isset($form->allowduplicatedentries)) { - $form->allowduplicatedentries = $CFG->allow_duplicated_entries; + $form->allowduplicatedentries = $CFG->cnfallowdupentries; } if (!isset($form->allowcomments)) { - $form->allowcomments = $CFG->allow_comments; + $form->allowcomments = $CFG->cngallowcomments; } if (!isset($form->usedynalink)) { - $form->usedynalink = $CFG->automatically_link_glossaries; + $form->usedynalink = $CFG->cnflinkglossaries; } if (!isset($form->defaultapproval)) { - $form->defaultapproval = $CFG->default_approval_status; + $form->defaultapproval = $CFG->cnfapprovalstatus; } if (!isset($form->mainglossary)) { $form->mainglossary = 0; -- 2.39.5