Browse files

- 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.
  • Loading branch information...
1 parent dc04ce9 commit f4a809db92654784b9f0951220ce83bedec9195f willcast committed Oct 17, 2003
Showing with 2 additions and 3 deletions.
  1. +2 −3 mod/glossary/dynalink.php
View
5 mod/glossary/dynalink.php
@@ -32,8 +32,7 @@ function glossary_dynamic_link($courseid, $text) {
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 @@ function glossary_dynamic_link($courseid, $text) {
$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 = "<a class=\"autolink\" title=\"$title\" href=\"$CFG->wwwroot/mod/glossary/view.php?id=$cm->id&currentview=categories&cat=$concept->id\">";
} else {

0 comments on commit f4a809d

Please sign in to comment.