The plug-in interface for IDeleteCourseOfferingHandler is used by IPSIS Adapters to delete course offerings from Brightspace.
The interface implementation is D2L.IM.IPSIS.OrgUnits.CourseOfferings.Handlers.IDeleteCourseOfferingHandler.
The following configuration lists provide a starting point for any IPSIS implementation:
IPSIS, Template - Course Offering
- DeleteCourseOfferingValidateHandler (Sort Order = 10)
- DeleteCourseOfferingIMHandler (Sort Order = 10)
DeleteCourseOfferingValidateHandler
This handler 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.CourseOfferings.Handlers.DeleteCourseOfferingValidateHandler
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.
- If all checks pass, 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.
DeleteCourseOfferingIMHandler
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.DeleteCourseOfferingIMHandler
Expected behavior
If there is anything dependent on the course offering (IM Hierarchy children) this process must fail. The handler performs the following tasks:
- Does a soft-delete of the course offering from the IPSIS tables if there is nothing dependent on the course offering.
- Removes all IM Hierarchy parent relationships for this offering.
- Sets the status of the result is set to EntityDeleted.
- 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.
DeleteCourseOfferingDeleteLEHandler
This handler is used if the desired behavior is to have all mapped Brightspace offerings deleted.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.DeleteCourseOfferingDeleteLEHandler
Expected Behavior
For each mapped Brightspace course offering, the handler performs the following tasks:
- Deletes the course offering (automatically resulting in an audit entry).
- Marks all mappings to Brightspace course offering as deleted.
- Sets the status of the result to EntityDeleted.
- Processing continues to the next handler (Return True).
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: DeleteCourseOfferingIMHandler).
- This handler would not be configured at the same time as DeleteCourseOfferingInactiveLEHandler.
DeleteCourseOfferingCascadeDeleteCourseSectionHandler
This handler is used if the desired behavior is to cascade the delete for the course offering to all sections that are children of the course offering in the IM tables.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.DeleteCourseOfferingCascadeDeleteCourseSectionHandler
Expected behavior
The handler performs the following tasks:
- Identifies all sections that are children of an offering in the IM tables.
- For each section, the handler sends a DeleteCourseSection using the current list of handlers for IDeleteCourseSectionHandler.
- If at least one section is deleted, the handler changes the result status to EntityDeleted.
- 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 notes
- This must occur before the course offering is deleted in either the Brightspace or IM tables (ie: DeleteCourseOfferingIMHandler, DeleteCourseOfferingDeleteLEHandler, DeleteCourseOfferingInactiveLEHandler)
- This handler does not function properly unless every further configured DeleteCourseOffering handler has a matching DeleteCourseSection handler configured. For example, if using DeleteCourseOfferingCascadeDeleteCourseSectionHandler and DeleteCourseOfferingIMHandler, then DeleteCourseSectionIMHandler must also be used.