From c221a04459bb2820235b2e9946efede1453a1fd2 Mon Sep 17 00:00:00 2001 From: Joseph Baxter Date: Thu, 5 Jun 2014 17:16:04 +0100 Subject: [PATCH] bug fix for issue on community branch - no per page param for students --- renderer.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/renderer.php b/renderer.php index b506c2b..a14a9ce 100644 --- a/renderer.php +++ b/renderer.php @@ -104,7 +104,14 @@ class mod_attendance_renderer extends plugin_renderer_base { } $totalusers = count_enrolled_users(context_module::instance($fcontrols->cm->id), 'mod/attendance:canbelisted', $group); - $usersperpage = $fcontrols->pageparams->perpage; + + // No per page param on student view. + if (!empty($fcontrols->pageparams->perpage)) { + $usersperpage = $fcontrols->pageparams->perpage; + } else { + $usersperpage = 0; + } + if (empty($fcontrols->pageparams->page) || !$fcontrols->pageparams->page || !$totalusers || !$usersperpage) { return $paging_controls; }