Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

- Applying proper coding conventions to the default settings' variables

  • Loading branch information...
commit f6149b091057c692de21755046193b0e23b6242d 1 parent cb2f570
willcast authored
16 lang/en/glossary.php
@@ -25,14 +25,14 @@
25 25 $string['commentupdated'] = "The comment has been updated.";
26 26 $string['comments'] = "Comments";
27 27 $string['commentson'] = "Comments on";
28   -$string['configstudents_can_post_entries'] = "Define if the students can or cannot post entries by default";
29   -$string['configallow_duplicated_entries'] = "Define if a glossary will allows duplicated entries by default";
30   -$string['configallow_comments'] = "Define if a glossary will accept comments on entries by default";
31   -$string['configautomatically_link_glossaries'] = "Define if a glossary should be automatically linked by default";
32   -$string['configdefault_approval_status'] = "Define the approval status by default of an entry posted by a student";
33   -$string['configautomatically_link_entry'] = "Define if an entry should be automatically linked by default";
34   -$string['configcase_sensitive'] = "Define if an entry, when linked, is case sensitive by default";
35   -$string['configmatch_whole_words'] = "Define if an entry, when linked, should match the case in the target text by default";
  28 +$string['cnfstudentcanpost'] = "Define if the students can or cannot post entries by default";
  29 +$string['cnfallowdupentries'] = "Define if a glossary will allows duplicated entries by default";
  30 +$string['cngallowcomments'] = "Define if a glossary will accept comments on entries by default";
  31 +$string['cnflinkglossaries'] = "Define if a glossary should be automatically linked by default";
  32 +$string['cnfapprovalstatus'] = "Define the approval status by default of an entry posted by a student";
  33 +$string['cnflinkentry'] = "Define if an entry should be automatically linked by default";
  34 +$string['cnfcasesensitive'] = "Define if an entry, when linked, is case sensitive by default";
  35 +$string['cnffullmatch'] = "Define if an entry, when linked, should match the case in the target text by default";
36 36 $string['concept'] = "Concept";
37 37 $string['concepts'] = "Concepts";
38 38 $string['dateview'] = "Browse by date";
43 mod/glossary/README.txt
... ... @@ -1,31 +1,32 @@
1   -Glossary version 0.1
2   -----------------------
3   -
4   -
  1 +Glossary version 0.5 dev
  2 +------------------------
5 3 By Williams Castillo (castillow@tutopia.com)
6 4
  5 +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.
7 6
8   -This is the Glossary module created and maintained by Williams Castillo.
9   -
10   -It allows to create main and secondary glossaries within courses. Some of its features are:
11   -- Entries could be added by teachers (default) or by student (optional)
12   -- Entries from a secondary glossary could be exported by the teacher to the main glossary of the course.
13   -- The course creator could specify if a glossary should or should not allow duplicated entries.
14   -- You can browse entries by its first letters or all-in-one-page.
15   -- YOu can search by concept (and optionally by definition).
16   --
  7 +Basically, this module allows you to maintain a repository of data in the form of concepts, Entry->Definitions, etc. Thus:
17 8
  9 +- Entries could be automatically linked from within moodle resources, labels, forum posts, etc.
  10 +- Glossaries can be viewed in a printer-friendly version format
  11 +- The display format of the entries is modular so you can create your own formats (and share them with the Moodle community!)
  12 +- Entries are posted by teachers and can be posted by students as well
  13 +- Entries can be approved before make them public.
  14 +- Entries can have an optional attached file.
  15 +- Entries can be commented by any registered user.
  16 +- Entries can be categorized (one entry can belongs to zero or more categories)
  17 +- Entries can be browsed by letters (initials), categories or by date.
18 18
19 19 Quick install instructions
20 20
21   -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).
22   -2) Create a folder inside your moodle/mod folder and copy all other files inside it.
23   -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.
24   -4) Visit your admin page to install the module
25   -5) Enjoy it.
26   -
  21 +1) Be sure you have at least Moodle 1.2 dev installed
  22 +2) Be sure to have the latest version of the module
  23 +3) Be sure to have the latest language for english (en) and your own language.
  24 +3) Create a directory inside you /mod directory and name it: glossary
  25 +4) Copy all the files in this directory inside the one you've created in step 3.
  26 +5) Pay a visit to your admin area
  27 +6) Have fun.
27 28
28   -Please, send me your comments and suggestions. It will help me improve this module.
  29 +Comments and suggestions are always welcome.
29 30
30 31 All the best,
31   -Will
  32 +Will
48 mod/glossary/config.html
@@ -11,11 +11,11 @@
11 11 <tr valign=top>
12 12 <td align=right><p>students_can_post_entries:</td>
13 13 <td>
14   - <SELECT size=1 name=students_can_post_entries>
  14 + <SELECT size=1 name=cnfstudentcanpost>
