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

Method getLevelsByModules

app/models/Classroom.js:173–187  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

171 }
172
173 getLevelsByModules () {
174 const courseModuleLevelsMap = {}
175 for (const course of Array.from(this.get('courses'))) {
176 const courseLevels = this.getLevels({ courseID: course._id }).models
177 const capstoneLevel = courseLevels.find(l => l.isCapstone())
178 const isCh1 = course._id === utils.courseIDs.CHAPTER_ONE
179 courseModuleLevelsMap[course._id] = {
180 modules: levelUtils.buildLevelsListByModule(courseLevels, isCh1)
181 }
182 if (capstoneLevel) {
183 courseModuleLevelsMap[course._id].capstone = capstoneLevel
184 }
185 }
186 return courseModuleLevelsMap
187 }
188
189 fetchIntroContentDataForLevels (courseModuleLevelsMap) {
190 let levels

Callers

nothing calls this directly

Calls 3

getLevelsMethod · 0.95
isCapstoneMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected