To close an enrollment of a trainee, follow this route:
Trainees > Click on the trainee's name
The screen will show a list of all the courses to which the trainee is enrolled. To close the trainee's enrollment for a course, click on the checkbox next to the course. As you select courses, buttons will appear at the top of the table.
You can now click "Close enrollment".