diff --git a/app/core/Tracker.coffee b/app/core/Tracker.coffee index 22af1dfa5..3a7d1f586 100644 --- a/app/core/Tracker.coffee +++ b/app/core/Tracker.coffee @@ -181,6 +181,7 @@ module.exports = class Tracker extends CocoClass ga? 'send', 'timing', category, variable, duration, label updateRole: -> + return if me.isAdmin() return unless me.isTeacher() return require('core/services/segment')() unless @segmentLoaded @identify() diff --git a/app/models/User.coffee b/app/models/User.coffee index d308c8ced..e53f25c62 100644 --- a/app/models/User.coffee +++ b/app/models/User.coffee @@ -92,7 +92,6 @@ module.exports = class User extends CocoModel Boolean((utils.getQueryVariable('dev', false) or me.isTeacher()) and utils.getQueryVariable('course', false)) setRole: (role, force=false) -> - return if me.isAdmin() oldRole = @get 'role' return if oldRole is role or (oldRole and not force) @set 'role', role