Merge branch 'master' into production

This commit is contained in:
Matt Lott 2016-08-19 14:44:13 -07:00
commit 59eb95c235
3 changed files with 4 additions and 0 deletions

View file

@ -132,6 +132,8 @@ mixin course-instance-body(courseInstance, classroom)
else
- var firstLevel = stats.levels.first;
- var levelURL = "/play/level/"+firstLevel.get('slug')+"?course="+courseInstance.get('courseID')+"&course-instance="+courseInstance.id;
if firstLevel.get('primerLanguage')
- levelURL += "&codeLanguage=" + firstLevel.get('primerLanguage');
a.play-btn.btn.btn-navy.btn-lg.m-b-1(data-href=levelURL, data-level-slug=firstLevel.get('slug'), data-event-action="Students Start Course")
span(data-i18n="courses.start")

View file

@ -133,6 +133,7 @@ module.exports = class CourseDetailsView extends RootView
viewArgs = viewArgs.concat ['course', @courseInstance.id]
else
route = @getLevelURL levelSlug
route += "&codeLanguage=" + level.get('primerLanguage') if level.get('primerLanguage')
viewClass = 'views/play/level/PlayLevelView'
viewArgs = [{courseID: @courseID, courseInstanceID: @courseInstanceID, supermodel: @supermodel}, levelSlug]
Backbone.Mediator.publish 'router:navigate', route: route, viewClass: viewClass, viewArgs: viewArgs

View file

@ -103,6 +103,7 @@ module.exports = class CourseVictoryModal extends ModalView
link = "/play/level/#{@nextLevel.get('slug')}?course=#{@courseID}&codeLanguage=#{utils.getQueryVariable('codeLanguage', 'python')}"
else
link = "/play/level/#{@nextLevel.get('slug')}?course=#{@courseID}&course-instance=#{@courseInstanceID}"
link += "&codeLanguage=" + @level.get('primerLanguage') if @level.get('primerLanguage')
application.router.navigate(link, {trigger: true})
onDone: ->