mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-13 22:49:51 -04:00
Courses UI: Add student summary stats
This commit is contained in:
parent
5961f14d2c
commit
e85d5eac6f
2 changed files with 13 additions and 1 deletions
|
@ -82,6 +82,9 @@
|
|||
font-weight: normal
|
||||
font-size: 14px
|
||||
|
||||
.student-cell
|
||||
min-width: 150px
|
||||
|
||||
.progress-cell
|
||||
padding: 2px
|
||||
padding-bottom: 10px
|
||||
|
|
|
@ -153,8 +153,17 @@ mixin progress-tab
|
|||
tbody
|
||||
each student in instance.students
|
||||
tr
|
||||
td
|
||||
td.student-cell
|
||||
a= student
|
||||
- var levelsCompleted = 0
|
||||
each level in course.levels
|
||||
if userLevelStateMap[student][level] === 'complete'
|
||||
- levelsCompleted++
|
||||
- var secondsPlayed = Math.round(Math.random() * 1000 * (levelsCompleted + 1))
|
||||
- var secondsLastPlayed = Math.round(Math.random() * 100000)
|
||||
div #{levelsCompleted} levels completed
|
||||
div #{moment.duration(secondsPlayed, 'seconds').humanize()} played
|
||||
div Played #{moment().subtract(secondsLastPlayed, 'seconds').fromNow()}
|
||||
td.progress-cell
|
||||
.level-progression-concepts Concepts
|
||||
each concept in courseConcepts
|
||||
|
|
Loading…
Reference in a new issue