 template = require 'templates/courses/course-details'
 User = require 'models/User'
 storage = require 'core/storage'
-
-autoplayedOnce = false
 
 module.exports = class CourseDetailsView extends RootView
   id: 'course-details-view'

  onLevelSessionsSync: ->
    return if @destroyed
    # console.log 'onLevelSessionsSync'
    @instanceStats = averageLevelsCompleted: 0, furthestLevelCompleted: '', totalLevelsCompleted: 0, totalPlayTime: 0
    @memberStats = {}
    @userConceptStateMap = {}
    @userLevelStateMap = {}
    levelStateMap = {}
    for levelSession in @levelSessions.models
      continue if levelSession.skipMe   # Don't track second arena session as another completed level
      userID = levelSession.get('creator')

          playtime = playtime + parseInt(secondSessionForLevel.get('playtime') ? 0, 10)
          secondSessionForLevel.skipMe = true

      @memberStats[userID] ?= totalLevelsCompleted: 0, totalPlayTime: 0
      @memberStats[userID].totalLevelsCompleted++ if state is 'complete'
      @memberStats[userID].totalPlayTime += playtime
