MDL-47945 mod_forum: neighbour links at bottom of discussion
authorJetha Chan <jetha@moodle.com>
Wed, 29 Oct 2014 05:46:46 +0000 (13:46 +0800)
committerJetha Chan <jetha@moodle.com>
Wed, 29 Oct 2014 05:46:46 +0000 (13:46 +0800)
mod/forum/discuss.php

index 49e4c53..30bed3c 100644 (file)
 
     // Output the links to neighbour discussions.
     $neighbours = forum_get_discussion_neighbours($cm, $discussion);
-    echo $renderer->neighbouring_discussion_navigation($neighbours['prev'], $neighbours['next']);
+    $neighbourlinks = $renderer->neighbouring_discussion_navigation($neighbours['prev'], $neighbours['next']);
+    echo $neighbourlinks;
 
 /// Print the controls across the top
     echo '<div class="discussioncontrols clearfix">';
     $canrate = has_capability('mod/forum:rate', $modcontext);
     forum_print_discussion($course, $cm, $forum, $discussion, $post, $displaymode, $canreply, $canrate);
 
+    echo $neighbourlinks;
+
     // Add the subscription toggle JS.
     $PAGE->requires->yui_module('moodle-mod_forum-subscriptiontoggle', 'Y.M.mod_forum.subscriptiontoggle.init');