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 '" +