]> git.mjollnir.org Git - moodle.git/commitdiff
Moved a function to lib.php
authormartin <martin>
Sun, 4 Aug 2002 07:06:45 +0000 (07:06 +0000)
committermartin <martin>
Sun, 4 Aug 2002 07:06:45 +0000 (07:06 +0000)
mod/journal/lib.php
mod/journal/view.php

index 32bc4e5138f69013ffe22e7d5fad4d6024f5cd02..cc784ce4eacb8be5967fc537b14c7583bcb7443c 100644 (file)
@@ -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>";
+
+}
+
 ?>
index dfee3a28c08aeb41bfe8a6c6627adbf3dcf942d7..fa1f5e10b52634f3eb3371716a7524b2bf9a3c88 100644 (file)
 
     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>";
-
-}
-
 ?>