     @level = new Level(_id:@levelID)
     @level.fetch()
     @level.once 'sync', @onLevelLoaded, @
-    
+
     url = "/db/level/#{@levelID}/session?team=#{@team}"
     @session = new LevelSession()
     @session.url = -> url

  rankSession: ->
    return unless @readyToRank()
    @setRankingButtonText('ranking')
    
    success = => @setRankingButtonText('ranked')
    failure = => @setRankingButtonText('failed')
    
    $.ajax '/queue/scoring', {
      type: 'POST'
      data: { session: @session.id }
      success: success
      failure: failure
    }
    
  setRankingButtonText: (spanClass) ->
    rankButton = $('#rank-button')
    rankButton.find('span').addClass('hidden')

        opponent = match.opponents[0]
        opponent.userName = @nameMap[opponent.userID]
      @finishRendering()

    $.ajax('/db/user/-/names', {
      data: {ids: ids}
      type: 'POST'
      success: success
    })

  # PART 4: Rendering

  finishRendering: ->
