From: martin Date: Mon, 2 Sep 2002 05:03:54 +0000 (+0000) Subject: Fix the display when USER display mode is flat, and a parent is selected. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e92ea3d85fce7f6d34545a2ccf72653c573c0277;p=moodle.git Fix the display when USER display mode is flat, and a parent is selected. In this case, the display is temporarily changed to nested --- diff --git a/mod/forum/discuss.php b/mod/forum/discuss.php index 520d13a9fa..2aa2a876ab 100644 --- a/mod/forum/discuss.php +++ b/mod/forum/discuss.php @@ -33,11 +33,13 @@ forum_set_display_mode($mode); - if (abs($USER->mode) == 1) { // If flat display then display the lot. - $parent = 0; - } + $displaymode = $USER->mode; - if (!$parent) { + if ($parent) { + if (abs($USER->mode) == 1) { // If flat AND parent, then force nested display this time + $displaymode = 3; + } + } else { $parent = $discussion->firstpost; $navtail = "$discussion->name"; } @@ -67,7 +69,7 @@ "$navmiddle -> $navtail", "", "", true, $updatebutton); } - forum_print_discussion($course, $forum, $discussion, $post, $USER->mode); + forum_print_discussion($course, $forum, $discussion, $post, $displaymode); print_footer($course);