MCPcopy Index your code
hub / github.com/codecombat/codecombat / onClickPlayerName

Method onClickPlayerName

app/views/ladder/LadderTabView.js:392–410  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

390
391 // Admin view of players' code
392 onClickPlayerName (e) {
393 if (me.isAdmin()) {
394 const row = $(e.target).parent()
395 const session = new LevelSession({ _id: row.data('session-id') })
396 this.supermodel.loadModel(session)
397 return this.listenToOnce(session, 'sync', _session => {
398 let models
399 if (__guard__(_session.get('source'), x => x.name)) {
400 models = [_session]
401 } else {
402 const player = new User({ _id: row.data('player-id') })
403 models = [_session, player]
404 }
405 return this.openModalView(new ModelModal({ models }))
406 })
407 } else if (me.isTeacher()) {}
408 // TODO
409 else {}
410 }
411 // TODO
412
413 onClickSpectateCell (e) {

Callers

nothing calls this directly

Calls 5

isAdminMethod · 0.80
dataMethod · 0.80
isTeacherMethod · 0.80
__guard__Function · 0.70
getMethod · 0.45

Tested by

no test coverage detected