   constructor: (options, @level, @sessions) ->
     super(options)
     @refreshMatches()
-    
+
   refreshMatches: ->
     @teams = teamDataFromLevel @level
     @nameMap = {}

    @setRankingButtonText(button, 'ranking')
    success = => @setRankingButtonText(button, 'ranked')
    failure = => @setRankingButtonText(button, 'failed')
    
    ajaxData = { session: sessionID, levelID: @level.id, originalLevelID: @level.attributes.original, levelMajorVersion: @level.attributes.version.major }
    $.ajax '/queue/scoring', {
      type: 'POST'

      team.matches = (convertMatch(match) for match in team.session?.get('matches') or [])
      team.matches.reverse()
      team.score = (team.session?.get('totalScore') or 10).toFixed(2)

    ctx

  afterRender: ->
