SEBSERV-449 fixed name query

This commit is contained in:
anhefti 2023-06-15 10:41:20 +02:00
parent 90d403c2b3
commit 922149e740

View file

@ -436,9 +436,7 @@ public class MoodlePluginCourseAccess extends AbstractCachedCourseAccess impleme
final String fromElement = String.valueOf(page * size);
final LinkedMultiValueMap<String, String> 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 '" +