mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Hot fix for teachers playing level previews
This commit is contained in:
parent
380977f766
commit
b36752107e
1 changed files with 2 additions and 5 deletions
|
@ -62,6 +62,8 @@ module.exports = class LevelLoader extends CocoClass
|
|||
@listenToOnce @level, 'sync', @onLevelLoaded
|
||||
|
||||
onLevelLoaded: ->
|
||||
if @level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop', 'course']
|
||||
@sessionDependenciesRegistered = {}
|
||||
if (@courseID and @level.get('type', true) not in ['course', 'course-ladder']) or window.serverConfig.picoCTF
|
||||
# Because we now use original hero levels for both hero and course levels, we fake being a course level in this context.
|
||||
originalGet = @level.get
|
||||
|
@ -83,8 +85,6 @@ module.exports = class LevelLoader extends CocoClass
|
|||
# Session Loading
|
||||
|
||||
loadFakeSession: ->
|
||||
if @level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop']
|
||||
@sessionDependenciesRegistered = {}
|
||||
initVals =
|
||||
level:
|
||||
original: @level.get('original')
|
||||
|
@ -113,9 +113,6 @@ module.exports = class LevelLoader extends CocoClass
|
|||
@loadDependenciesForSession @session
|
||||
|
||||
loadSession: ->
|
||||
if @level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop', 'course']
|
||||
@sessionDependenciesRegistered = {}
|
||||
|
||||
if @sessionID
|
||||
url = "/db/level.session/#{@sessionID}"
|
||||
url += "?interpret=true" if @spectateMode
|
||||
|
|
Loading…
Reference in a new issue