| 1091 | } |
| 1092 | |
| 1093 | const sortAllCourses = courses => _.sortBy(courses, function (course) { |
| 1094 | // ._id can be from classroom.courses, otherwise it's probably .id |
| 1095 | let index = allOrderedCourseIDs.indexOf(course.id != null ? course.id : course._id) |
| 1096 | if (index === -1) { index = 9001 } |
| 1097 | return index |
| 1098 | }) |
| 1099 | |
| 1100 | const sortCourses = courses => _.sortBy(courses, function (course) { |
| 1101 | // ._id can be from classroom.courses, otherwise it's probably .id |