Password protected sites

The easier way can be have a group of users called teachers and give just the teacher’s group the permission to visit the page.

There are many plugins for permission handling and grouping users so you’ll just need to search WordPress plugin repository. Just an example: groups plugin

Another possible answer can be : multi page password protection (As I wanted to mention the answer owner, I put the link here!)