]> git.mjollnir.org Git - moodle.git/commitdiff
Merged fix for MDL-10154 from 1.8
authormoodler <moodler>
Mon, 18 Jun 2007 06:34:54 +0000 (06:34 +0000)
committermoodler <moodler>
Mon, 18 Jun 2007 06:34:54 +0000 (06:34 +0000)
mod/journal/view.php

index 5a2dd4714c6721c79b08696a3728438fb25a0761..5918933aa7ece27e490733ab9ffd15e4a0e9d505 100644 (file)
     print_header_simple(format_string($journal->name), '', $navigation, '', '', true,
                   update_module_button($cm->id, $course->id, $strjournal), navmenu($course, $cm));
 
+/// Check to see if groups are being used here
+    $groupmode = groupmode($course, $cm);
+    $currentgroup = setup_and_print_groups($course, $groupmode, "view.php?id=$cm->id");
+
     if (isteacher($course->id)) {
-        $currentgroup = get_current_group($course->id);
-        if ($currentgroup and isteacheredit($course->id)) {
-            $group = groups_get_group($currentgroup); //TODO:
-            $groupname = " ($group->name)";
-        } else {
-            $groupname = "";
-        }
         $entrycount = journal_count_entries($journal, $currentgroup);
 
         echo '<div class="reportlink"><a href="report.php?id='.$cm->id.'">'.
-              get_string('viewallentries','journal', $entrycount)."</a>$groupname</div>";
+              get_string('viewallentries','journal', $entrycount).'</a></div>';
 
-    } else if (!$cm->visible) {
-        notice(get_string('activityiscurrentlyhidden'));
     }
 
     $journal->intro = trim($journal->intro);
 
     if (!empty($journal->intro)) {
-        print_box( format_text($journal->intro,  $journal->introformat), 5, 'generalbox', 'intro');
+        print_box( format_text($journal->intro,  $journal->introformat), 'generalbox', 'intro');
     }
 
     echo '<br />';