From 922149e7401556573f8208a373abb899866fe1c5 Mon Sep 17 00:00:00 2001 From: anhefti Date: Thu, 15 Jun 2023 10:41:20 +0200 Subject: [PATCH] SEBSERV-449 fixed name query --- .../lms/impl/moodle/plugin/MoodlePluginCourseAccess.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccess.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccess.java index dd59758a..d8568f3b 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccess.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccess.java @@ -436,9 +436,7 @@ public class MoodlePluginCourseAccess extends AbstractCachedCourseAccess impleme final String fromElement = String.valueOf(page * size); final LinkedMultiValueMap attributes = new LinkedMultiValueMap<>(); - // TODO clarify with Amr and Luca if this is OK - // and if it is possible to apply the nameCondition also the the course name (shortname) - if (StringUtils.isNotBlank(nameCondition)) { + if (this.applyNameCriteria && StringUtils.isNotBlank(nameCondition)) { sqlCondition = sqlCondition + " AND (name LIKE '" + Utils.toSQLWildcard(nameCondition) + "' OR shortname LIKE '" +