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

Method getLadderLevel

app/models/Classroom.js:206–213  ·  view source on GitHub ↗
(courseID)

Source from the content-addressed store, hash-verified

204 }
205
206 getLadderLevel (courseID) {
207 const Levels = require('collections/Levels')
208 const courses = this.get('courses')
209 const course = _.findWhere(courses, { _id: courseID })
210 if (!course) { return }
211 const levels = new Levels(course.levels)
212 return levels.find(l => l.isLadder())
213 }
214
215 getProjectLevel (courseID) {
216 const Levels = require('collections/Levels')

Callers 2

statsForSessionsMethod · 0.95
updateLevelDataMapMethod · 0.80

Calls 2

isLadderMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected