Notwithstanding any other provision of law, participation in on-the-job work experience education by a pupil enrolled in continuation education shall not be included in the determination of that pupil’s total days of attendance for the purposes of calculating average daily attendance pursuant to subdivision (a) of Section 41601 unless the pupil is 18 years of age or less or has been continuously enrolled in a kindergarten to grade 12 program since his or her 18th birthday.