MCPcopy Create free account
hub / github.com/codecombat/codecombat / sortCourses

Function sortCourses

app/core/utils.js:1100–1105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1098})
1099
1100const sortCourses = courses => _.sortBy(courses, function (course) {
1101 // ._id can be from classroom.courses, otherwise it's probably .id
1102 let index = orderedCourseIDs.indexOf(course.id != null ? course.id : course._id)
1103 if (index === -1) { index = 9001 }
1104 return index
1105})
1106
1107const sortOtherCourses = courses => _.sortBy(courses, function (course) {
1108 let index = otherOrderedCourseIDs.indexOf(course.id != null ? course.id : course._id)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected