(no-ticket) Fix wrong variable reference in teachers.

Pylint noticed that is_teacher isn't defined anywhere,
I hope is_teacher_registration is what author meant.

Change-Id: I2254cc5c34e31c4b51b1213d5efbe38d185bbc3f