course)) { error("Course is misconfigured"); } require_login($course->id); if (! $journal = get_record("journal", "id", $cm->instance)) { error("Course module is incorrect"); } add_to_log("View journal: $journal->name", $course->id); if (! $cw = get_record("course_weeks", "id", $cm->week)) { error("Course module is incorrect"); } print_header("$course->shortname: $journal->name", "$course->fullname", "id>$course->shortname -> id>Journals -> $journal->name", ""); if ($USER->editing) { print_update_module_icon($cm->id); } if (isteacher($course->id)) { echo "
"; } echo "Blank entry
"; } else { echo text_to_html($entry->text); } } else { echo "You have not started this journal yet."; } print_simple_box_end(); if ($timenow < $timefinish) { if ($entry->modified) { echo "Last edited: "; echo journaldate($entry->modified)."
"; } if ($journal->days) { echo "Editing period ends: "; echo journaldate($timefinish)."
"; } } else { echo "Editing period has ended: "; echo journaldate($timefinish)."
"; } if ($entry->comment || $entry->rating) { print_heading("Feedback"); print_feedback($course, $entry); } } else { echo "This journal won't be open until: "; echo journaldate($timestart)."
"; } 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 "\nbody\" WIDTH=35 VALIGN=TOP>"; print_user_picture($teacher->id, $course->id, $teacher->picture); echo " | "; echo "cellheading\">$teacher->firstname $teacher->lastname"; echo " ".journaldate($entry->timemarked).""; echo " |
cellcontent\">";
echo " Overall: "; if ($RATING[$entry->rating]) { echo $RATING[$entry->rating]; } else { echo "Error"; } echo " "; echo text_to_html($entry->comment); echo " |