Dotheboys Hall, or Nicholas Nickleby
An ignorant teacher beats a pupil and is caned by his new assistant.