mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
Migrate join classroom url to /courses from /courses/students
This commit is contained in:
parent
6d4c17f724
commit
c0b979a572
4 changed files with 6 additions and 4 deletions
|
@ -30,7 +30,7 @@ block modal-body-content
|
|||
.form-group
|
||||
label.control-label(for="class-code-input")
|
||||
span Class Code
|
||||
input#class-code-input.input-large.form-control(name="classCode")
|
||||
input#class-code-input.input-large.form-control(name="classCode", value=view.classCode)
|
||||
.help-block optional - ask your teacher to give you one!
|
||||
.form-group
|
||||
label.control-label(for="school-input")
|
||||
|
|
|
@ -28,7 +28,7 @@ block outer_content
|
|||
#hour-of-code
|
||||
h1(data-i18n="home.hoc_title")
|
||||
div
|
||||
a.btn.btn-illustrated.btn-lg.btn-primary.btn-class-code(href='/courses/students', data-i18n="home.hoc_class_code")
|
||||
a.btn.btn-illustrated.btn-lg.btn-primary.btn-class-code(href='/courses', data-i18n="home.hoc_class_code")
|
||||
a.btn.btn-illustrated.btn-lg.btn-success.btn-enter(href='/hoc', data-i18n="home.hoc_enter")
|
||||
|
||||
//- #slogan(data-i18n="home.slogan")
|
||||
|
|
|
@ -12,7 +12,7 @@ module.exports = class InviteToClassroomModal extends ModalView
|
|||
initialize: (options) ->
|
||||
@classroom = options.classroom
|
||||
@classCode = @classroom.get('codeCamel') || @classroom.get('code')
|
||||
@joinURL = document.location.origin + "/courses/students?_cc=" + @classCode
|
||||
@joinURL = document.location.origin + "/courses?_cc=" + @classCode
|
||||
|
||||
onClickSendInvitesButton: ->
|
||||
emails = @$('#invite-emails-textarea').val()
|
||||
|
|
|
@ -4,6 +4,7 @@ auth = require 'core/auth'
|
|||
forms = require 'core/forms'
|
||||
User = require 'models/User'
|
||||
Classroom = require 'models/Classroom'
|
||||
utils = require 'core/utils'
|
||||
|
||||
module.exports = class StudentSignUpModal extends ModalView
|
||||
id: 'student-sign-up-modal'
|
||||
|
@ -17,6 +18,7 @@ module.exports = class StudentSignUpModal extends ModalView
|
|||
initialize: (options) ->
|
||||
options ?= {}
|
||||
@willPlay = options.willPlay
|
||||
@classCode = utils.getQueryVariable('_cc') or ''
|
||||
|
||||
onClickSkipLink: ->
|
||||
@trigger 'click-skip-link' # defer to view that opened this modal
|
||||
|
@ -89,6 +91,6 @@ module.exports = class StudentSignUpModal extends ModalView
|
|||
onCreateUserSuccess: =>
|
||||
classCode = @$('#class-code-input').val()
|
||||
if classCode
|
||||
url = "/courses/students?_cc="+classCode
|
||||
url = "/courses?_cc="+classCode
|
||||
application.router.navigate(url)
|
||||
window.location.reload()
|
||||
|
|
Loading…
Reference in a new issue