diff --git a/lang/en/glossary.php b/lang/en/glossary.php index d23697f763e..6511a223c77 100644 --- a/lang/en/glossary.php +++ b/lang/en/glossary.php @@ -4,6 +4,7 @@ $string['addcomment'] = "Add comment"; $string['addentry'] = "Add a new entry"; $string['approve'] = "Approve"; +$string['aliases'] = "Aliases"; $string['allentries'] = "ALL"; $string['allcategories'] = "All Categories"; $string['allowcomments'] = "Allow comments on entries"; @@ -57,7 +58,6 @@ $string['displayformat4'] = "FAQ"; $string['displayformat5'] = "Full without author"; $string['duplicateentry'] = "Duplicate entry"; $string['editcategories'] = "Edit categories"; -$string['editalias'] = "Edit alias"; $string['editentry'] = "Edit entry"; $string['editingcomment'] = "Editing comment"; $string['entries'] = "Entries"; @@ -101,6 +101,7 @@ $string['noconceptfound'] = "No concept or definition found."; $string['nocomments'] = "(No comments found on this entry)"; $string['noentries'] = "No entries found in this section"; $string['noentry'] = "No entry found."; +$string['onebyline'] = "(one by line)"; $string['printerfriendly'] = "Printer-friendly version"; $string['question'] = "Question"; $string['rejectedentries'] = "Rejected entries"; diff --git a/lang/en/help/glossary/aliases.html b/lang/en/help/glossary/aliases.html new file mode 100644 index 00000000000..148234e7078 --- /dev/null +++ b/lang/en/help/glossary/aliases.html @@ -0,0 +1,5 @@ +
Aliases
+ +The glossary allows to maintain a list of aliases for every entry. + +
Aliases are used as alternative terms to refer concepts so wherever the concept OR any alias is found, it will be automatically linked with the concept.
diff --git a/mod/glossary/TODO.txt b/mod/glossary/TODO.txt index bcff97cd735..eb54ca3c21c 100644 --- a/mod/glossary/TODO.txt +++ b/mod/glossary/TODO.txt @@ -2,14 +2,18 @@ Things that are in the inkpot yet: ================================== -- Allow to export/import entries (Working on it) +- Allow to export/import entries (in beta now) IMPORTING OPTIONS: * 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. + +- Add Alias to concepts in order to use dynalinks on them. (in beta now) + - Allow to set default values for glossaries and entries settings (done) + - Allow grading of entries * Evaluation * Self-evaluation? * Co-evaluation? -- Add printer friendly version of glossaries (Working on it) + +- Add printer friendly version of glossaries (in beta) diff --git a/mod/glossary/db/mysql.php b/mod/glossary/db/mysql.php index 2db2e3de813..ca3b52a11b0 100644 --- a/mod/glossary/db/mysql.php +++ b/mod/glossary/db/mysql.php @@ -156,6 +156,15 @@ function glossary_upgrade($oldversion) { } } } + + if ( $oldversion < 2003110400 ) { + execute_sql("CREATE TABLE `{$CFG->prefix}glossary_alias` ( + `id` INT(10) unsigned NOT NULL auto_increment, + `entryid` INT(10) UNSIGNED NOT NULL default '0', + `alias` TEXT NOT NULL default '', + PRIMARY KEY (`id`) + ) TYPE=MyISAM COMMENT='entries alias'"); + } return true; } diff --git a/mod/glossary/db/mysql.sql b/mod/glossary/db/mysql.sql index 1c19299bcb5..2948f776545 100644 --- a/mod/glossary/db/mysql.sql +++ b/mod/glossary/db/mysql.sql @@ -52,6 +52,17 @@ CREATE TABLE prefix_glossary_entries ( PRIMARY KEY (id) ) TYPE=MyISAM COMMENT='all glossary entries'; +# +# Table structure for table `glossary_alias` +# + +CREATE TABLE prefix_glossary_alias ( + id int(10) unsigned NOT NULL auto_increment, + entryid int(10) unsigned NOT NULL default '0', + alias text NOT NULL, + PRIMARY KEY (id) +) TYPE=MyISAM COMMENT='entries alias'; + # # Table structure for table `glossary_cageories` # diff --git a/mod/glossary/db/postgres7.sql b/mod/glossary/db/postgres7.sql index cf6cfd2072f..c16c5e981e7 100644 --- a/mod/glossary/db/postgres7.sql +++ b/mod/glossary/db/postgres7.sql @@ -61,6 +61,17 @@ CREATE TABLE prefix_glossary_categories ( PRIMARY KEY (id) ); +# +# Table structure for table `glossary_alias` +# + +CREATE TABLE prefix_glossary_alias ( + id SERIAL, + entryid int4 NOT NULL default '0', + alias TEXT NOT NULL, + PRIMARY KEY (id) +); + # # Table structure for table `glossary_entries_category` # diff --git a/mod/glossary/edit.html b/mod/glossary/edit.html index d05cddd8109..aafc2679cff 100644 --- a/mod/glossary/edit.html +++ b/mod/glossary/edit.html @@ -28,7 +28,7 @@ if (isset($errors)) {