It sounds like, since the 60s, school-sponsored displays of religion are illegal (per the Supreme Court), but students can pray on their own. If the school allows the teacher to post it, for the students, it appears to come from the authority of the school and is probably illegal.