Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix the display when USER display mode is flat, and a parent is selec…

…ted.

In this case, the display is temporarily changed to nested
  • Loading branch information...
commit e92ea3d85fce7f6d34545a2ccf72653c573c0277 1 parent 5a83a0a
martin authored
Showing with 7 additions and 5 deletions.
  1. +7 −5 mod/forum/discuss.php
View
12 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);
Please sign in to comment.
Something went wrong with that request. Please try again.