|That was then and this is now.|
Under California Education Code Section 51512, it... is illegal for any person — including a student — to use an electronic device to record what is happening in the classroom without the consent of the teacher. But here is where the matter gets tricky: The teeth in the law really applies only to people who are not students. That is, any non-pupil who is caught recording a classroom discussion without the teacher’s consent can be charged with a misdemeanor.
“If I want to audit my kid’s class — maybe I think the material violates some religious belief — I can’t record the class without the teacher’s permission," said Rebecca Lonergan, an assistant professor of law at USC. When it comes to students who are caught surreptitiously recording their teachers, the punishment is determined by school administrators. “If it’s a student, you’re not going to criminally prosecute them for recording their teacher,” said Lonergan, who also has worked with the U.S. Attorney’s Office, where she dealt with many wiretapping cases...
Full story at http://www.dailynews.com/social-affairs/20131012/case-of-cursing-lausd-teacher-raises-legal-questions-about-secret-recordings
Of course, you can ask students not to record your class or only to record it if you give permission. But that request doesn't guarantee anything, as a practical matter.