Skip to content
Snippets Groups Projects
Commit c2316e2f authored by aboeckle's avatar aboeckle
Browse files

OO-5054: Catalog sorting fix

parent c0a424dd
No related branches found
No related tags found
No related merge requests found
...@@ -641,8 +641,22 @@ public class RepositoryEntryMyCourseQueries { ...@@ -641,8 +641,22 @@ public class RepositoryEntryMyCourseQueries {
break; break;
case custom: case custom:
if (params.getParentEntry() != null) { if (params.getParentEntry() != null) {
sb.append(" order by cei.position "); Integer entryAddPosition = params.getParentEntry().getEntryAddPosition();
appendAsc(sb, asc); if (entryAddPosition == null) {
entryAddPosition = repositoryModule.getCatalogAddEntryPosition();
}
switch(entryAddPosition) {
case 0:
sb.append(" order by lower(cei.name) ");
appendAsc(sb, asc);
break;
case 1:
case 2:
sb.append(" order by cei.position ");
appendAsc(sb, asc);
break;
}
} }
break; break;
default: default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment