diff --git a/mod/forum/classes/local/renderers/discussion_list.php b/mod/forum/classes/local/renderers/discussion_list.php index dcec49415ccb..e57ee7e915dd 100644 --- a/mod/forum/classes/local/renderers/discussion_list.php +++ b/mod/forum/classes/local/renderers/discussion_list.php @@ -230,7 +230,7 @@ public function render( $exportedposts = ($this->postprocessfortemplate) ($discussions, $user, $forum); } - $baseurl = new \moodle_url($PAGE->url, array('o' => $sortorder)); + $baseurl = new \moodle_url($PAGE->url, ['o' => $sortorder, 's' => $pagesize]); $forumview = array_merge( $forumview, diff --git a/mod/forum/view.php b/mod/forum/view.php index b0af745d1e7c..8504bb2b08d0 100644 --- a/mod/forum/view.php +++ b/mod/forum/view.php @@ -41,7 +41,7 @@ $pageno = optional_param('page', 0, PARAM_INT); $search = optional_param('search', '', PARAM_CLEAN); $pageno = optional_param('p', $pageno, PARAM_INT); -$pagesize = optional_param('s', 0, PARAM_INT); +$pagesize = optional_param('s', $CFG->forum_manydiscussions ?? 0, PARAM_INT); $sortorder = optional_param('o', null, PARAM_INT); if (!$cmid && !$forumid) {