mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 08:50:58 -05:00
Remove old homepage
Turning off homepage a/b testing for now, but leaving the plumbing in because we’ll be iterating on that shortly.
This commit is contained in:
parent
5352e0d769
commit
9e8e865049
3 changed files with 8 additions and 8 deletions
|
@ -17,11 +17,10 @@ module.exports = class CocoRouter extends Backbone.Router
|
|||
if window.serverConfig.picoCTF
|
||||
return @routeDirectly 'play/CampaignView', ['picoctf'], {}
|
||||
# Testing new home page
|
||||
group = me.getHomepageGroup()
|
||||
return @routeDirectly('HomeView', [], { withTeacherNote: true }) if group is 'home-with-note'
|
||||
return @routeDirectly('NewHomeView', [], { jumbotron: 'student' }) if group is 'new-home-student'
|
||||
return @routeDirectly('NewHomeView', [], { jumbotron: 'characters' }) if group is 'new-home-characters'
|
||||
return @routeDirectly('HomeView', [])
|
||||
# group = me.getHomepageGroup()
|
||||
# return @routeDirectly('NewHomeView', [], { jumbotron: 'student' }) if group is 'new-home-student'
|
||||
# return @routeDirectly('NewHomeView', [], { jumbotron: 'characters' }) if group is 'new-home-characters'
|
||||
return @routeDirectly('NewHomeView', [])
|
||||
|
||||
'about': go('AboutView')
|
||||
|
||||
|
|
|
@ -135,11 +135,12 @@ module.exports = class User extends CocoModel
|
|||
@announcesActionAudioGroup
|
||||
|
||||
getHomepageGroup: ->
|
||||
return 'home-with-note' unless _.string.startsWith(me.get('preferredLanguage', true) or 'en-US', 'en')
|
||||
# Only testing on en-US so localization issues are not a factor
|
||||
return 'new-home-student' unless _.string.startsWith(me.get('preferredLanguage', true) or 'en-US', 'en')
|
||||
return @homepageGroup if @homepageGroup
|
||||
group = me.get('testGroupNumber') % 4
|
||||
@homepageGroup = switch group
|
||||
when 0, 1 then 'home-with-note'
|
||||
when 0, 1 then 'new-home-characters'
|
||||
when 2, 3 then 'new-home-student'
|
||||
application.tracker.identify newHomepageGroup: @homepageGroup unless me.isAdmin()
|
||||
return @homepageGroup
|
||||
|
|
|
@ -18,7 +18,7 @@ module.exports = class NewHomeView extends RootView
|
|||
'click #learn-more-link': 'onClickLearnMoreLink'
|
||||
|
||||
initialize: (options) ->
|
||||
@jumbotron = options.jumbotron or utils.getQueryVariable('jumbotron') or 'student' # or 'characters'
|
||||
@jumbotron = options.jumbotron or utils.getQueryVariable('jumbotron') or 'student'
|
||||
@courses = new CocoCollection [], {url: "/db/course", model: Course}
|
||||
@supermodel.loadCollection(@courses, 'courses')
|
||||
|
||||
|
|
Loading…
Reference in a new issue