John and Maxime,
You can do it on the database side if you're short on time.
First:
find out which WHICH ENROLMENT METHODS OR PLUGINS ARE AVAILABLE for that course
mysql> select * from mdl_enrol where courseid = '9999';
Look for "database" under the enrol field and make a note of it's id field value (i.e 5025)
Second:
Next, let's find out who the enrolled users are in that course that were enrolled through database enrolment method
mysql> select u.id, u.username, u.firstname, u.lastname, u.email, e.id as EnrolmentIDRecord , e.status, e.enrolid, e.userid, ep.id, ep.enrol, c.id, c.fullname, c.shortname, c.idnumber as CourseIDNumber from mdl_user u, mdl_user_enrolments e, mdl_enrol ep, mdl_course c where u.id = e.userid and ep.id = e.enrolid and e.enrolid = '5025' and c.id = ep.courseid and ep.courseid = '9999' order by u.lastname asc, u.firstname asc;
There you have it...
Third:
now delete the record you don't need using the "EnrolmentIDRecord" value (ie. 246810) which belongs to the table mdl_user_enrolments.
mysql> delete from mdl_user_enrolments where enrolid = '5025' and id = '246810';
Let me know how it went for you. Hope this helps and good luck.