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

Method getDisplayContentType

app/models/Level.js:645–657  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

643 isChallenge () { return this.get('ozariaType') === 'challenge' }
644
645 getDisplayContentType () {
646 if (this.isCapstone()) { return 'capstone' }
647 if (this.isChallenge()) { return 'challenge' }
648 if (this.get('type') === 'intro') {
649 const introContent = this.get('introContent') || []
650 if ((introContent.length === 1) && (introContent[0].type === 'cutscene-video')) {
651 return 'cutscene'
652 } else {
653 return 'intro'
654 }
655 }
656 return 'practice'
657 }
658
659 checkRemoteChanges () {
660 return fetch(this.url()).then(response => {

Callers 1

Calls 3

isCapstoneMethod · 0.95
isChallengeMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected