From ee483e052014d9287aad4a568aedcea49da1ebd1 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 a99d460b5af..024d1091bd2 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -2335,7 +2335,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 ce254c0fda3..66cc78880c4 100644 --- a/lib/tests/outputcomponents_test.php +++ b/lib/tests/outputcomponents_test.php @@ -388,7 +388,7 @@ EOF; } public function test_prepare() { - $expecteda = array('1', + $expecteda = array('1', '2', '3', '4', @@ -399,7 +399,7 @@ EOF; ); $expectedb = array('4', '5', - '6', + '6', '7', '8', );