LOS ANGELES (AP) -- Britney Spears has been ordered to undergo random drug and alcohol testing twice a week.
Los Angeles Superior Court Judge Scott Gordon also has ordered both Spears and her ex-husband, Kevin Federline, to refrain from drinking and using drugs around their two young sons. They're also forbidden from drinking or doing drugs 12 hours before either one cares for the children.
Only Spears has been ordered to submit to testing.
Spears must meet for eight hours a week with a parenting coach, who will report back to the court on Spears' parenting skills.
Both Spears and Federline have been forbidden from making derogatory comments about each other in the presence of the boys. Spears and Federline each is seeking custody of the children.
Messages left with attorneys for Spears and Federline were not immediately returned.