Browse Source

bug fix for issue on community branch - no per page param for students

MOODLE_26_STABLE
Joseph Baxter 11 years ago
parent
commit
c221a04459
  1. 9
      renderer.php

9
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); $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) { if (empty($fcontrols->pageparams->page) || !$fcontrols->pageparams->page || !$totalusers || !$usersperpage) {
return $paging_controls; return $paging_controls;
} }

Loading…
Cancel
Save