MDL-17164: Glossary autolinking doesn't work for entries similar to current entry

This commit is contained in:
sam_marshall 2008-11-12 17:00:04 +00:00
parent 4e489ae92e
commit 9bef587a84
2 changed files with 11 additions and 5 deletions

View file

@ -144,6 +144,17 @@ function glossary_filter($courseid, $text) {
$conceptlist = filter_remove_duplicates($conceptlist);
}
global $GLOSSARY_EXCLUDECONCEPTS;
if(!empty($GLOSSARY_EXCLUDECONCEPTS)) {
$reducedconceptlist=array();
foreach($conceptlist as $concept) {
if(!in_array($concept->phrase,$GLOSSARY_EXCLUDECONCEPTS)) {
$reducedconceptlist[]=$concept;
}
}
return filter_phrases($text, $reducedconceptlist);
}
return filter_phrases($text, $conceptlist); // Actually search for concepts!
}

View file

@ -693,11 +693,6 @@ function glossary_print_entry_definition($entry) {
$ttpresent = false;
}
$links = array();
$tags = array();
$urls = array();
$addrs = array();
global $GLOSSARY_EXCLUDECONCEPTS;
//Calculate all the strings to be no-linked