From a7ce32810893da3cdd581aff4db6ce082c06ea6a Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Thu, 4 Sep 2014 11:39:23 +1200 Subject: [PATCH] CONTRIB-5287 fix paging so that the currdate doesn't change. --- renderer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/renderer.php b/renderer.php index 9f43f0d..13191ef 100644 --- a/renderer.php +++ b/renderer.php @@ -112,12 +112,12 @@ class mod_attendance_renderer extends plugin_renderer_base { $numberofpages = ceil($totalusers / $fcontrols->pageparams->perpage); if ($fcontrols->pageparams->page > 1) { - $paging_controls .= html_writer::link($fcontrols->url(array('curdate' => $fcontrols->nextcur, 'page' => $fcontrols->pageparams->page - 1)), + $paging_controls .= html_writer::link($fcontrols->url(array('curdate' => $fcontrols->curdate, 'page' => $fcontrols->pageparams->page - 1)), $this->output->larrow()); } $paging_controls .= html_writer::tag('span', "Page {$fcontrols->pageparams->page} of $numberofpages", array('class' => 'attbtn')); if ($fcontrols->pageparams->page < $numberofpages) { - $paging_controls .= html_writer::link($fcontrols->url(array('curdate' => $fcontrols->nextcur, 'page' => $fcontrols->pageparams->page + 1)), + $paging_controls .= html_writer::link($fcontrols->url(array('curdate' => $fcontrols->curdate, 'page' => $fcontrols->pageparams->page + 1)), $this->output->rarrow()); }