From: willcast Date: Fri, 17 Oct 2003 15:35:18 +0000 (+0000) Subject: - Two little mods in the category linking issue: X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f4a809db92654784b9f0951220ce83bedec9195f;p=moodle.git - Two little mods in the category linking issue: The concepts could be in more than one glossary so... I put it inside the "if concept is category" conditional... I little more efficient. --- diff --git a/mod/glossary/dynalink.php b/mod/glossary/dynalink.php index d1c0472ef9..3b39bf3aaf 100644 --- a/mod/glossary/dynalink.php +++ b/mod/glossary/dynalink.php @@ -32,8 +32,7 @@ if ( $concepts ) { $lastglossary = 0; - $lastcategory = 0; - $cm = get_coursemodule_from_instance("glossary", $glossary->id, $courseid); + $lastcategory = 0; foreach ( $concepts as $concept ) { if ( $lastglossary != $concept->glossaryid ) { $glossary = get_record("glossary","id",$concept->glossaryid); @@ -45,7 +44,7 @@ $category = get_record("glossary_categories","id",$concept->id); $lastcategory = $concept->id; } - + $cm = get_coursemodule_from_instance("glossary", $glossary->id, $courseid); $title = strip_tags("$glossary->name: " . get_string("category","glossary"). " $category->name"); $href_tag_begin = "wwwroot/mod/glossary/view.php?id=$cm->id¤tview=categories&cat=$concept->id\">"; } else {