A student can cancel their class anytime before 24 hours before the class starts (by default).
If a student cancels a class within 24 hours of starting, a class credit will still be taken because it's not fair that you are out of pocket for last minute changes.
This cancellation policy can be changed as a setup option for the Online School e.g. to 12 hours.
The student can cancel from their dashboard by clicking on the relevant class.
The student will be prompted.
When a student cancels the class, the student will see this class is clearly cancelled.
Also the admin and teacher will see this as clearly cancelled from the Class Admin + teachers will be sent an email notification.
The School Admin can also see this in the student page and see how this impact class credits.
A teacher or school administrator can also cancel their class anytime.
If a class is cancelled "last-minute", then the student's class credit will still be used.
However, if the teacher/admin does not want a class credit to be used (i.e. for the credit to be refunded to the student as above), the admin needs to 'unenrol' the student before cancelling the class.