         # num_projects       - number of student projects
         # total_upgrades     - the total amount of each quota that has been applied (by anybody) to these student projects
         # your_upgrades      - total amount of each quota that this user has applied to these student projects
+        @_upgrade_is_invalid = false  # will get set to true by render_upgrade_row if invalid.
         for quota, total of purchased_upgrades
             remaining = total - (applied_upgrades[quota] ? 0)
             current   = total_upgrades[quota] ? 0

                {cur}
            </Col>
            <Col md=4>
                {@render_upgrade_row_input(quota, input_type, current, yours, num_projects)}
            </Col>
            <Col md=2 style={marginTop: '8px'}>
                &times; {num_projects}

            @props.flux.getActions(@props.name).upgrade_all_student_projects(upgrades)

    upgrade_quotas_submittable: ->
        if @_upgrade_is_invalid
            return false
        num_projects = @_num_projects
        for quota, val of @state.upgrades
            if val*num_projects != @_your_upgrades[quota]
