course)) { error("Course is misconfigured"); } require_login($course->id, true, $cm); 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, $cm->id); if (! $cw = get_record("course_sections", "id", $cm->section)) { error("Course module is incorrect"); } $strjournal = get_string("modulename", "journal"); $strjournals = get_string("modulenameplural", "journal"); print_header_simple(format_string($journal->name), '', "id\">$strjournals -> ".format_string($journal->name), '', '', true, update_module_button($cm->id, $course->id, $strjournal), navmenu($course, $cm)); if (isteacher($course->id)) { $currentgroup = get_current_group($course->id); if ($currentgroup and isteacheredit($course->id)) { $group = get_record("groups", "id", $currentgroup); $groupname = " ($group->name)"; } else { $groupname = ""; } $entrycount = journal_count_entries($journal, $currentgroup); echo '
"; } else if (!$cm->visible) { notice(get_string('activityiscurrentlyhidden')); } $journal->intro = trim($journal->intro); if (!empty($journal->intro)) { print_simple_box( format_text($journal->intro, $journal->introformat), 'center', '70%', '', 5, 'generalbox', 'intro'); } 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 '