From 3e5a8acc8533d0280f4c22aa8c1c1c289c1ff5df Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Thu, 16 Apr 2020 14:32:56 +0800 Subject: [PATCH] MDL-68427 core: Correct previous/next page in paging bar --- lib/outputcomponents.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index fa9a76f5ed5..746a2a7bcab 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -3092,7 +3092,7 @@ class paging_bar implements renderable, templatable { if ($this->page > 0) { $data->previous = [ - 'page' => $this->page - 1, + 'page' => $this->page, 'url' => (new moodle_url($this->baseurl, [$this->pagevar => $this->page - 1]))->out(false) ]; } @@ -3138,7 +3138,7 @@ class paging_bar implements renderable, templatable { if ($this->page + 1 != $lastpage) { $data->next = [ - 'page' => $this->page + 1, + 'page' => $this->page + 2, 'url' => (new moodle_url($this->baseurl, [$this->pagevar => $this->page + 1]))->out(false) ]; }