Permalink
Browse files

MDL-28945 course_reports: Fixed up pagination issue

  • Loading branch information...
1 parent 0b6713f commit 63cdff242910514c85908b2429c142c8fa04fed4 Sam Hemelryk committed Oct 19, 2011
Showing with 14 additions and 6 deletions.
  1. +7 −3 course/report/completion/index.php
  2. +7 −3 course/report/progress/index.php
View
10 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) {
View
10 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) {

0 comments on commit 63cdff2

Please sign in to comment.