$strsearch = get_string("search");
print_header(strip_tags("$course->shortname: $glossary->name"), "$course->fullname",
- "$navigation <A HREF=index.php?id=$course->id>$strglossaries</A> -> <A HREF=view.php?id=$cm->id>$glossary->name</a> -> " . get_string("comments","glossary"),
+ "$navigation <A HREF=index.php?id=$course->id>$strglossaries</A> -> <A HREF=view.php?id=$cm->id>$glossary->name</a> -> $entry->concept",
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
navmenu($course, $cm));
- print_heading($glossary->name);
+/// original glossary entry
-/// Info boxes
+ echo "<center>";
+ glossary_print_entry($course, $cm, $glossary, $entry, "", "", false);
+ echo "</center>";
- if ( $glossary->intro ) {
- print_simple_box_start("center","70%");
- echo '<p>';
- echo $glossary->intro;
- echo '</p>';
- print_simple_box_end();
- }
+/// comments
- echo "<p align=center>";
- echo "<table class=\"generalbox\" width=\"70%\" align=\"center\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\">";
- echo "<tr bgcolor=$THEME->cellheading2><td align=center>";
- echo "<table border=0 width=100%><tr><td width=33%></td><td width=33% align=center>";
- echo get_string("commentson","glossary") . ' <b>' . glossary_print_entry_concept($entry) . '</b></td>';
- echo "<td width=33% align=right>";
- if ( $glossary->allowcomments ) {
- echo "<a href=\"comment.php?id=$cm->id&eid=$entry->id\"><img alt=\"" . get_string("addcomment","glossary") . "\" src=\"comment.gif\" height=11 width=11 border=0></a> ";
- }
- echo "</td></tr></table>";
-
- echo "</td></tr>";
- echo "<tr><TD WIDTH=100% BGCOLOR=\"#FFFFFF\">";
- if ($entry->attachment) {
- $entry->course = $course->id;
- echo "<table border=0 align=right><tr><td>";
- echo glossary_print_attachments($entry,"html");
- echo "</td></tr></table>";
+ $strheading = get_string('commentson','glossary')." <b>\"$entry->concept\"</b>";
+ if ($glossary->allowcomments) {
+ $strheading .= " <a href=\"comment.php?id=$cm->id&eid=$entry->id\"><img title=\"" . get_string("addcomment","glossary") . "\" src=\"comment.gif\" height=11 width=11 border=0></a> ";
}
- echo "<b>$entry->concept</b>: ";
- glossary_print_entry_definition($entry);
- echo "</td>";
- echo "</TR></table>";
-/// comments
- $comments = get_records("glossary_comments","entryid",$entry->id,"timemodified ASC");
- if ( !$comments ) {
- echo "<p align=center><strong>" . get_string("nocomments","glossary") . "</string>";
- } else {
+ print_heading($strheading);
+
+ if ($comments = get_records("glossary_comments","entryid",$entry->id,"timemodified ASC")) {
foreach ($comments as $comment) {
- echo "<p align=center>";
glossary_print_comment($course, $cm, $glossary, $entry, $comment);
+ echo '<br />';
}
+ } else {
+ print_heading(get_string("nocomments","glossary"));
}
/// Finish the page
+
print_footer($course);
+
?>
$user = get_record("user", "id", $comment->userid);
$strby = get_string("writtenby","glossary");
-
- echo '<table border="0" width="70%" cellpadding="3" cellspacing="0" class="forumpost">';
- echo "<tr>";
-
$fullname = fullname($user, isteacher($course->id));
+ echo '<table align="center" border="0" width="70%" cellpadding="3" cellspacing="0" class="forumpost">';
+ echo "<tr>";
+ echo "<tr><td bgcolor=\"$THEME->cellcontent2\" class=\"forumpostpicture\" width=\"35\" valign=\"top\">";
+ print_user_picture($user->id, $course->id, $user->picture);
+ echo "</td>";
echo "<td bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\" width=\"100%\">";
echo "<p>";
- print_user_picture($user->id, $course->id, $user->picture);
- echo "<font size=3> <b>$fullname</b></font><br \>";
- echo "<FONT SIZE=1> (".get_string("lastedited").": ".userdate($comment->timemodified).")</FONT></small>";
- echo "<font size=2>";
-
+ echo "<font size=2><a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">$fullname</a></font><br \>";
+ echo "<font size=1>".get_string("lastedited").": ".userdate($comment->timemodified)."</font>";
+ echo "</p></td></tr>";
- echo "</font></p></td></tr>";
- echo "<tr><td bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">\n";
+ echo "<tr><td bgcolor=\"$THEME->cellcontent2\" class=\"forumpostside\" width=\"10\">";
+ echo " ";
+ echo "</td><td bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">\n";
echo format_text($comment->comment, $comment->format);
- echo "<p align=right><font size=-1>";
-
- echo "</p>";
-
echo "<div align=right><p align=right>";
if ( (time() - $comment->timemodified < $CFG->maxeditingtime and $USER->id == $comment->userid) or isteacher($course->id) ) {
- echo "<a href=\"comment.php?id=$cm->id&eid=$entry->id&cid=$comment->id&action=edit\"><img alt=\"" . get_string("edit") . "\" src=\"../../pix/t/edit.gif\" height=11 width=11 border=0></a> ";
+ echo "<a href=\"comment.php?id=$cm->id&eid=$entry->id&cid=$comment->id&action=edit\"><img
+ alt=\"" . get_string("edit") . "\" src=\"../../pix/t/edit.gif\" height=11 width=11 border=0></a> ";
}
if ( $USER->id == $comment->userid or isteacher($course->id) ) {
- echo "<a href=\"comment.php?id=$cm->id&eid=$entry->id&cid=$comment->id&action=delete\"><img alt=\"" . get_string("delete") . "\" src=\"../../pix/t/delete.gif\" height=11 width=11 border=0></a>";
+ echo "<a href=\"comment.php?id=$cm->id&eid=$entry->id&cid=$comment->id&action=delete\"><img
+ alt=\"" . get_string("delete") . "\" src=\"../../pix/t/delete.gif\" height=11 width=11 border=0></a>";
}
echo "</p>";