55 lines
1.8 KiB
PHP
Raw Normal View History

<?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) {
global $THEME, $CFG, $USER;
$colour = $THEME->cellheading2;
$user = get_record("user", "id", $entry->userid);
$strby = get_string("writtenby", "glossary");
echo "\n<table border=0 width=95% cellspacing=0 valign=top cellpadding=3 class=forumpost align=center>";
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;
if ($entry) {
print_user_picture($user->id, $course->id, $user->picture);
echo "</td>";
echo "<td nowrap valign=\"top\" width=100% bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
glossary_print_entry_approval($cm, $entry, $mode);
glossary_print_entry_attachment($entry,"html","right");
echo "<b>";
glossary_print_entry_concept($entry);
echo "</b><br />";
echo "<font size=\"2\">$strby " . fullname($user, isteacher($course->id)) . "</font>";
echo "&nbsp;&nbsp;<font size=1>(".get_string("lastedited").": ".
userdate($entry->timemodified).")</font>";
echo "</tr>";
echo "\n<tr>";
echo "\n<td bgcolor=\"$colour\" width=35 valign=top class=\"forumpostside\">&nbsp;</td>";
echo "\n<td width=100% bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
glossary_print_entry_definition($entry);
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);
} else {
echo "<center>";
print_string("noentry", "glossary");
echo "</center>";
}
echo "</td></tr>";
echo "</table>\n";
2003-11-21 18:42:38 +00:00
return $return;
}
?>