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($course->id, "journal", "view", "view.php?id=$cm->id", "$journal->id"); if (! $cw = get_record("course_sections", "id", $cm->section)) { error("Course module is incorrect"); } if ($course->category) { $navigation = "id\">$course->shortname ->"; } $strjournal = get_string("modulename", "journal"); $strjournals = get_string("modulenameplural", "journal"); print_header("$course->shortname: $journal->name", "$course->fullname", "$navigation id>$strjournals -> $journal->name", "", "", true, update_module_button($cm->id, $course->id, $strjournal), navmenu($course, $cm)); if (isteacher($course->id)) { if ($allentries = get_records("journal_entries", "journal", $journal->id)) { $entrycount = count($allentries); } else { $entrycount = 0; } echo "
id\">".get_string("viewallentries","journal", $entrycount)."
"; } else if (!$cm->visible) { notice(get_string("activityiscurrentlyhidden")); } echo "".get_string("blankentry","journal")."
"; } else { echo format_text($entry->text, $entry->format); } } else { echo "".get_string("notstarted","journal").""; } print_simple_box_end(); if ($timenow < $timefinish) { if ($entry->modified) { echo "".get_string("lastedited").": "; echo userdate($entry->modified); echo " (".get_string("numwords", "", count_words($entry->text)).")"; echo "
"; } if ($journal->days) { echo "".get_string("editingends", "journal").": "; echo userdate($timefinish)."
"; } } else { echo "".get_string("editingended", "journal").": "; echo userdate($timefinish)."
"; } if ($entry->comment or $entry->rating) { $grades = make_grades_menu($journal->assessed); print_heading(get_string("feedback")); journal_print_feedback($course, $entry, $grades); } } else { echo "".get_string("notopenuntil", "journal").": "; echo userdate($timestart)."
"; } print_footer($course); ?>