Enable session spectating for WebDev levels

This commit is contained in:
Phoenix Eliot 2016-08-23 11:48:02 -07:00
parent 209b7d724e
commit e929686502

View file

@ -153,7 +153,8 @@ module.exports = class LevelLoader extends CocoClass
url += "?course=#{@courseID}" if @courseID url += "?course=#{@courseID}" if @courseID
session = new LevelSession().setURL url session = new LevelSession().setURL url
session.project = ['creator', 'team', 'heroConfig', 'codeLanguage', 'submittedCodeLanguage', 'state', 'submittedCode'] if @headless if @headless and not @level.isType('web-dev')
session.project = ['creator', 'team', 'heroConfig', 'codeLanguage', 'submittedCodeLanguage', 'state', 'submittedCode']
@sessionResource = @supermodel.loadModel(session, 'level_session', {cache: false}) @sessionResource = @supermodel.loadModel(session, 'level_session', {cache: false})
@session = @sessionResource.model @session = @sessionResource.model
if @opponentSessionID if @opponentSessionID