Prevent Active Directory Users From Locking Screen
Assuming that you aren't granting the students admin rights on the lab computers, enable automatic log out in Security &amp; Privacy > Advanced preferences:


  macOS Sierra: Set your Mac to log out when not in use
  
  You can set your Mac to automatically log out the current user after a set period of inactivity. This helps ensure that your information is secure when your Mac is unattended.
  
  
  Choose Apple menu > System Preferences, click Security &amp; Privacy, then click General.
  Click the lock icon  to unlock it, then enter an administrator name and password.
  Click Advanced.
  Select “Log out after... minutes of inactivity.”
  Set the amount of time before the user is automatically logged out.
  


The lower threshold seems to be 5 minutes.



Using automatic log out instead of disabling sleep/screensaver and not requiring a password query has the advantage that privacy of your users and protection from third party access (i.e. other students) is retained.