diff --git a/mod/glossary/showentry_ajax.php b/mod/glossary/showentry_ajax.php index 4f2987810c9..002cf928b8d 100644 --- a/mod/glossary/showentry_ajax.php +++ b/mod/glossary/showentry_ajax.php @@ -61,6 +61,9 @@ if ($entries) { } } + // Make sure entry is not autolinking itself. + $GLOSSARY_EXCLUDEENTRY = $entry->id; + $context = context_module::instance($entry->cmid); $definition = file_rewrite_pluginfile_urls($entry->definition, 'pluginfile.php', $context->id, 'mod_glossary', 'entry', $entry->id);