Skip to content
Snippets Groups Projects
Commit b7f6cab3 authored by srosse's avatar srosse
Browse files

OO-5602: first order siblings curriculum elements by position

parent 7664fe78
No related branches found
No related tags found
No related merge requests found
...@@ -95,8 +95,16 @@ public class CurriculumElementViewsRowComparator extends FlexiTreeNodeComparator ...@@ -95,8 +95,16 @@ public class CurriculumElementViewsRowComparator extends FlexiTreeNodeComparator
} }
private int compareCurriculumElements(CurriculumElementWithViewsRow c1, CurriculumElementWithViewsRow c2) { private int compareCurriculumElements(CurriculumElementWithViewsRow c1, CurriculumElementWithViewsRow c2) {
int c = compareClosed(c1, c2); int c = 0;
if (c1.getCurriculumElementPos() != null && c2.getCurriculumElementPos() != null) {
c = Long.compare(c1.getCurriculumElementPos().longValue(), c2.getCurriculumElementPos().longValue());
}
if(c == 0) {
c = compareClosed(c1, c2);
}
if(c == 0) { if(c == 0) {
if(c1.getCurriculumElementBeginDate() == null || c2.getCurriculumElementBeginDate() == null) { if(c1.getCurriculumElementBeginDate() == null || c2.getCurriculumElementBeginDate() == null) {
c = compareNullObjects(c1.getCurriculumElementBeginDate(), c2.getCurriculumElementBeginDate()); c = compareNullObjects(c1.getCurriculumElementBeginDate(), c2.getCurriculumElementBeginDate());
......
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