MCPcopy Create free account
hub / github.com/codecombat/codecombat / afterInsert

Method afterInsert

app/views/admin/MainAdminView.js:112–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110 }
111
112 afterInsert () {
113 let search, spy, userID
114 super.afterInsert()
115 if (search = utils.getQueryVariable('search')) {
116 $('#user-search').val(search)
117 $('#user-search-button').click()
118 }
119 if (spy = utils.getQueryVariable('spy')) {
120 if (this.amActually) {
121 this.stopSpying()
122 } else {
123 $('#espionage-name-or-email').val(spy)
124 $('#enter-espionage-mode').click()
125 }
126 }
127 if ((me.isAdmin() || me.isOnlineTeacher()) && (userID = utils.getQueryVariable('user'))) {
128 return this.openModalView(new AdministerUserModal({}, userID))
129 }
130 }
131
132 clearQueryParams () { return window.history.pushState({}, '', document.location.href.split('?')[0]) }
133

Callers

nothing calls this directly

Calls 3

stopSpyingMethod · 0.95
isAdminMethod · 0.80
isOnlineTeacherMethod · 0.80

Tested by

no test coverage detected