diff --git a/app/views/courses/ClassroomSettingsModal.coffee b/app/views/courses/ClassroomSettingsModal.coffee index e9b210e61..dbe2ec400 100644 --- a/app/views/courses/ClassroomSettingsModal.coffee +++ b/app/views/courses/ClassroomSettingsModal.coffee @@ -11,6 +11,10 @@ module.exports = class AddLevelSystemModal extends ModalView initialize: (options) -> @classroom = options.classroom + if @classroom + application.tracker?.trackEvent 'Classroom started edit settings', category: 'Courses', classroomID: @classroom.id + else + application.tracker?.trackEvent 'Classroom started edit settings', category: 'Courses' onClickSaveSettingsButton: -> name = $('.settings-name-input').val() diff --git a/app/views/courses/ClassroomView.coffee b/app/views/courses/ClassroomView.coffee index 011bcfac5..b2fd70208 100644 --- a/app/views/courses/ClassroomView.coffee +++ b/app/views/courses/ClassroomView.coffee @@ -99,6 +99,7 @@ module.exports = class ClassroomView extends RootView }) @openModalView(modal) modal.once 'redeem-users', -> document.location.reload() + application.tracker?.trackEvent 'Classroom started enroll students', category: 'Courses' onClickActivateSingleLicenseButton: (e) -> userID = $(e.target).data('user-id') @@ -110,6 +111,7 @@ module.exports = class ClassroomView extends RootView }) @openModalView(modal) modal.once 'redeem-users', -> document.location.reload() + application.tracker?.trackEvent 'Classroom started enroll student', category: 'Courses', userID: userID onClickEditClassDetailsLink: -> modal = new ClassroomSettingsModal({classroom: @classroom}) @@ -149,11 +151,13 @@ module.exports = class ClassroomView extends RootView onClickAddStudentsButton: (e) -> modal = new InviteToClassroomModal({classroom: @classroom}) @openModalView(modal) + application.tracker?.trackEvent 'Classroom started add students', category: 'Courses', classroomID: @classroom.id onClickEnableButton: (e) -> courseInstance = @courseInstances.get($(e.target).data('course-instance-cid')) userID = $(e.target).data('user-id') $(e.target).attr('disabled', true) + application.tracker?.trackEvent 'Course assign student', category: 'Courses', courseInstanceID: courseInstance.id, userID: userID onCourseInstanceCreated = => courseInstance.addMember(userID) @@ -179,6 +183,7 @@ module.exports = class ClassroomView extends RootView onStudentRemoved: (e) -> @users.remove(e.user) @render() + application.tracker?.trackEvent 'Classroom removed student', category: 'Courses', courseInstanceID: @courseInstance.id, userID: e.user.id levelPopoverContent: (level, session, i) -> return null unless level diff --git a/app/views/courses/InviteToClassroomModal.coffee b/app/views/courses/InviteToClassroomModal.coffee index 9062665d9..e9db74611 100644 --- a/app/views/courses/InviteToClassroomModal.coffee +++ b/app/views/courses/InviteToClassroomModal.coffee @@ -4,7 +4,7 @@ template = require 'templates/courses/invite-to-classroom-modal' module.exports = class InviteToClassroomModal extends ModalView id: 'invite-to-classroom-modal' template: template - + events: 'click #send-invites-btn': 'onClickSendInvitesButton' 'click #copy-url-btn, #join-url-input': 'copyURL' @@ -23,6 +23,7 @@ module.exports = class InviteToClassroomModal extends ModalView url = @classroom.url() + '/invite-members' @$('#send-invites-btn, #invite-emails-textarea').addClass('hide') @$('#invite-emails-sending-alert').removeClass('hide') + application.tracker?.trackEvent 'Classroom invite via email', category: 'Courses', classroomID: @classroom.id, emails: emails $.ajax({ url: url @@ -39,6 +40,7 @@ module.exports = class InviteToClassroomModal extends ModalView try document.execCommand('copy') @$('#copied-alert').removeClass('hide') + application.tracker?.trackEvent 'Classroom copy URL', category: 'Courses', classroomID: @classroom.id, url: @joinURL catch err console.log('Oops, unable to copy', err) @$('#copy-failed-alert').removeClass('hide')