# Unenrolling students/teachers

The Enterprise data can add as well as remove course enrolments - for students and for teachers. If this setting is turned on, then Moodle will carry out unenrolments when specified in the data.

There are three ways of unenrolling students within the IMS data:

- A <member> element which specifies the given student and course, and with the "recstatus" attribute of the <role> element set to 3 (which means "delete"). THIS IS NOT YET IMPLEMENTED IN THE MOODLE PLUGIN.
- A <member> element which specifies the given student and course, and with the <status> element set to 0 (which means "inactive").

The third method is slightly different. It does not require this config setting to be activated, and can be specified well in advance of the unenrolment date:

- A <member> element which specifies a <timeframe> for the enrolment can specify the begin and/or end dates for enrolment of this particular student. These dates are loaded into Moodle's enrolment data table if present, and so after the end-date, a student will no longer be able to access that particular course.