From 7229f239f38014a1c2a85120480766acce266975 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Wed, 19 Oct 2011 16:50:23 +1300 Subject: [PATCH] MDL-28945 course_reports: Fixed up pagination issue --- course/report/completion/index.php | 10 +++++++--- course/report/progress/index.php | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/course/report/completion/index.php b/course/report/completion/index.php index 0118cf1b16c93..af07f65774c19 100644 --- a/course/report/completion/index.php +++ b/course/report/completion/index.php @@ -274,9 +274,13 @@ function csv_quote($value) { $pagingbar .= get_string('page').': '; $sistrings = array(); - $sistrings[] = $sifirst != 'all' ? "sifirst={$sifirst}" : null; - $sistrings[] = $silast != 'all' ? "silast={$silast}" : null; - $sistring = !empty($sistrings) ? implode('&', $sistrings) : ''; + if ($sifirst != 'all') { + $sistrings[] = "sifirst={$sifirst}"; + } + if ($silast != 'all') { + $sistrings[] = "silast={$silast}"; + } + $sistring = !empty($sistrings) ? '&'.implode('&', $sistrings) : ''; // Display previous link if ($start > 0) { diff --git a/course/report/progress/index.php b/course/report/progress/index.php index a45a6439c7123..323d2b89025bd 100644 --- a/course/report/progress/index.php +++ b/course/report/progress/index.php @@ -206,9 +206,13 @@ function csv_quote($value) { $pagingbar .= get_string('page').': '; $sistrings = array(); - $sistrings[] = $sifirst != 'all' ? "sifirst={$sifirst}" : null; - $sistrings[] = $silast != 'all' ? "silast={$silast}" : null; - $sistring = !empty($sistrings) ? implode('&', $sistrings) : ''; + if ($sifirst != 'all') { + $sistrings[] = "sifirst={$sifirst}"; + } + if ($silast != 'all') { + $sistrings[] = "silast={$silast}"; + } + $sistring = !empty($sistrings) ? '&'.implode('&', $sistrings) : ''; // Display previous link if ($start > 0) {