     usersToRedeem = @state.get('visibleSelectedUsers')
     @redeemUsers(usersToRedeem)
 
+  updateVisibleSelectedUsers: ->
+    @state.set { visibleSelectedUsers: new Users(@state.get('selectedUsers').filter (u) => @users.get(u)) }
+
   redeemUsers: (usersToRedeem) ->
     if not usersToRedeem.size()
       @finishRedeemUsers()

    
    @listenTo @state, 'change', @render
    @listenTo @state.get('selectedUsers'), 'change add remove reset', ->
      @state.set { visibleSelectedUsers: new Users(@state.get('selectedUsers').filter (u) => @users.get(u)) }
      @render()
    @listenTo @users, 'change add remove reset', ->
      @state.set { visibleSelectedUsers: new Users(@state.get('selectedUsers').filter (u) => @users.get(u)) }
      @render()
    @listenTo @prepaids, 'sync add remove', ->
      @state.set {

      success: (prepaid) =>
        user.set('coursePrepaid', prepaid.pick('_id', 'startDate', 'endDate', 'type', 'includedCourseIDs'))
        usersToRedeem.remove(user)
        @state.get('selectedUsers').remove(user)
        @updateVisibleSelectedUsers()
        # pct = 100 * (usersToRedeem.originalSize - usersToRedeem.size() / usersToRedeem.originalSize)
        # @$('#progress-area .progress-bar').css('width', "#{pct.toFixed(1)}%")
        application.tracker?.trackEvent 'Enroll modal finished enroll student', category: 'Courses', userID: user.id
