forcelogin) { require_login(); } if ($eid) { $entry = get_record("glossary_entries", "id", $eid); $glossary = get_record('glossary','id',$entry->glossaryid); $entry->glossaryname = format_string($glossary->name,true); if (!$cm = get_coursemodule_from_instance("glossary", $glossary->id)) { error("Could not determine which course module this belonged to!"); } if (!$cm->visible and !isteacher($cm->course)) { redirect($CFG->wwwroot.'/course/view.php?id='.$cm->course, get_string('activityiscurrentlyhidden')); } $entry->cmid = $cm->id; $entry->courseid = $cm->course; $entries[] = $entry; } else if ($concept) { $entries = glossary_get_entries_search($concept, $courseid); } else { error('No valid entry specified'); } if ($entries) { foreach ($entries as $key => $entry) { //$entries[$key]->footer = "
"; // Could not get this to work satisfactorily in all cases - Martin $entries[$key]->footer = "» wwwroot/mod/glossary/view.php?g=$entry->glossaryid\">".format_string($entry->glossaryname,true)."
"; add_to_log($entry->courseid, "glossary", "view entry", "showentry.php?eid=$entry->id", $entry->id, $entry->cmid); } } if (!empty($courseid)) { $course = get_record("course", "id", $courseid); if ($course->category) { require_login($courseid); } $strglossaries = get_string("modulenameplural", "glossary"); $strsearch = get_string("search"); $CFG->framename = "newwindow"; if ($course->category) { print_header(strip_tags("$course->shortname: $strglossaries $strsearch"), "$course->fullname", "wwwroot/course/view.php?id=$course->id\">$course->shortname -> $strglossaries -> $strsearch", "", "", true, " ", " "); } else { print_header(strip_tags("$course->shortname: $strglossaries $strsearch"), "$course->fullname", "$strglossaries -> $strsearch", "", "", true, " ", " "); } } else { print_header(); // Needs to be something here to allow linking back to the whole glossary } if ($entries) { glossary_print_dynaentry($courseid, $entries, $displayformat); } close_window_button(); ?>