From cb2f5705ecec19d69b2b18055696fcd7ee152770 Mon Sep 17 00:00:00 2001 From: willcast Date: Sun, 2 Nov 2003 01:48:44 +0000 Subject: [PATCH] - The admin can define default values for glossary and entries' settings via the admin modules interface. --- lang/en/glossary.php | 8 ++ mod/glossary/TODO.txt | 2 +- mod/glossary/config.html | 188 +++++++++++++++++++++++++++++++++++++++ mod/glossary/edit.html | 21 ++++- mod/glossary/edit.php | 6 -- mod/glossary/mod.html | 34 +++---- 6 files changed, 232 insertions(+), 27 deletions(-) create mode 100644 mod/glossary/config.html diff --git a/lang/en/glossary.php b/lang/en/glossary.php index 3f3b9ebc39..8c7dd3763d 100644 --- a/lang/en/glossary.php +++ b/lang/en/glossary.php @@ -25,6 +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['concept'] = "Concept"; $string['concepts'] = "Concepts"; $string['dateview'] = "Browse by date"; diff --git a/mod/glossary/TODO.txt b/mod/glossary/TODO.txt index 321d027b13..bcff97cd73 100644 --- a/mod/glossary/TODO.txt +++ b/mod/glossary/TODO.txt @@ -7,7 +7,7 @@ Things that are in the inkpot yet: * New glossary o just append entries to the current one? * With or withot categories? - Add Alias to concepts in order to use dynalinks on them. -- Allow to set default values for glossaries and entries settings +- Allow to set default values for glossaries and entries settings (done) - Allow grading of entries * Evaluation * Self-evaluation? diff --git a/mod/glossary/config.html b/mod/glossary/config.html new file mode 100644 index 0000000000..7140996891 --- /dev/null +++ b/mod/glossary/config.html @@ -0,0 +1,188 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Glossary Level Default Settings

students_can_post_entries:

+ + + +

allow_duplicated_entries:

+ + + +

allow_comments:

+ + + +

automatically_link_glossaries:

+ + + +

default_approval_status:

+ + + +
Entry Level Default Settings

automatically_link_entry:

+ + + +

case_sensitive:

+ + + +

match_whole_words:

+ + + +
+ ">
+ +
diff --git a/mod/glossary/edit.html b/mod/glossary/edit.html index 86f381042b..dfcbd44518 100644 --- a/mod/glossary/edit.html +++ b/mod/glossary/edit.html @@ -1,3 +1,6 @@ +
action="edit.php" enctype="multipart/form-data"> @@ -52,6 +55,8 @@ if (isset($errors)) { if ($newentry->usedynalink) { $selected = "checked"; } + } elseif ( $CFG->automatically_link_entry ) { + $selected = "checked"; } ?> onclick="return lockoptions('form','usedynalink', items)"> @@ -61,19 +66,23 @@ if (isset($errors)) {

:

: