course)) { error("Course is misconfigured"); } if (! $glossary = get_record("glossary", "id", $cm->instance)) { error("Course module is incorrect"); } if (! $entry = get_record("glossary_entries", "id", $eid)) { error("Entry is incorrect"); } require_login($course->id); if (!$cm->visible and !isteacher($course->id)) { notice(get_string("activityiscurrentlyhidden")); } add_to_log($course->id, "glossary", "view", "view.php?id=$cm->id", "$glossary->id"); /// Printing the page header if ($course->category) { $navigation = "id\">$course->shortname ->"; } $strglossaries = get_string("modulenameplural", "glossary"); $strglossary = get_string("modulename", "glossary"); $strallcategories = get_string("allcategories", "glossary"); $straddentry = get_string("addentry", "glossary"); $strnoentries = get_string("noentries", "glossary"); $strsearchconcept = get_string("searchconcept", "glossary"); $strsearchindefinition = get_string("searchindefinition", "glossary"); $strsearch = get_string("search"); print_header(strip_tags("$course->shortname: $glossary->name"), "$course->fullname", "$navigation id>$strglossaries -> id>$glossary->name -> " . get_string("comments","glossary"), "", "", true, update_module_button($cm->id, $course->id, $strglossary), navmenu($course, $cm)); print_heading($glossary->name); /// Info boxes if ( $glossary->intro ) { print_simple_box_start("center","70%"); echo '
'; echo $glossary->intro; echo '
'; print_simple_box_end(); } echo ""; echo "
";
echo "
| |||
";
if ($entry->attachment) {
$entry->course = $course->id;
echo "
| ";
echo "
" . get_string("nocomments","glossary") . "";
} else {
foreach ($comments as $comment) {
echo " ";
glossary_print_comment($course, $cm, $glossary, $entry, $comment);
}
}
/// Finish the page
print_footer($course);
?>