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

Method onClickPlayNextLevel

app/views/courses/CoursesView.js:722–731  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

720 }
721
722 onClickPlayNextLevel (e) {
723 if (this.nextLevelInfo != null ? this.nextLevelInfo.locked : undefined) {
724 return noty({ text: $.i18n.t('courses.ask_teacher_to_unlock_instructions'), timeout: 5000, type: 'warning', layout: 'topCenter', killer: true })
725 }
726 const url = this.nextLevelUrl()
727 if (window.tracker != null) {
728 window.tracker.trackEvent('Students Play Next Level', { category: 'Students', levelSlug: (this.nextLevelInfo.level != null ? this.nextLevelInfo.level.get('slug') : undefined) })
729 }
730 return application.router.navigate(url, { trigger: true })
731 }
732
733 onClickPlay (e) {
734 const levelSlug = $(e.currentTarget).data('level-slug')

Callers

nothing calls this directly

Calls 4

nextLevelUrlMethod · 0.95
navigateMethod · 0.80
trackEventMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected