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

Function levelsOfExam

app/lib/user-utils.js:210–223  ·  view source on GitHub ↗
(exam)

Source from the content-addressed store, hash-verified

208}
209
210function levelsOfExam (exam) {
211 if (!exam) { return [] }
212 const levels = []
213 exam.problems.forEach((course) => {
214 const courseId = course.courseId
215 course.levels.forEach(level => {
216 levels.push({
217 ...level,
218 courseId,
219 })
220 })
221 })
222 return levels
223}
224
225function levelNumberInExam (slug) {
226 const exam = getStorageExam()

Callers 1

levelNumberInExamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected