mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-17164: Glossary autolinking doesn't work for entries similar to current entry
This commit is contained in:
parent
4e489ae92e
commit
9bef587a84
2 changed files with 11 additions and 5 deletions
|
@ -143,6 +143,17 @@ function glossary_filter($courseid, $text) {
|
||||||
|
|
||||||
$conceptlist = filter_remove_duplicates($conceptlist);
|
$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!
|
return filter_phrases($text, $conceptlist); // Actually search for concepts!
|
||||||
}
|
}
|
||||||
|
|
|
@ -693,11 +693,6 @@ function glossary_print_entry_definition($entry) {
|
||||||
$ttpresent = false;
|
$ttpresent = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$links = array();
|
|
||||||
$tags = array();
|
|
||||||
$urls = array();
|
|
||||||
$addrs = array();
|
|
||||||
|
|
||||||
global $GLOSSARY_EXCLUDECONCEPTS;
|
global $GLOSSARY_EXCLUDECONCEPTS;
|
||||||
|
|
||||||
//Calculate all the strings to be no-linked
|
//Calculate all the strings to be no-linked
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue