This problem is solved using Stirling numbers of the second kind :
We can have empty classrooms
If no classroom is empty we get $S(50,5)$
If one classroom is empty we get $ {5}\choose{4 } $ $ S(50,4)$
If two classrooms are empty we get $ {5}\choose{3 } $ $ S(50,3)$
If three classrooms are empty we get $ {5}\choose{2 } $ $ S(50,2)$
If four classrooms a reempty we get $ {5}\choose{1 } $ $ S(50,1)$ which is 5
So the final is the sum of all 5 events? Am I right? Because the teacher didn't use the Binomial coefficient when calculating the partition and I think that is necessary.
The binomial coefficient isn't used because the classrooms are identical, thus having different classrooms be empty doesn't result in distributions that are considered different. Furthermore, if the classrooms were distinguishable, your binomials would not be correct. You are choosing $k$ classrooms to be empty, and there are $5$ classrooms, not $50$. So it should be $5\choose k$, not $50\choose k$.