(a)
The judge shall require any person described in subdivision (b), as a condition of either placing the person on probation or of permitting the person to participate in a drug diversion program to agree to participate in an AIDS education program. Testing for AIDS antibodies shall be offered but no person described in subdivision (b) shall be required to be tested.
(b)
This section shall apply to any person who has either been placed on probation or granted diversion for, any of the following:
(1)
A violation of subdivision (a) of Section 11350 of the Health and Safety Code, subdivision (a) of Section 11377 of the Health and Safety Code, Section 11550 of the Health and Safety Code, Section 4143 or 4149 of the Business and Professions Code, or of subdivision (f) of Section 647 if the offense involves intravenous use of a controlled substance.
(2)
A violation of subdivision (a) or (b) of Section 647.