2003-09-16 18:51:40 +00:00
|
|
|
<?PHP // $Id$
|
|
|
|
|
2003-11-21 18:42:38 +00:00
|
|
|
function glossary_print_entry_by_format($course, $cm, $glossary, $entry, $mode="",$hook="",$printicons=1,$ratings=NULL) {
|
2003-09-16 18:51:40 +00:00
|
|
|
global $THEME, $CFG, $USER;
|
|
|
|
|
2003-10-17 08:38:16 +00:00
|
|
|
$colour = $THEME->cellheading2;
|
2003-09-16 18:51:40 +00:00
|
|
|
|
|
|
|
$user = get_record("user", "id", $entry->userid);
|
2003-10-17 08:38:16 +00:00
|
|
|
$strby = get_string("writtenby", "glossary");
|
2003-09-16 18:51:40 +00:00
|
|
|
|
2003-10-17 08:38:16 +00:00
|
|
|
echo "\n<table border=0 width=95% cellspacing=0 valign=top cellpadding=3 class=forumpost align=center>";
|
2003-09-16 18:51:40 +00:00
|
|
|
|
2003-10-17 08:38:16 +00:00
|
|
|
echo "\n<tr>";
|
2003-10-19 03:28:53 +00:00
|
|
|
echo "\n<td bgcolor=\"$colour\" width=35 valign=top class=\"forumpostpicture\">";
|
2003-11-21 18:42:38 +00:00
|
|
|
$return = false;
|
2003-09-16 18:51:40 +00:00
|
|
|
if ($entry) {
|
2003-10-17 08:38:16 +00:00
|
|
|
print_user_picture($user->id, $course->id, $user->picture);
|
2003-10-28 16:10:36 +00:00
|
|
|
|
|
|
|
echo "</td>";
|
|
|
|
echo "<td nowrap valign=\"top\" width=100% bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
|
|
|
|
|
2003-11-15 15:55:47 +00:00
|
|
|
glossary_print_entry_approval($cm, $entry, $mode);
|
2003-10-28 16:10:36 +00:00
|
|
|
glossary_print_entry_attachment($entry,"html","right");
|
|
|
|
|
|
|
|
echo "<b>";
|
|
|
|
glossary_print_entry_concept($entry);
|
|
|
|
echo "</b><br />";
|
|
|
|
|
2003-11-19 17:47:40 +00:00
|
|
|
echo "<font size=\"2\">$strby " . fullname($user, isteacher($course->id)) . "</font>";
|
2003-10-17 08:38:16 +00:00
|
|
|
echo " <font size=1>(".get_string("lastedited").": ".
|
|
|
|
userdate($entry->timemodified).")</font>";
|
2003-10-28 16:10:36 +00:00
|
|
|
echo "</tr>";
|
2003-09-16 18:51:40 +00:00
|
|
|
|
2003-10-28 16:10:36 +00:00
|
|
|
echo "\n<tr>";
|
|
|
|
echo "\n<td bgcolor=\"$colour\" width=35 valign=top class=\"forumpostside\"> </td>";
|
|
|
|
echo "\n<td width=100% bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
|
|
|
|
|
|
|
|
glossary_print_entry_definition($entry);
|
2003-11-15 15:55:47 +00:00
|
|
|
glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons);
|
2003-11-21 18:42:38 +00:00
|
|
|
echo ' ';
|
|
|
|
$return = glossary_print_entry_ratings($course, $entry, $ratings);
|
2003-09-16 18:51:40 +00:00
|
|
|
|
|
|
|
} else {
|
2003-10-17 08:38:16 +00:00
|
|
|
echo "<center>";
|
2003-09-16 18:51:40 +00:00
|
|
|
print_string("noentry", "glossary");
|
2003-10-17 08:38:16 +00:00
|
|
|
echo "</center>";
|
2003-09-16 18:51:40 +00:00
|
|
|
}
|
2003-10-17 08:38:16 +00:00
|
|
|
echo "</td></tr>";
|
2003-09-16 18:51:40 +00:00
|
|
|
|
2003-10-17 08:38:16 +00:00
|
|
|
echo "</table>\n";
|
2003-11-21 18:42:38 +00:00
|
|
|
return $return;
|
2003-09-16 18:51:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|