2003-09-29 17:45:42 +00:00
|
|
|
<?PHP
|
|
|
|
require_once("../../config.php");
|
|
|
|
require_once("lib.php");
|
|
|
|
|
|
|
|
require_variable($courseid);
|
2003-09-30 02:17:09 +00:00
|
|
|
require_variable($concept); // entry id
|
2003-09-29 17:45:42 +00:00
|
|
|
|
2003-09-30 02:17:09 +00:00
|
|
|
$entries = get_records("glossary_entries","ucase(concept)",strtoupper(trim($concept)));
|
2003-09-29 17:45:42 +00:00
|
|
|
|
|
|
|
print_header();
|
|
|
|
|
2003-09-30 02:17:09 +00:00
|
|
|
glossary_show_entry($courseid, $entries);
|
2003-09-29 17:45:42 +00:00
|
|
|
|
|
|
|
close_window_button();
|
|
|
|
|
2003-09-30 02:17:09 +00:00
|
|
|
function glossary_show_entry($courseid, $entries) {
|
2003-09-29 17:45:42 +00:00
|
|
|
global $THEME, $USER;
|
|
|
|
|
|
|
|
$colour = $THEME->cellheading2;
|
|
|
|
|
2003-10-17 08:19:56 +00:00
|
|
|
echo "\n<center><table width=95% border=0><tr>";
|
|
|
|
echo "<td width=100%\">";
|
2003-09-30 02:17:09 +00:00
|
|
|
if ( $entries ) {
|
|
|
|
foreach ( $entries as $entry ) {
|
2003-10-16 22:05:00 +00:00
|
|
|
|
|
|
|
if (! $glossary = get_record("glossary", "id", $entry->glossaryid)) {
|
|
|
|
error("Glossary ID was incorrect or no longer exists");
|
2003-09-30 02:17:09 +00:00
|
|
|
}
|
2003-10-16 22:05:00 +00:00
|
|
|
if (! $course = get_record("course", "id", $glossary->course)) {
|
|
|
|
error("Glossary is misconfigured - don't know what course it's from");
|
2003-09-30 02:17:09 +00:00
|
|
|
}
|
2003-10-16 22:05:00 +00:00
|
|
|
if (!$cm = get_coursemodule_from_instance("glossary", $entry->glossaryid, $courseid) ) {
|
|
|
|
error("Glossary is misconfigured - don't know what course module it is ");
|
2003-09-30 02:17:09 +00:00
|
|
|
}
|
2003-10-16 22:05:00 +00:00
|
|
|
|
|
|
|
glossary_print_entry($course, $cm, $glossary, $entry);
|
2003-09-30 02:17:09 +00:00
|
|
|
}
|
2003-09-29 17:45:42 +00:00
|
|
|
}
|
|
|
|
echo "</td>";
|
2003-10-17 08:19:56 +00:00
|
|
|
echo "</tr></table></center>";
|
2003-09-29 17:45:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|