15 15 <?php
16 16 $yselected = "";
17 17 $nselected = "";
18   - if ($CFG->students_can_post_entries) {
  18 + if ($CFG->cnfstudentcanpost) {
19 19 $yselected = " SELECTED ";
20 20 } else {
21 21 $nselected = " SELECTED ";
@@ -26,17 +26,17 @@
26 26 </SELECT>
27 27 </td>
28 28 <td>
29   - <?php print_string("configstudents_can_post_entries", "glossary") ?>
  29 + <?php print_string("cnfstudentcanpost", "glossary") ?>
30 30 </td>
31 31 </tr>
32 32 <tr valign=top>
33 33 <td align=right><p>allow_duplicated_entries:</td>
34 34 <td>
35   - <SELECT size=1 name=allow_duplicated_entries>
  35 + <SELECT size=1 name=cnfallowdupentries>
36 36 <?php
37 37 $yselected = "";
38 38 $nselected = "";
39   - if ($CFG->allow_duplicated_entries) {
  39 + if ($CFG->cnfallowdupentries) {
40 40 $yselected = " SELECTED ";
41 41 } else {
42 42 $nselected = " SELECTED ";
@@ -47,17 +47,17 @@
47 47 </SELECT>
48 48 </td>
49 49 <td>
50   - <?php print_string("configallow_duplicated_entries", "glossary") ?>
  50 + <?php print_string("cnfallowdupentries", "glossary") ?>
51 51 </td>
52 52 </tr>
53 53 <tr valign=top>
54 54 <td align=right><p>allow_comments:</td>
55 55 <td>
56   - <SELECT size=1 name=allow_comments>
  56 + <SELECT size=1 name=cngallowcomments>
57 57 <?php
58 58 $yselected = "";
59 59 $nselected = "";
60   - if ($CFG->allow_comments) {
  60 + if ($CFG->cngallowcomments) {
61 61 $yselected = " SELECTED ";
62 62 } else {
63 63 $nselected = " SELECTED ";
@@ -68,17 +68,17 @@
68 68 </SELECT>
69 69 </td>
70 70 <td>
71   - <?php print_string("configallow_comments", "glossary") ?>
  71 + <?php print_string("cngallowcomments", "glossary") ?>
72 72 </td>
73 73 </tr>
74 74 <tr valign=top>
75 75 <td align=right><p>automatically_link_glossaries:</td>
76 76 <td>
77   - <SELECT size=1 name=automatically_link_glossaries>
  77 + <SELECT size=1 name=cnflinkglossaries>
78 78 <?php
79 79 $yselected = "";
80 80 $nselected = "";
81   - if ($CFG->automatically_link_glossaries) {
  81 + if ($CFG->cnflinkglossaries) {
82 82 $yselected = " SELECTED ";
83 83 } else {
84 84 $nselected = " SELECTED ";
@@ -89,17 +89,17 @@
89 89 </SELECT>
90 90 </td>
91 91 <td>
92   - <?php print_string("configautomatically_link_glossaries", "glossary") ?>
  92 + <?php print_string("cnflinkglossaries", "glossary") ?>
93 93 </td>
94 94 </tr>
95 95 <tr valign=top>
96 96 <td align=right><p>default_approval_status:</td>
97 97 <td>
98   - <SELECT size=1 name=default_approval_status>
  98 + <SELECT size=1 name=cnfapprovalstatus>
99 99 <?php
100 100 $yselected = "";
101 101 $nselected = "";
102   - if ($CFG->default_approval_status) {
  102 + if ($CFG->cnfapprovalstatus) {
103 103 $yselected = " SELECTED ";
104 104 } else {
105 105 $nselected = " SELECTED ";
@@ -110,7 +110,7 @@
110 110 </SELECT>
111 111 </td>
112 112 <td>
113   - <?php print_string("configdefault_approval_status", "glossary") ?>
  113 + <?php print_string("cnfapprovalstatus", "glossary") ?>
114 114 </td>
115 115 </tr>
116 116 <tr valign=top>
@@ -119,11 +119,11 @@
119 119 <tr valign=top>
120 120 <td align=right><p>automatically_link_entry:</td>
121 121 <td>
122   - <SELECT size=1 name=automatically_link_entry>
  122 + <SELECT size=1 name=cnflinkentry>
123 123 <?php
124 124 $yselected = "";
125 125 $nselected = "";
126   - if ($CFG->automatically_link_entry) {
  126 + if ($CFG->cnflinkentry) {
127 127 $yselected = " SELECTED ";
128 128 } else {
129 129 $nselected = " SELECTED ";
@@ -134,17 +134,17 @@
134 134 </SELECT>
135 135 </td>
136 136 <td>
137   - <?php print_string("configautomatically_link_entry", "glossary") ?>
  137 + <?php print_string("cnflinkentry", "glossary") ?>
138 138 </td>
139 139 </tr>
140 140 <tr valign=top>
141 141 <td align=right><p>case_sensitive:</td>
142 142 <td>
143   - <SELECT size=1 name=case_sensitive>
  143 + <SELECT size=1 name=cnfcasesensitive>
144 144 <?php
145 145 $yselected = "";
146 146 $nselected = "";
147   - if ($CFG->case_sensitive) {
  147 + if ($CFG->cnfcasesensitive) {
148 148 $yselected = " SELECTED ";
149 149 } else {
150 150 $nselected = " SELECTED ";
@@ -155,17 +155,17 @@
155 155 </SELECT>
156 156 </td>
157 157 <td>
158   - <?php print_string("configcase_sensitive", "glossary") ?>
  158 + <?php print_string("cnfcasesensitive", "glossary") ?>
159 159 </td>
160 160 </tr>
161 161 <tr valign=top>
162 162 <td align=right><p>match_whole_words:</td>
163 163 <td>
164   - <SELECT size=1 name=match_whole_words>
  164 + <SELECT size=1 name=cnffullmatch>
165 165 <?php
166 166 $yselected = "";
167 167 $nselected = "";
168   - if ($CFG->match_whole_words) {
  168 + if ($CFG->cnffullmatch) {
169 169 $yselected = " SELECTED ";
170 170 } else {
171 171 $nselected = " SELECTED ";
@@ -176,7 +176,7 @@
176 176 </SELECT>
177 177 </td>
178 178 <td>
179   - <?php print_string("configmatch_whole_words", "glossary") ?>
  179 + <?php print_string("cnffullmatch", "glossary") ?>
180 180 </td>
181 181 </tr>
182 182 <tr>
10 mod/glossary/edit.html
@@ -55,7 +55,7 @@
55 55 if ($newentry->usedynalink) {
56 56 $selected = "checked";
57 57 }
58   - } elseif ( $CFG->automatically_link_entry ) {
  58 + } elseif ( $CFG->cnflinkentry ) {
59 59 $selected = "checked";
60 60 }
61 61 ?>
@@ -71,7 +71,7 @@
71 71 if ( $newentry->casesensitive ) {
72 72 echo "selected";
73 73 }
74   - } elseif ( $CFG->case_sensitive ) {
  74 + } elseif ( $CFG->cnfcasesensitive ) {
75 75 echo "selected";
76 76 }
77 77 ?>
@@ -81,7 +81,7 @@
81 81 if ( !$newentry->casesensitive ) {
82 82 echo "selected";
83 83 }
84   - } elseif ( !$CFG->case_sensitive ) {
  84 + } elseif ( !$CFG->cnfcasesensitive ) {
85 85 echo "selected";
86 86 }
87 87 ?>><?php echo get_string("no") ?>
@@ -98,7 +98,7 @@
98 98 if ( $newentry->fullmatch ) {
99 99 echo "selected";
100 100 }
101   - } elseif ( $CFG->match_whole_words ) {
  101 + } elseif ( $CFG->cnffullmatch ) {
102 102 echo "selected";
103 103 }
104 104 ?>
@@ -108,7 +108,7 @@
108 108 if ( !$newentry->fullmatch ) {
109 109 echo "selected";
110 110 }
111   - } elseif ( !$CFG->match_whole_words ) {
  111 + } elseif ( !$CFG->cnffullmatch ) {
112 112 echo "selected";
113 113 }
114 114 ?>><?php echo get_string("no") ?>
10 mod/glossary/mod.html
@@ -5,19 +5,19 @@
5 5 global $CFG;
6 6
7 7 if (!isset($form->studentcanpost)) {
8   - $form->studentcanpost = $CFG->students_can_post_entries;
  8 + $form->studentcanpost = $CFG->cnfstudentcanpost;
9 9 }
10 10 if (!isset($form->allowduplicatedentries)) {
11   - $form->allowduplicatedentries = $CFG->allow_duplicated_entries;
  11 + $form->allowduplicatedentries = $CFG->cnfallowdupentries;
12 12 }
13 13 if (!isset($form->allowcomments)) {
14   - $form->allowcomments = $CFG->allow_comments;
  14 + $form->allowcomments = $CFG->cngallowcomments;
15 15 }
16 16 if (!isset($form->usedynalink)) {
17   - $form->usedynalink = $CFG->automatically_link_glossaries;
  17 + $form->usedynalink = $CFG->cnflinkglossaries;
18 18 }
19 19 if (!isset($form->defaultapproval)) {
20   - $form->defaultapproval = $CFG->default_approval_status;
  20 + $form->defaultapproval = $CFG->cnfapprovalstatus;
21 21 }
22 22 if (!isset($form->mainglossary)) {
23 23 $form->mainglossary = 0;

0 comments on commit f6149b0

Please sign in to comment.
Something went wrong with that request. Please try again.