What the teacher should have said is something like this:
Although I respect your right to have religious views that differ from mine, I am teaching the theory of evolution and I expect you to know the material I am teaching if you want to pass this course.
You can feel free to add a disclaimer to anything you submit that your religious views are in conflict with the theory of evolution, but, as I said before, you must know the course material to pass.
FWIW, I basically agree with the sentiment the teacher expressed, but if said teacher was indeed as hostile as is made out to be, then he/she wasn't being very professional. It's not the teacher's job to change religious beliefs (regardless of how absurd they may be); it's the teacher's job to teach the course material and ensure his/her students know it.