The ending caught me off guard too.
Hm, I don't know or remember much about the film (I only saw it on TV once and it was probably already halfway), but IIRC one character in particular who's supposed to be one of the stronger students according to the book is a little wimp in the movie, so...