diff --git a/app/assets/images/pages/courses/coco_complab.png b/app/assets/images/pages/courses/coco_complab.png new file mode 100644 index 000000000..35e6d7c68 Binary files /dev/null and b/app/assets/images/pages/courses/coco_complab.png differ diff --git a/app/styles/courses/mock1/courses.sass b/app/styles/courses/mock1/courses.sass index c3efb70b1..00934aba9 100644 --- a/app/styles/courses/mock1/courses.sass +++ b/app/styles/courses/mock1/courses.sass @@ -12,6 +12,9 @@ .course-panel margin: 20px + .faq-blurb + font-size: 14px + .row-pick-class display: none @@ -31,9 +34,6 @@ .center text-align: center - .caption-text - font-size: 14px - .concepts-container width: 200px @@ -48,9 +48,24 @@ .monitoring-img-container margin-top: 10px + .praise-caption + font-size: 14px + .praise-quote - font-size: 24px + font-size: 20px font-style: italic .progress-container font-size: 20px + + .img-quote + height: 160px + + .popover + z-index: 1050 + min-width: 400px + + h3 + background: transparent + border: 0 + font-size: 30px diff --git a/app/styles/play/level/duel-stats-view.sass b/app/styles/play/level/duel-stats-view.sass index 7d0cbb1ec..71eed7ad2 100644 --- a/app/styles/play/level/duel-stats-view.sass +++ b/app/styles/play/level/duel-stats-view.sass @@ -15,7 +15,8 @@ width: 500px height: 60px - display: flex + display: none + //display: flex // set if present flex-direction: row &:hover diff --git a/app/templates/courses/mock1/courses.jade b/app/templates/courses/mock1/courses.jade index ea02d713f..821356a72 100644 --- a/app/templates/courses/mock1/courses.jade +++ b/app/templates/courses/mock1/courses.jade @@ -68,11 +68,17 @@ block content li No coding experience necesssary li Easily monitor student progress - div Purchase a course for your entire class. It's easy to sign up your students! + p Purchase a course for your entire class. It's easy to sign up your students! + p.faq-blurb + span.spr See the courses + a.spr.courses-faq FAQ + span for more information. .col-md-6 - .well.well-sm - div.praise-quote "#{praise.quote}" - div.caption-text - #{praise.source} + img.img-quote(src="/images/pages/courses/coco_complab.png") + p + .well.well-sm + div.praise-quote "#{praise.quote}" + div.praise-caption - #{praise.source} h2.center Choose Your Course: diff --git a/app/views/courses/mock1/CoursesView.coffee b/app/views/courses/mock1/CoursesView.coffee index 6a3200b71..d910316a2 100644 --- a/app/views/courses/mock1/CoursesView.coffee +++ b/app/views/courses/mock1/CoursesView.coffee @@ -28,6 +28,10 @@ module.exports = class CoursesView extends RootView context.studentMode = @studentMode context + afterRender: -> + super() + @setupCoursesFAQPopover() + initData: -> mockData = require 'views/courses/mock1/CoursesMockData' @courses = mockData.courses @@ -39,6 +43,23 @@ module.exports = class CoursesView extends RootView @instances = mockData.instances @praise = mockData.praise[_.random(0, mockData.praise.length - 1)] + setupCoursesFAQPopover: -> + popoverTitle = "
Q: What's the difference between these courses and the single player game?
" + popoverContent += "A: The single player game is designed for individuals, while the courses are designed for classes.
" + popoverContent += "The single player game has items, gems, hero selection, leveling up, and in-app purchases. Courses have classroom management features and streamlined student-focused level pacing.
" + @$el.find('.courses-faq').popover( + animation: true + html: true + placement: 'top' + trigger: 'click' + title: popoverTitle + content: popoverContent + container: @$el + ).on 'shown.bs.popover', => + application.tracker?.trackEvent 'Subscription payment methods hover' + + onClickBuy: (e) -> courseID = $(e.target).data('course-id') ? 0 app.router.navigate("/courses/mock1/enroll/#{courseID}") diff --git a/app/views/play/level/DuelStatsView.coffee b/app/views/play/level/DuelStatsView.coffee index 47466a695..2a989c659 100644 --- a/app/views/play/level/DuelStatsView.coffee +++ b/app/views/play/level/DuelStatsView.coffee @@ -49,6 +49,7 @@ module.exports = class DuelStatsView extends CocoView super() for player in @players @buildAvatar player.heroID, player.team + @$el.css 'display', 'flex' # Show it buildAvatar: (heroID, team) -> @avatars ?= {} diff --git a/server/queues/scoring/getTwoGames.coffee b/server/queues/scoring/getTwoGames.coffee index 36b7115cc..50ee267bd 100644 --- a/server/queues/scoring/getTwoGames.coffee +++ b/server/queues/scoring/getTwoGames.coffee @@ -37,8 +37,8 @@ getRandomSessions = (user, callback) -> # Determine whether to play a random match, an internal league match, or an external league match. # Only people in a league will end up simulating internal league matches (for leagues they're in) except by dumb chance. # If we don't like that, we can rework sampleByLevel to have an opportunity to switch to internal leagues if the first session had a league affiliation. - leagueIDs = user.get('clans') or [] - #leagueIDs = leagueIDs.concat user.get('courseInstances') or [] + leagueIDs = user?.get('clans') or [] + #leagueIDs = leagueIDs.concat user?.get('courseInstances') or [] leagueIDs = (leagueID + '' for leagueID in leagueIDs) # Make sure to fetch them as strings. return sampleByLevel callback unless leagueIDs.length and Math.random() > 1 / leagueIDs.length leagueID = _.sample leagueIDs