Remove add students tab from CourseDetailsView

This commit is contained in:
Scott Erickson 2015-11-09 18:00:55 -08:00
parent 97cb5275c3
commit 628ed9a990
2 changed files with 0 additions and 47 deletions

View file

@ -58,8 +58,6 @@ block content
if adminMode if adminMode
li.active(role='presentation') li.active(role='presentation')
a(href='#progress', aria-controls='progress', role='tab', data-toggle='tab', data-i18n="courses.progress") a(href='#progress', aria-controls='progress', role='tab', data-toggle='tab', data-i18n="courses.progress")
li(role='presentation')
a(href='#invite', aria-controls='invite', role='tab', data-toggle='tab', data-i18n="courses.add_students")
li(role='presentation') li(role='presentation')
a(href='#levels', aria-controls='levels', role='tab', data-toggle='tab', data-i18n="nav.play") a(href='#levels', aria-controls='levels', role='tab', data-toggle='tab', data-i18n="nav.play")
else else
@ -71,8 +69,6 @@ block content
if adminMode if adminMode
.tab-pane.active#progress(role='tabpanel') .tab-pane.active#progress(role='tabpanel')
+progress-tab +progress-tab
.tab-pane#invite(role='tabpanel')
+invite-tab
.tab-pane#levels(role='tabpanel') .tab-pane#levels(role='tabpanel')
+levels-tab +levels-tab
else else
@ -261,28 +257,6 @@ mixin progress-members-popup-started(i, level)
if adminMode if adminMode
strong(data-i18n="clans.view_solution") strong(data-i18n="clans.view_solution")
mixin invite-tab
p(data-i18n="courses.invite_students")
h3(data-i18n="courses.invite_link_header")
p(data-i18n="courses.invite_link_p_1")
.alert.alert-info
strong= document.location.origin + "/courses/students?_ppc=" + view.prepaid.get('code')
p(data-i18n="courses.invite_link_p_2")
.form
.form-group
textarea#invite-emails-textarea.form-control
.help-block(data-i18n="courses.enter_emails")
.form-group
button#invite-btn.btn.btn-success(data-i18n="courses.send_invites")
#invite-emails-sending-alert.alert.alert-info.hide(data-i18n="common.sending")
#invite-emails-success-alert.alert.alert-success.hide(data-i18n="play_level.done")
if view.prepaid.loaded && pricePerSeat > 0
h3 Class Capacity
p
span.spr(data-i18n="courses.capacity_used")
span #{view.prepaid.get('redeemers').length} / #{view.prepaid.get('maxRedeemers')}.
mixin levels-tab mixin levels-tab
table.table.table-striped.table-condensed table.table.table-striped.table-condensed
thead thead

View file

@ -25,7 +25,6 @@ module.exports = class CourseDetailsView extends RootView
'click .progress-level-cell': 'onClickProgressLevelCell' 'click .progress-level-cell': 'onClickProgressLevelCell'
'mouseenter .progress-level-cell': 'onMouseEnterPoint' 'mouseenter .progress-level-cell': 'onMouseEnterPoint'
'mouseleave .progress-level-cell': 'onMouseLeavePoint' 'mouseleave .progress-level-cell': 'onMouseLeavePoint'
'click #invite-btn': 'onClickInviteButton'
constructor: (options, @courseID, @courseInstanceID) -> constructor: (options, @courseID, @courseInstanceID) ->
super options super options
@ -261,26 +260,6 @@ module.exports = class CourseDetailsView extends RootView
viewArgs: [{}, levelSlug] viewArgs: [{}, levelSlug]
} }
onClickInviteButton: (e) ->
emails = @$('#invite-emails-textarea').val()
emails = emails.split('\n')
emails = _.filter((_.string.trim(email) for email in emails))
if not emails.length
return
url = @courseInstance.url() + '/invite_students'
@$('#invite-btn, #invite-emails-textarea').addClass('hide')
@$('#invite-emails-sending-alert').removeClass('hide')
$.ajax({
url: url
data: {emails: emails}
method: 'POST'
context: @
success: ->
@$('#invite-emails-sending-alert').addClass('hide')
@$('#invite-emails-success-alert').removeClass('hide')
})
onMouseEnterPoint: (e) -> onMouseEnterPoint: (e) ->
$('.progress-popup-container').hide() $('.progress-popup-container').hide()
container = $(e.target).find('.progress-popup-container').show() container = $(e.target).find('.progress-popup-container').show()