From: martin Date: Sun, 4 Aug 2002 07:06:45 +0000 (+0000) Subject: Moved a function to lib.php X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b62f150b7c375a5ffd87ce8e17d619387fb30aa8;p=moodle.git Moved a function to lib.php --- diff --git a/mod/journal/lib.php b/mod/journal/lib.php index 32bc4e5138..cc784ce4ea 100644 --- a/mod/journal/lib.php +++ b/mod/journal/lib.php @@ -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"; + + echo "\n"; + echo "\n"; + echo ""; + + echo "\n
body\" WIDTH=35 VALIGN=TOP>"; + print_user_picture($teacher->id, $course->id, $teacher->picture); + echo "cellheading\">$teacher->firstname $teacher->lastname"; + echo "  ".userdate($entry->timemarked).""; + echo "
cellcontent\">"; + + echo "

"; + if ($RATING[$entry->rating]) { + echo "Overall rating: "; + echo $RATING[$entry->rating]; + } else { + echo "No rating given"; + } + echo "

"; + + echo text_to_html($entry->comment); + echo "
"; + +} + ?> diff --git a/mod/journal/view.php b/mod/journal/view.php index dfee3a28c0..fa1f5e10b5 100644 --- a/mod/journal/view.php +++ b/mod/journal/view.php @@ -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"; - - echo "\n"; - echo "\n"; - echo ""; - - echo "\n
body\" WIDTH=35 VALIGN=TOP>"; - print_user_picture($teacher->id, $course->id, $teacher->picture); - echo "cellheading\">$teacher->firstname $teacher->lastname"; - echo "  ".userdate($entry->timemarked).""; - echo "
cellcontent\">"; - - echo "

"; - if ($RATING[$entry->rating]) { - echo "Overall rating: "; - echo $RATING[$entry->rating]; - } else { - echo "No rating given"; - } - echo "

"; - - echo text_to_html($entry->comment); - echo "
"; - -} - ?>