discussion)) { error("Discussion ID was incorrect"); } if (! $forum = get_record("forum", "id", $discussion->forum)) { error("Forum ID was incorrect"); } if (! $course = get_record("course", "id", $forum->course)) { error("Course ID was incorrect"); } if (!isteacher($course->id) and $USER->id != $post->userid) { error("You can only look at results for posts you own"); } if (!isset($sort)) { $sort = "r.time"; } print_header("Ratings for: $post->subject"); if (!$ratings = forum_get_ratings($post->id, $sort)) { echo "No ratings for this post: \"$post->subject\""; die; } else { echo ""; echo ""; echo ""; echo "cellcontent2\">"; } else { echo "cellcontent\">"; } echo "\n"; } echo "
 id&sort=u.firstname>Name"; echo "id&sort=r.rating>Rating"; echo "id&sort=r.time>Date"; foreach ($ratings as $rating) { if (isteacher($discussion->course, $rating->id)) { echo "
"; print_user_picture($rating->id, $forum->course, $rating->picture); echo "

$rating->firstname $rating->lastname

"; echo "

".$FORUM_POST_RATINGS[$rating->rating]."

"; echo "

".userdate($rating->time)."

"; echo "
"; } close_window_button(); ?>