Firstly, you will have to cancel your student visa from MDX.
Secondly, you will have to exit the country before the grace period ends and send us a copy of the following documents via email at firstname.lastname@example.org
Copy of status change if you are changing the visa inside country.
Passport data page
Exit stamp page
Visa office will then guide you further on how to apply for visa deposit refund(minus the cancellation charges)