Courses UI: Add student summary stats

This commit is contained in:
Matt Lott 2015-08-21 12:37:54 -07:00
parent 5961f14d2c
commit e85d5eac6f
2 changed files with 13 additions and 1 deletions

View file

@ -82,6 +82,9 @@
font-weight: normal
font-size: 14px
.student-cell
min-width: 150px
.progress-cell
padding: 2px
padding-bottom: 10px

View file

@ -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