We built ClassCalc with this exact thought in mind.
Our lockdown is a handshake between teachers and students - teachers allow students to use their devices during class, and students agree to have their devices locked down to ClassCalc only.
When the teacher starts Test Mode, students will receive an invite, which can be accepted or rejected, that looks like this (the student is the mobile device on the right):
Students can leave Test Mode at any time by pressing the "Exit Test" button - when students leave Test Mode, the teacher is notified.
This way, students have complete control over their devices, and teachers can rest easy knowing that devices in their classroom are being used for educational purposes only.
Feel free to check out our demo here!