What is your method for enrolling students? I wrote an external function for unenrolling students in PERL using the REST api that is very simple and easy to use with the LWP agent.
I can help you with that if it fits into your system.
-Richard Gillette