]> git.mjollnir.org Git - moodle.git/commitdiff
Now some CFG->glossary_XXXX variables are checked in lib.php
authorstronk7 <stronk7>
Tue, 24 Aug 2004 11:24:27 +0000 (11:24 +0000)
committerstronk7 <stronk7>
Tue, 24 Aug 2004 11:24:27 +0000 (11:24 +0000)
Bug 1764
(http://moodle.org/bugs/bug.php?op=show&bugid=1764)

Merged from MOODLE_14_STABLE

mod/glossary/lib.php

index 0b5b8c5bad8e1052b8b2073d00c8fb4a56b7efc6..4e5b4286d05245a3fbb6f82b1e03df92de5a18ac 100644 (file)
@@ -18,6 +18,34 @@ define("GLOSSARY_IMPORT_VIEW", 5);
 define("GLOSSARY_EXPORT_VIEW", 6);
 define("GLOSSARY_APPROVAL_VIEW", 7);
 
+//Check for global configure default variables
+
+if (!isset($CFG->glossary_studentspost)) {
+    set_config("glossary_studentspost", 1);  // Students can post entries.
+}
+
+if (!isset($CFG->glossary_dupentries)) {
+    set_config("glossary_dupentries", 0);  // Duplicate entries are not allowed.
+}
+
+if (!isset($CFG->glossary_allowcomments)) {
+    set_config("glossary_allowcomments", 0);  // Comments are not allowed.
+}
+
+if (!isset($CFG->glossary_linkbydefault)) {
+    set_config("glossary_linkbydefault", 1);  // Linking entries is enabled.
+}
+
+if (!isset($CFG->glossary_defaultapproval)) {
+    set_config("glossary_defaultapproval", 1);  // Entries are approved.
+}
+
+if (!isset($CFG->glossary_entbypage)) {
+    set_config("glossary_entbypage", 10);  // 10 entries are showed.
+}
+
+/// STANDARD FUNCTIONS ///////////////////////////////////////////////////////////
+
 function glossary_add_instance($glossary) {
 /// Given an object containing all the necessary data,
 /// (defined by the form in mod.html) this function