A driving safety education course offered by a Texas school district may not be enough to prevent a student from getting into trouble with the law, a federal judge ruled Thursday. 

In a 2-1 decision, the 10th U.S. Circuit Court of Appeals upheld a Texas ruling that concluded that the district’s curriculum did not cover all aspects of the issue.

The ruling was a blow to the Texas Education Agency, which had sought a preliminary injunction against the program, known as the Driving Safety Course.

The agency argued that the course was not required to teach the basics of driving safety and was instead intended to provide students with “familiarization and encouragement” to take responsibility for their own safety.

In a dissenting opinion, Judge Barbara L. Bunning wrote that the school district had a legal obligation to teach students about driving safety “while providing them with a safety course to be taken in the context of an education and training program.”

The ruling came just weeks after the state’s attorney general’s office filed a civil rights complaint against the school, saying the district was not providing a safe driving course, and that the law required it to be.