From 669f5661e63fe573084d4b0bd3e3b2cc1b73cfef Mon Sep 17 00:00:00 2001
From: Tobias Baden <tobias.baden@stud.hs-hannover.de>
Date: Tue, 14 Aug 2018 10:50:21 +0200
Subject: [PATCH] Changed "LIKE" to "ILIKE" to get Case-Insensitive querys,
 updated Version number

---
 block_hshcourselist.php | 7 ++++++-
 version.php             | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/block_hshcourselist.php b/block_hshcourselist.php
index 8c3e19d..4220c53 100644
--- a/block_hshcourselist.php
+++ b/block_hshcourselist.php
@@ -114,6 +114,11 @@ class block_hshcourselist extends block_base {
         $jsdata = array(
             'instanceid' => $this->instance->id,
             'sesskey' => sesskey(),
+            /*
+                Notice: Trying to get property of non-object in C:\Dev\xampp\htdocs\moodle\blocks\hshcourselist\block_hshcourselist.php on line 117 (122)
+
+                Notice: Trying to get property of non-object in C:\Dev\xampp\htdocs\moodle\blocks\hshcourselist\block_hshcourselist.php on line 118 (123)
+            */
             'displaymode' => $this->config->displaymode,
             'orderbysemester' => $this->config->orderbysemester,
             'contextid' => $this->page->context->id
@@ -155,7 +160,7 @@ class block_hshcourselist extends block_base {
 //                $where .= 'idnumber LIKE ?'; --- Bei Postgres nur "id"
             } else {
                 $params = array_merge($params, array("%$search%", "%$search%"));
-                $where .= 'shortname LIKE ? OR fullname LIKE ?';
+                $where .= 'shortname ILIKE ? OR fullname ILIKE ?';
             }
         }
         $where .= ')';
diff --git a/version.php b/version.php
index 58cabfc..e15363a 100644
--- a/version.php
+++ b/version.php
@@ -1,4 +1,4 @@
 <?php
 $plugin->component = 'block_hshcourselist';
-$plugin->version = 2018041400;  // YYYYMMDDHH
+$plugin->version = 2018081001;  // YYYYMMDDHH
 $plugin->requires = 2016112900; // YYYYMMDDHH
-- 
GitLab