From 69e623396e4956d297a2331e2748615d01de75df Mon Sep 17 00:00:00 2001 From: Sesostris Vieira Date: Tue, 10 Jun 2014 15:33:41 -0300 Subject: [PATCH] =?UTF-8?q?Adicionar=20filtros=20nos=20links=20de=20pagina?= =?UTF-8?q?=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/index.php b/index.php index 30920d0..f966184 100644 --- a/index.php +++ b/index.php @@ -238,6 +238,23 @@ $link = $CFG->wwwroot.'/report/ilbenrol/?course='.$course->id; if (strlen($sort)) { $link .= '&sort='.$sort; } + +// Add filterform fields + +if ($formdata) { + $formvar = ''; + foreach ($formdata as $key=>$value) { + if (is_array($value)) { + foreach ($value as $k=>$v) { + $formvar .= "&{$key}[{$k}]={$v}"; + } + } else { + $formvar .= "&{$key}={$value}"; + } + } + $link .= $formvar; +} + $link .= '&start='; // Build the the page by Initial bar