Merge branch 'master' into production

This commit is contained in:
phoenixeliot 2016-07-19 14:20:45 -07:00
commit 5259a86d3a
2 changed files with 14 additions and 10 deletions

View file

@ -57,15 +57,16 @@ block content
select.level-select.form-control select.level-select.form-control
if view.campaigns.loaded if view.campaigns.loaded
- var campaign = view.campaigns.get(course.get('campaignID')) - var campaign = view.campaigns.get(course.get('campaignID'))
each level, levelIndex in campaign.getLevels().models if campaign
- var levelNumber = campaign.getLevelNumber(level.get('original'), levelIndex + 1) each level, levelIndex in campaign.getLevels().models
option(value=level.get('slug')) - var levelNumber = campaign.getLevelNumber(level.get('original'), levelIndex + 1)
span option(value=level.get('slug'))
= levelNumber span
span.spr = levelNumber
| . span.spr
span | .
= level.get('name').replace('Course: ', '') span
= level.get('name').replace('Course: ', '')
a.play-level-button.btn.btn-lg.btn-primary a.play-level-button.btn.btn-lg.btn-primary
span(data-i18n="courses.play_level") span(data-i18n="courses.play_level")
.clearfix .clearfix

View file

@ -157,7 +157,10 @@ module.exports = class ClassroomView extends RootView
course = session.collection.course course = session.collection.course
levelOriginal = session.get('level').original levelOriginal = session.get('level').original
level = @levels.findWhere({original: levelOriginal}) level = @levels.findWhere({original: levelOriginal})
return "#{course.get('name')}, #{level.get('name')}" lastPlayed = ""
lastPlayed += course.get('name') if course
lastPlayed += ", #{level.get('name')}" if level
lastPlayed
userPlaytimeString: (user) -> userPlaytimeString: (user) ->
return '' unless user.sessions? return '' unless user.sessions?