From 01a8312617f731b56b4d91ec44b6bf5af419555d Mon Sep 17 00:00:00 2001 From: Matt Lott Date: Tue, 19 Jul 2016 10:10:48 -0700 Subject: [PATCH 1/2] :bug:Classroom last played string null level check --- app/views/courses/ClassroomView.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/courses/ClassroomView.coffee b/app/views/courses/ClassroomView.coffee index fb4431f95..93f24a671 100644 --- a/app/views/courses/ClassroomView.coffee +++ b/app/views/courses/ClassroomView.coffee @@ -157,7 +157,10 @@ module.exports = class ClassroomView extends RootView course = session.collection.course levelOriginal = session.get('level').original 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) -> return '' unless user.sessions? From 6fdda491bd3760ba6425d648811adb78e6512841 Mon Sep 17 00:00:00 2001 From: phoenixeliot Date: Tue, 19 Jul 2016 14:13:24 -0700 Subject: [PATCH 2/2] Fix for when database courses/campaigns don't match --- .../courses/teacher-courses-view.jade | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/app/templates/courses/teacher-courses-view.jade b/app/templates/courses/teacher-courses-view.jade index c4a8b5673..e50fbb8a7 100644 --- a/app/templates/courses/teacher-courses-view.jade +++ b/app/templates/courses/teacher-courses-view.jade @@ -57,15 +57,16 @@ block content select.level-select.form-control if view.campaigns.loaded - var campaign = view.campaigns.get(course.get('campaignID')) - each level, levelIndex in campaign.getLevels().models - - var levelNumber = campaign.getLevelNumber(level.get('original'), levelIndex + 1) - option(value=level.get('slug')) - span - = levelNumber - span.spr - | . - span - = level.get('name').replace('Course: ', '') + if campaign + each level, levelIndex in campaign.getLevels().models + - var levelNumber = campaign.getLevelNumber(level.get('original'), levelIndex + 1) + option(value=level.get('slug')) + span + = levelNumber + span.spr + | . + span + = level.get('name').replace('Course: ', '') a.play-level-button.btn.btn-lg.btn-primary span(data-i18n="courses.play_level") .clearfix