Steps to replicate:
1. Navigate to admin/settings.php?section=debugging and set Debug messages to Developer. Tick Display debug messages
2. Create an Schedule activity
3. Create a slot.
4. Login as a Student and book the slot
5. Login as a Teacher and click to the student name in the lost of slots.
6. In the opened form click save button.
7. You will get "You should really redirect before you start page output" + debugging stuff
You should really redirect before you start page output
line 766 of /lib/outputrenderers.php: call to debugging()
line 2616 of /lib/weblib.php: call to core_renderer->redirect_message()
line 111 of /mod/scheduler/viewstudent.php: call to redirect()
line 81 of /mod/scheduler/view.php: call to include()