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

Method nextLevelUrl

app/views/courses/CoursesView.js:709–720  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

707 }
708
709 nextLevelUrl () {
710 if (!this.nextLevelInfo) { return null }
711 if (!this.nextLevelInfo.level) { return '/play/intro' }
712 const urlFn = (() => {
713 switch (false) {
714 case !this.nextLevelInfo.level.isLadder(): return this.urls.courseArenaLadder
715 case !me.showHeroAndInventoryModalsToStudents(): return this.urls.courseWorldMap
716 default: return this.urls.courseLevel
717 }
718 })()
719 return urlFn({ level: this.originalLevelMap[this.nextLevelInfo.level.get('original')] || this.nextLevelInfo.level, courseInstance: this.nextLevelInfo.courseInstance, course: this.nextLevelInfo.course })
720 }
721
722 onClickPlayNextLevel (e) {
723 if (this.nextLevelInfo != null ? this.nextLevelInfo.locked : undefined) {

Callers 1

onClickPlayNextLevelMethod · 0.95

Calls 3

isLadderMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected