mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 09:35:39 -05:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
eba4afec17
11 changed files with 21 additions and 21 deletions
|
@ -133,8 +133,8 @@ module.exports = class CocoRouter extends Backbone.Router
|
|||
'teachers/quote': go('teachers/RequestQuoteView')
|
||||
'teachers/signup': ->
|
||||
return @routeDirectly('teachers/CreateTeacherAccountView', []) if me.isAnonymous()
|
||||
@navigate('/teachers/convert', {trigger: true, replace: true})
|
||||
'teachers/convert': ->
|
||||
@navigate('/teachers/update-account', {trigger: true, replace: true})
|
||||
'teachers/update-account': ->
|
||||
return @navigate('/teachers/signup', {trigger: true, replace: true}) if me.isAnonymous()
|
||||
@routeDirectly('teachers/ConvertToTeacherAccountView', [])
|
||||
|
||||
|
|
|
@ -799,11 +799,11 @@
|
|||
finish_signup: "Finish creating your teacher account:"
|
||||
finish_signup_p: "Create an account to set up a class, add your students, and monitor their progress as they learn computer science."
|
||||
signup_with: "Sign up with:"
|
||||
conversion_warning: "WARNING: Your current account is a <em>Student Account</em>. Once you submit this form, your account will be converted into a Teacher Account."
|
||||
learn_more_modal: "Teacher accounts on CodeCombat have the ability to monitor student progress, assign enrollments and manage classrooms. Teacher accounts cannot be a part of a classroom - if you are currently enrolled in a class using this account, you will no longer be able to access it once you convert to a Teacher Account."
|
||||
conversion_warning: "WARNING: Your current account is a <em>Student Account</em>. Once you submit this form, your account will be updated to a Teacher Account." # {change}
|
||||
learn_more_modal: "Teacher accounts on CodeCombat have the ability to monitor student progress, assign enrollments and manage classrooms. Teacher accounts cannot be a part of a classroom - if you are currently enrolled in a class using this account, you will no longer be able to access it once you update to a Teacher Account." # {change}
|
||||
create_account: "Create a Teacher Account"
|
||||
create_account_subtitle: "Get access to teacher-only tools for using CodeCombat in the classroom. <strong>Set up a class</strong>, add your students, and <strong>monitor their progress</strong>!"
|
||||
convert_account_title: "Convert to Teacher Account"
|
||||
convert_account_title: "Update to Teacher Account" # {change}
|
||||
not: "Not"
|
||||
setup_a_class: "Set Up a Class"
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ block content
|
|||
.login-button.btn.btn-lg.btn-primary(data-i18n='login.log_in')
|
||||
a.btn.btn-lg.btn-primary-alt(href="/teachers/signup" data-i18n='teacher.create_teacher_account')
|
||||
else
|
||||
a.btn.btn-lg.btn-primary(href="/teachers/convert" data-i18n="teachers_quote.convert_account_title")
|
||||
a.btn.btn-lg.btn-primary(href="/teachers/update-account" data-i18n="teachers_quote.convert_account_title")
|
||||
button#logout-button.btn.btn-lg.btn-primary-alt(data-i18n="login.log_out")
|
||||
|
||||
.teacher-account-blurb.text-center.col-xs-6.col-xs-offset-3.m-y-3
|
||||
|
@ -28,7 +28,7 @@ block content
|
|||
p
|
||||
| We are transitioning to a new improved classroom management system for instructors.
|
||||
| Please convert your account to ensure you retain access to your classrooms.
|
||||
a.btn.btn-primary.btn-lg(href="/teachers/convert") Upgrade to teacher account
|
||||
a.btn.btn-primary.btn-lg(href="/teachers/update-account") Upgrade to teacher account
|
||||
|
||||
.container.m-t-5
|
||||
h3(data-i18n='teacher.enrollments')
|
||||
|
|
|
@ -13,7 +13,7 @@ block content
|
|||
p
|
||||
| We are transitioning to a new improved classroom management system for instructors.
|
||||
| Please convert your account to ensure you retain access to your classrooms.
|
||||
a.btn.btn-primary.btn-lg(href="/teachers/convert") Upgrade to teacher account
|
||||
a.btn.btn-primary.btn-lg(href="/teachers/update-account") Upgrade to teacher account
|
||||
|
||||
if classroom.loaded
|
||||
.container
|
||||
|
|
|
@ -12,7 +12,7 @@ block content
|
|||
.login-button.btn.btn-lg.btn-primary(data-i18n='login.log_in')
|
||||
a.btn.btn-lg.btn-primary-alt(href="/teachers/signup" data-i18n='teacher.create_teacher_account')
|
||||
else
|
||||
a.btn.btn-lg.btn-primary(href="/teachers/convert" data-i18n="teachers_quote.convert_account_title")
|
||||
a.btn.btn-lg.btn-primary(href="/teachers/update-account" data-i18n="teachers_quote.convert_account_title")
|
||||
button#logout-button.btn.btn-lg.btn-primary-alt(data-i18n="login.log_out")
|
||||
|
||||
.teacher-account-blurb.text-center.col-xs-6.col-xs-offset-3.m-y-3
|
||||
|
@ -28,7 +28,7 @@ block content
|
|||
p
|
||||
| We are transitioning to a new improved classroom management system for instructors.
|
||||
| Please convert your account to ensure you retain access to your classrooms.
|
||||
a.btn.btn-primary.btn-lg(href="/teachers/convert") Upgrade to teacher account
|
||||
a.btn.btn-primary.btn-lg(href="/teachers/update-account") Upgrade to teacher account
|
||||
|
||||
.container
|
||||
h3(data-i18n='teacher.current_classes')
|
||||
|
|
|
@ -12,7 +12,7 @@ block content
|
|||
p
|
||||
| We are transitioning to a new improved classroom management system for instructors.
|
||||
| Please convert your account to ensure you retain access to your classrooms.
|
||||
a.btn.btn-primary.btn-lg(href="/teachers/convert") Upgrade to teacher account
|
||||
a.btn.btn-primary.btn-lg(href="/teachers/update-account") Upgrade to teacher account
|
||||
|
||||
.container
|
||||
h1(data-i18n="courses.title")
|
||||
|
|
|
@ -11,7 +11,7 @@ block content
|
|||
.login-button.btn.btn-lg.btn-primary(data-i18n='login.log_in')
|
||||
a.btn.btn-lg.btn-primary-alt(href="/teachers/signup" data-i18n='teacher.create_teacher_account')
|
||||
else
|
||||
a.btn.btn-lg.btn-primary(href="/teachers/convert" data-i18n="teachers_quote.convert_account_title")
|
||||
a.btn.btn-lg.btn-primary(href="/teachers/update-account" data-i18n="teachers_quote.convert_account_title")
|
||||
button#logout-button.btn.btn-lg.btn-primary-alt(data-i18n="login.log_out")
|
||||
|
||||
.teacher-account-blurb.text-center.col-xs-6.col-xs-offset-3.m-y-3
|
||||
|
|
|
@ -63,7 +63,7 @@ module.exports = class NewHomeView extends RootView
|
|||
onLoaded: ->
|
||||
@trialRequest = @trialRequests.first() if @trialRequests?.size()
|
||||
@isTeacherWithDemo = @trialRequest and @trialRequest.get('status') in ['approved', 'submitted']
|
||||
@demoRequestURL = if me.isTeacher() then '/teachers/convert' else '/teachers/demo'
|
||||
@demoRequestURL = if me.isTeacher() then '/teachers/update-account' else '/teachers/demo'
|
||||
super()
|
||||
|
||||
onClickPlayButton: (e) ->
|
||||
|
|
|
@ -179,7 +179,7 @@ module.exports = class CreateTeacherAccountView extends RootView
|
|||
success: =>
|
||||
me.loginGPlusUser(@gplusAttrs.gplusID, {
|
||||
success: ->
|
||||
application.router.navigate('/teachers/convert')
|
||||
application.router.navigate('/teachers/update-account')
|
||||
error: errors.showNotyNetworkError
|
||||
})
|
||||
})
|
||||
|
@ -221,7 +221,7 @@ module.exports = class CreateTeacherAccountView extends RootView
|
|||
success: =>
|
||||
me.loginFacebookUser(@facebookAttrs.facebookID, {
|
||||
success: ->
|
||||
application.router.navigate('/teachers/convert')
|
||||
application.router.navigate('/teachers/update-account')
|
||||
error: errors.showNotyNetworkError
|
||||
})
|
||||
})
|
||||
|
|
|
@ -2,12 +2,12 @@ ConvertToTeacherAccountView = require 'views/teachers/ConvertToTeacherAccountVie
|
|||
storage = require 'core/storage'
|
||||
forms = require 'core/forms'
|
||||
|
||||
describe '/teachers/convert', ->
|
||||
describe '/teachers/update-account', ->
|
||||
describe 'when logged out', ->
|
||||
it 'redirects to /teachers/signup', ->
|
||||
spyOn(me, 'isAnonymous').and.returnValue(true)
|
||||
spyOn(application.router, 'navigate')
|
||||
Backbone.history.loadUrl('/teachers/convert')
|
||||
Backbone.history.loadUrl('/teachers/update-account')
|
||||
expect(application.router.navigate.calls.count()).toBe(1)
|
||||
args = application.router.navigate.calls.argsFor(0)
|
||||
expect(args[0]).toBe('/teachers/signup')
|
||||
|
@ -17,13 +17,13 @@ describe '/teachers/convert', ->
|
|||
spyOn(me, 'isAnonymous').and.returnValue(false)
|
||||
spyOn(me, 'isTeacher').and.returnValue(false)
|
||||
spyOn(application.router, 'routeDirectly')
|
||||
Backbone.history.loadUrl('/teachers/convert')
|
||||
Backbone.history.loadUrl('/teachers/update-account')
|
||||
expect(application.router.routeDirectly.calls.count()).toBe(1)
|
||||
args = application.router.routeDirectly.calls.argsFor(0)
|
||||
expect(args[0]).toBe('teachers/ConvertToTeacherAccountView')
|
||||
|
||||
|
||||
describe 'ConvertToTeacherAccountView (/teachers/convert)', ->
|
||||
describe 'ConvertToTeacherAccountView (/teachers/update-account)', ->
|
||||
|
||||
view = null
|
||||
|
||||
|
|
|
@ -16,13 +16,13 @@ describe '/teachers/signup', ->
|
|||
|
||||
describe 'when logged in', ->
|
||||
|
||||
it 'redirects to /teachers/convert', ->
|
||||
it 'redirects to /teachers/update-account', ->
|
||||
spyOn(me, 'isAnonymous').and.returnValue(false)
|
||||
spyOn(application.router, 'navigate')
|
||||
Backbone.history.loadUrl('/teachers/signup')
|
||||
expect(application.router.navigate.calls.count()).toBe(1)
|
||||
args = application.router.navigate.calls.argsFor(0)
|
||||
expect(args[0]).toBe('/teachers/convert')
|
||||
expect(args[0]).toBe('/teachers/update-account')
|
||||
|
||||
|
||||
describe 'CreateTeacherAccountView', ->
|
||||
|
|
Loading…
Reference in a new issue