Permalink
Browse files

Moved a function to lib.php

  • Loading branch information...
1 parent 5c0c615 commit b62f150b7c375a5ffd87ce8e17d619387fb30aa8 martin committed Aug 4, 2002
Showing with 33 additions and 35 deletions.
  1. +33 −0 mod/journal/lib.php
  2. +0 −35 mod/journal/view.php
View
@@ -250,4 +250,37 @@ function journal_delete_instance($id) {
}
+function journal_print_feedback($course, $entry) {
+ global $CFG, $THEME, $RATING;
+
+ if (! $teacher = get_record("user", "id", $entry->teacher)) {
+ error("Weird journal error");
+ }
+
+ echo "\n<TABLE BORDER=1 CELLSPACING=0 valign=top cellpadding=10>";
+
+ echo "\n<TR>";
+ echo "\n<TD ROWSPAN=3 BGCOLOR=\"$THEME->body\" WIDTH=35 VALIGN=TOP>";
+ print_user_picture($teacher->id, $course->id, $teacher->picture);
+ echo "</TD>";
+ echo "<TD NOWRAP WIDTH=100% BGCOLOR=\"$THEME->cellheading\">$teacher->firstname $teacher->lastname";
+ echo "&nbsp;&nbsp;<FONT SIZE=2><I>".userdate($entry->timemarked)."</I>";
+ echo "</TR>";
+
+ echo "\n<TR><TD WIDTH=100% BGCOLOR=\"$THEME->cellcontent\">";
+
+ echo "<P ALIGN=RIGHT><FONT SIZE=-1><I>";
+ if ($RATING[$entry->rating]) {
+ echo "Overall rating: ";
+ echo $RATING[$entry->rating];
+ } else {
+ echo "No rating given";
+ }
+ echo "</I></FONT></P>";
+
+ echo text_to_html($entry->comment);
+ echo "</TD></TR></TABLE>";
+
+}
+
?>
View
@@ -113,39 +113,4 @@
print_footer($course);
-// Functions
-
-function print_feedback($course, $entry) {
- global $CFG, $THEME, $RATING;
-
- if (! $teacher = get_record("user", "id", $entry->teacher)) {
- error("Weird journal error");
- }
-
- echo "\n<TABLE BORDER=1 CELLSPACING=0 valign=top cellpadding=10>";
-
- echo "\n<TR>";
- echo "\n<TD ROWSPAN=3 BGCOLOR=\"$THEME->body\" WIDTH=35 VALIGN=TOP>";
- print_user_picture($teacher->id, $course->id, $teacher->picture);
- echo "</TD>";
- echo "<TD NOWRAP WIDTH=100% BGCOLOR=\"$THEME->cellheading\">$teacher->firstname $teacher->lastname";
- echo "&nbsp;&nbsp;<FONT SIZE=2><I>".userdate($entry->timemarked)."</I>";
- echo "</TR>";
-
- echo "\n<TR><TD WIDTH=100% BGCOLOR=\"$THEME->cellcontent\">";
-
- echo "<P ALIGN=RIGHT><FONT SIZE=-1><I>";
- if ($RATING[$entry->rating]) {
- echo "Overall rating: ";
- echo $RATING[$entry->rating];
- } else {
- echo "No rating given";
- }
- echo "</I></FONT></P>";
-
- echo text_to_html($entry->comment);
- echo "</TD></TR></TABLE>";
-
-}
-
?>

0 comments on commit b62f150

Please sign in to comment.