preceding taxable year, plus any spending from such endowments during such preceding taxable year, over (B) the aggregate fair market value of all endowments of such institution (determined as of the close of the second preceding taxable year). (5) Grant for a working-family student (A) In general The term grant for a working-family student means, with respect to a qualified institution of higher education, a grant by such institution for all or a portion of the cost of attendance to a working-family student attending such institution. (B) Working-family student The term working-family student means, with respect to a qualified institution of higher education for a taxable year, an individual— (i) who is enrolled (part-time or full-time) as an undergraduate student in such institution during an academic period beginning in such taxable year