mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Fix level session stats in CourseDetailsView
This commit is contained in:
parent
bc454191ec
commit
890d528d80
1 changed files with 10 additions and 10 deletions
|
@ -208,10 +208,10 @@ mixin progress-members-levels-expanded(memberID)
|
|||
if userLevelStateMap[memberID][levelID] === 'complete'
|
||||
span.progress-level-cell.progress-level-cell-complete(data-level-id=levelID, data-level-slug=level.slug, data-user-id=memberID) #{i + 1}
|
||||
span.spl= level.name.replace('Course: ', '')
|
||||
+progress-members-popup-completed(i, level)
|
||||
+progress-members-popup-completed(i, level, (view.userLevelSessionMap[memberID] || {})[levelID])
|
||||
else if userLevelStateMap[memberID][levelID] === 'started'
|
||||
span.progress-level-cell.progress-level-cell-started(data-level-id=levelID, data-level-slug=level.slug, data-user-id=memberID) #{i + 1} #{level.name.replace('Course: ', '')}
|
||||
+progress-members-popup-started(i, level)
|
||||
+progress-members-popup-started(i, level, (view.userLevelSessionMap[memberID] || {})[levelID])
|
||||
else
|
||||
span.progress-level-cell #{i + 1} #{level.name.replace('Course: ', '')}
|
||||
- i++
|
||||
|
@ -226,35 +226,35 @@ mixin progress-members-levels-condensed(memberID)
|
|||
each level, levelID in campaign.get('levels')
|
||||
if userLevelStateMap[memberID][levelID] === 'complete'
|
||||
span.progress-level-cell.progress-level-cell-complete(style="width:#{levelCellWidth}%;", data-level-id=levelID, data-level-slug=level.slug, data-user-id=memberID) #{i + 1}
|
||||
+progress-members-popup-completed(i, level)
|
||||
+progress-members-popup-completed(i, level, (view.userLevelSessionMap[memberID] || {})[levelID])
|
||||
else if userLevelStateMap[memberID][levelID] === 'started'
|
||||
span.progress-level-cell.progress-level-cell-started(style="width:#{levelCellWidth}%;", data-level-id=levelID, data-level-slug=level.slug, data-user-id=memberID) #{i + 1}
|
||||
+progress-members-popup-started(i, level)
|
||||
+progress-members-popup-started(i, level, (view.userLevelSessionMap[memberID] || {})[levelID])
|
||||
else
|
||||
break
|
||||
- i++
|
||||
|
||||
mixin progress-members-popup-completed(i, level)
|
||||
mixin progress-members-popup-completed(i, level, session)
|
||||
.progress-popup-container
|
||||
h3 #{i + 1}. #{level.name.replace('Course: ', '')}
|
||||
p
|
||||
span.spr(data-i18n="courses.play_time")
|
||||
span #{moment.duration(level.playtime, "seconds").humanize()}
|
||||
span #{moment.duration(session.get('playtime'), "seconds").humanize()}
|
||||
p
|
||||
span.spr(data-i18n="courses.completed")
|
||||
span #{moment(level.changed).format('MMMM Do YYYY, h:mm:ss a')}
|
||||
span #{moment(session.get('changed')).format('MMMM Do YYYY, h:mm:ss a')}
|
||||
if adminMode
|
||||
strong(data-i18n="clans.view_solution")
|
||||
|
||||
mixin progress-members-popup-started(i, level)
|
||||
mixin progress-members-popup-started(i, level, session)
|
||||
.progress-popup-container
|
||||
h3 #{i + 1}. #{level.name.replace('Course: ', '')}
|
||||
p
|
||||
span.spr(data-i18n="courses.play_time")
|
||||
span #{moment.duration(level.playtime, "seconds").humanize()}
|
||||
span #{moment.duration(session.get('playtime'), "seconds").humanize()}
|
||||
p
|
||||
span.spr(data-i18n="clans.last_played")
|
||||
span #{moment(level.changed).format('MMMM Do YYYY, h:mm:ss a')}
|
||||
span #{moment(session.get('changed')).format('MMMM Do YYYY, h:mm:ss a')}
|
||||
if adminMode
|
||||
strong(data-i18n="clans.view_solution")
|
||||
|
||||
|
|
Loading…
Reference in a new issue