mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Ensure students play course levels in order
This commit is contained in:
parent
bfacbf8add
commit
3292f13bc3
1 changed files with 6 additions and 1 deletions
|
@ -287,13 +287,18 @@ mixin levels-tab
|
|||
th(data-i18n="courses.concepts")
|
||||
tbody
|
||||
if campaign
|
||||
- var lastLevelCompleted = true;
|
||||
each level, levelID in campaign.get('levels')
|
||||
tr
|
||||
td
|
||||
button.btn.btn-success.btn-play-level(data-level-slug=level.slug, data-i18n="home.play")
|
||||
if lastLevelCompleted || adminMode
|
||||
button.btn.btn-success.btn-play-level(data-level-slug=level.slug, data-i18n="home.play")
|
||||
td
|
||||
if userLevelStateMap[me.id]
|
||||
div= userLevelStateMap[me.id][levelID]
|
||||
- lastLevelCompleted = userLevelStateMap[me.id][levelID] === 'complete'
|
||||
else
|
||||
- lastLevelCompleted = false
|
||||
td= level.name.replace('Course: ', '')
|
||||
td
|
||||
if levelConceptMap[levelID]
|
||||
|
|
Loading…
Reference in a new issue