From b69eb13de44a1e3f1a3dd34a16fa5e60e074ae9e Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Tue, 23 Oct 2018 13:22:21 +1300 Subject: [PATCH] Fix #346 correct redirect after saving attendance. regression caused by mobile app restructuring. --- renderer.php | 3 ++- take.php | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/renderer.php b/renderer.php index 166d2cc..6159f88 100644 --- a/renderer.php +++ b/renderer.php @@ -415,7 +415,8 @@ class mod_attendance_renderer extends plugin_renderer_base { $table .= $this->render_attendance_take_grid($takedata); } $table .= html_writer::input_hidden_params($takedata->url(array('sesskey' => sesskey(), - 'page' => $takedata->pageparams->page))); + 'page' => $takedata->pageparams->page, + 'perpage' => $takedata->pageparams->perpage))); $table .= html_writer::end_div(); $params = array( 'type' => 'submit', diff --git a/take.php b/take.php index 2fcb686..238613e 100644 --- a/take.php +++ b/take.php @@ -77,6 +77,9 @@ if (($formdata = data_submitted()) && confirm_sesskey()) { if (!empty($att->pageparams->page) && $att->pageparams->page && $totalusers && $usersperpage) { $numberofpages = ceil($totalusers / $usersperpage); if ($att->pageparams->page < $numberofpages) { + $params = array( + 'sessionid' => $att->pageparams->sessionid, + 'grouptype' => $att->pageparams->grouptype); $params['page'] = $att->pageparams->page + 1; redirect($att->url_take($params), get_string('moreattendance', 'attendance')); }