From: martin Date: Sun, 22 Sep 2002 03:16:40 +0000 (+0000) Subject: SHow number of journal entries in the teacher link to report X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=03af47eee32af2bbc0c1dd2845bb3d7a00348147;p=moodle.git SHow number of journal entries in the teacher link to report --- diff --git a/lang/en/journal.php b/lang/en/journal.php index 9275c64398..777e64eab1 100644 --- a/lang/en/journal.php +++ b/lang/en/journal.php @@ -24,6 +24,6 @@ $string['noratinggiven'] = "No rating given"; $string['overallrating'] = "Overall rating"; $string['rate'] = "Rate"; $string['startoredit'] = "Start or edit my journal entry"; -$string['viewallentries'] = "View all journal entries"; +$string['viewallentries'] = "View \$a journal entries"; ?> diff --git a/mod/journal/view.php b/mod/journal/view.php index e28201208f..2334081cc4 100644 --- a/mod/journal/view.php +++ b/mod/journal/view.php @@ -37,8 +37,17 @@ update_module_icon($cm->id, $course->id)); if (isteacher($course->id)) { - echo "

id\">".get_string("viewallentries","journal")."

"; } + 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)."

"; + } + + print_simple_box( text_to_html($choice->text) , "center"); echo "
\n";