| 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) { |