1
<?PHP // $Id: encyclopedia_format.php,v 1.2.2.2 2004/11/26 01:16:16 stronk7 Exp $
3
function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode="",$hook="",$printicons=1,$ratings=NULL, $aliases=true) {
4
global $THEME, $CFG, $USER;
6
$colour = $THEME->cellheading2;
8
$user = get_record("user", "id", $entry->userid);
9
$strby = get_string("writtenby", "glossary");
11
echo "\n<br /><table border=0 width=95% cellspacing=0 valign=top cellpadding=3 class=forumpost align=center>";
14
echo "\n<td bgcolor=\"$colour\" width=35 valign=top class=\"forumpostpicture\">";
17
print_user_picture($user->id, $course->id, $user->picture);
20
echo "<td valign=\"top\" width=100% bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
22
glossary_print_entry_concept($entry);
25
echo "<font size=\"2\">$strby " . fullname($user, isteacher($course->id)) . "</font>";
26
echo " <font size=1>(".get_string("lastedited").": ".
27
userdate($entry->timemodified).")</font>";
29
echo "\n<td bgcolor=\"$THEME->cellheading\" width=35 valign=top class=\"forumpostheader\">";
31
glossary_print_entry_approval($cm, $entry, $mode);
37
echo "\n<td bgcolor=\"$colour\" width=35 valign=top class=\"forumpostside\"> </td>";
38
echo "\n<td width=100% colspan=\"2\" bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
39
echo "<table width=\"100%\" border=\"0\"><tr><td>";
41
if ($entry->attachment) {
42
$entry->course = $course->id;
43
if (strlen($entry->definition)%2) {
48
glossary_print_entry_attachment($entry,"",$align,false);
50
glossary_print_entry_definition($entry);
51
echo "</td></tr></table>";
53
if ($printicons or $ratings or $aliases) {
54
$return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons,$ratings, $aliases);
59
print_string("noentry", "glossary");
69
function glossary_print_entry_encyclopedia($course, $cm, $glossary, $entry, $mode="", $hook="", $printicons=1, $ratings=NULL) {
71
//The print view for this format is exactly the normal view, so we use it
73
//Take out autolinking in definitions un print view
74
$entry->definition = '<nolink>'.$entry->definition.'</nolink> ';
76
//Call to view function (without icons, ratings and aliases) and return its result
77
return glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode, $hook, false, false, false);