The plug-in interface for IDeleteCourseSectionHandler is used by IPSIS adapters to delete course sections from Brightspace.
The interface implementation is D2L.IM.IPSIS.OrgUnits.CourseSections.Handlers.IDeleteCourseSectionHandler.
The following configuration list provides a starting point for any IPSIS implementation:
IPSIS, Template - Course Section
- DeleteCourseSectionValidateHandler (Sort Order = 10)
- DeleteCourseSectionIMHandler (Sort Order = 20)
DeleteCourseSectionValidateHandler
The DeleteCourseSectionValidateHandler should always be used. It performs input validation that is needed to ensure that all the other Delete handlers perform properly.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseSections.Handlers.DeleteCourseSectionValidateHandler
Expected behavior
The handler performs the following tasks:
- Checks that the SIS Id on the request corresponds to a real item in the IM tables.
- Checks that the OrgUnit Type that the service expects matches the Type of the orgUnit in the database.
- Checks that the section does not have any SectionAssociation parents (these must be removed using the SA services beforehand).
- If all checks pass, the handler saves the ExternalOrgUnitInfo on the request for later handlers to use.
Error behavior
If any part of the validation fails, an exception is thrown, along with as much detailed information as possible.
Configuration note
The Validate handler should typically be run first in the list of handlers, before any handler that updates or deletes information from the database.
DeleteCourseSectionIMHandler
The DeleteCourseSectionIMHandler marks the section as deleted in the IPSIS tables, but has no effect on Brightspace. If enrollments or Brightspace org units should be affected, additional handlers are required.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseSections.Handlers.DeleteCourseSectionIMHandler
Expected behavior
If there is anything dependent on the course section (ex. IM enrollments not deleted) this must fail. The handler performs the following tasks:
- Completes a soft-delete of the course section from the IM External OrgUnit Table (but not the Mappings).
- Removes of all IM Hierachy references to the section.
- Processing continues to the next configured handler.
Error behavior
If there is a problem during processing, an exception is thrown, along with as much detailed information as possible.
Configuration note
The Delete IM handler should typically be run last in the list of handlers.
DeleteCourseSectionLEHandler
The DeleteCourseSectionLEHandler is used if the desired behavior is to have all mapped Brightspace sections removed. Unless all remaining active users are deleted or inactivated, they remain enrolled in any parent offerings. You can use the DeleteCourseSectionCascadeDeleteEnrollmentHandler to delete any remaining users from the Sections.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseSections.Handlers.DeleteCourseSectionLEHandler
Expected behavior
For each mapped course section the handler:
- Deletes the course section (automatically generating an audit entry).
- Marks the IM mapping as deleted.
- Continues processing to the next configured handler.
Error behavior
If there is a problem during processing, an exception is thrown, along with as much detailed information as possible.
Configuration note
This must occur before the IM table delete (example: DeleteCourseSectionIMHandler).
DeleteCourseSectionCascadeDeleteEnrollmentHandler
If there are any remaining active enrollments that are dependent on the Section that is deleted, the configured IPSIS Platform handlers for IDeleteEnrollmentHandler are used to apply the desired behavior for deleting enrollments for the organization.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseSections.Handlers.DeleteCourseSectionCascadeDeleteEnrollmentHandler
Expected behavior
The handler performs the following tasks:
- Obtains the list of remaining enrollments that have not been deleted for the section.
- Uses the IDeleteEnrollmentHandler interface to delete them all.
- Processing continues to the next configured handler.
Error behavior
- If there is a problem during processing, an exception is thrown, along with as much detailed information as possible.
- This handler stops processing on the first enrollment that fails, returning the exception. It does not continue on to other enrollments (if they exist).
Configuration notes
- This must occur before the IM table delete (example: DeleteCourseSectionIMHandler).
- This must occur before the LMS deletes if you wish to also delete LMS Sections (example: DeleteCourseSectionLMSHandler).