(a) The Secretary concerned may require, as a condition to the Secretary providing advanced education assistance to any person, that such person enter into a written agreement with the Secretary concerned under the terms of which such person shall agree
(1) to complete the educational requirements specified in the agreement and to serve on active duty for a period specified in the agreement;
(2) that if such person fails to complete the education requirements specified in the agreement, such person will serve on active duty for a period specified in the agreement;
(3) that if such person does not complete the period of active duty specified in the agreement, or does not fulfill any term or condition prescribed pursuant to paragraph (4), such person shall be subject to the repayment provisions of section
303a (e) of title
37; and
(4) to such other terms and conditions as the Secretary concerned may prescribe to protect the interest of the United States.
(b) The Secretary concerned shall determine the period of active duty to be served by any person for advanced education assistance to be provided such person by an armed force, except that if the period of active duty required to be served is specified under another provision of law with respect to the advanced education assistance to be provided, the period specified in the agreement referred to in subsection (a) shall be the same as the period specified in such other provision of law.
(c) As a condition of the Secretary concerned providing financial assistance under section
2107 or
2107a of this title to any person, the Secretary concerned shall require that the person enter into the agreement described in subsection (a). In addition to the requirements of paragraphs (1) through (4) of such subsection, the agreement shall specify that, if the person does not complete the education requirements specified in the agreement or does not fulfill any term or condition prescribed pursuant to paragraph (4) of such subsection, the person shall be subject to the repayment provisions of section
303a (e) of title
37 without the Secretary first ordering such person to active duty as provided for under subsection (a)(2) and sections
2107 (f) and
2107a (f) of this title.
(d) In this section:
(1) The term advanced education means education or training above the secondary
school level but does not include technical training provided to a member of the armed forces to qualify such member to perform a specified military function, to workshops, or to short-term training programs.
(2) The term assistance means the direct provision of any course of advanced education by the Secretary concerned, reimbursement by the Secretary concerned for any course of advanced education provided by another department or agency of the Federal Government, or the payment, in whole or in part, by the Secretary concerned for any course of advanced education provided by any public or private educational institution or other entity, but such term does not include the payment for any course of advanced education which is paid for under chapter 106 or 107 of this title.
(3) The term cost of advanced education means those costs which are, under regulations prescribed by the Secretary concerned, directly attributable to the education of the person to whom a course of advanced education is provided, including the cost of tuition and other fees (or, if none is charged, an amount determined by the Secretary concerned to be a reasonable charge for the education provided), the cost of books, supplies, transportation, and miscellaneous expenses, and the cost of room and board, but such term does not include pay or allowances under title 37 or a stipend under section
2121 of this title.