From 5bb55eeb2143dce35f6e18ce59e3a9cd5b97e26d Mon Sep 17 00:00:00 2001 From: Brian Barnes Date: Thu, 31 Jul 2014 11:37:08 +1200 Subject: [PATCH] MDL-46625 theme: Added a way to target the current page --- lib/outputcomponents.php | 2 +- lib/tests/outputcomponents_test.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index 76b0c834387..043cb61e58f 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -2354,7 +2354,7 @@ class paging_bar implements renderable { $displaypage = $currpage + 1; if ($this->page == $currpage) { - $this->pagelinks[] = $displaypage; + $this->pagelinks[] = html_writer::span($displaypage, 'current-page'); } else { $pagelink = html_writer::link(new moodle_url($this->baseurl, array($this->pagevar=>$currpage)), $displaypage); $this->pagelinks[] = $pagelink; diff --git a/lib/tests/outputcomponents_test.php b/lib/tests/outputcomponents_test.php index c6ab93a49ee..aa0e52b832c 100644 --- a/lib/tests/outputcomponents_test.php +++ b/lib/tests/outputcomponents_test.php @@ -389,7 +389,7 @@ EOF; } public function test_prepare() { - $expecteda = array('1', + $expecteda = array('1', '2', '3', '4', @@ -400,7 +400,7 @@ EOF; ); $expectedb = array('4', '5', - '6', + '6', '7', '8', );