The plug-in interface for IDeleteSectionAssociationHandler is used by IPSIS Adapters to delete SectionAssociations from the Brightspace.
The interface implementation is D2L.IM.IPSIS.OrgUnits.SectionAssociations.Handlers.IDeleteSectionAssociationHandler.
The IPSIS, Template - Section Association configuration list provides a starting point for any IPSIS implementation.
The following handler list is used as a starting point:
- DeleteSectionAssociationValidateHandler (Sort Order = 10)
- DeleteSectionAssociationIMHandler (Sort Order = 20)
DeleteSectionAssociationValidateHandler
The DeleteSectionAssociationValidateHandler 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.SectionAssociations.Handlers.DeleteSectionAssociationValidateHandler
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 the service expects matches the Type of the orgUnit in the database.
- 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.
DeleteSectionAssociationIMHandler
The DeleteSectionAssociationIMHandler 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.SectionAssociations.Handlers.DeleteSectionAssociationValidateHandler
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 the service expects matches the Type of the orgUnit in the database.
- 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.
DeleteSectionAssociationIMHandler
The DeleteSectionAssociationIMHandler does a soft-delete of the SectionAssociation in the IM Tables.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.SectionAssociations.Handlers.DeleteSectionAssociationIMHandler
Expected behavior
The handler performs the following tasks:
- Marks the SectionAssociation as Deleted in the IM OrgUnits Table.
- Removes the Hierarchy records for the SectionAssociation.
- If there is a problem during processing, the handler sets the status of the result to the appropriate error code.
- If everything is successful, 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
The IM Delete handler should occur last.
DeleteSectionAssociationInactiveLMSOfferingHandler
The DeleteSectionAssociationInactiveLMSOfferingHandler is used if the desired behavior is to have all mapped LMS Offerings inactivated.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.SectionAssociations.Handlers.DeleteSectionAssociationInactiveLMSOfferingHandler
Expected Behavior
The handler performs the following tasks:
- Inactivate all Course Offerings associated with the specified SectionAssociation in the LMS. This handler marks all mappings to LMS Course Offerings as inactive.
- If everything is successful, the handler 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 Notes
This handler must run before the DeleteIM Handler.
DeleteSectionAssociationDeleteLMSGroupSectionHandler
The DeleteSectionAssociationDeleteLMSGroupSectionHandler is used if the desired behavior is to delete any LE Groups or Sections that are associated with an LE Course Offering assigned to the Section Association.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.SectionAssociations.Handlers.DeleteSectionAssociationDeleteLMSGroupSectionHandler
Expected Behavior
This handler can only proceed if there is a mapping for the Section Association record itself. The handler performs the following tasks:
- For each LMS OrgUnit that the Section Association is mapped to, the handler determines the LMS OrgUnit's children in the Brightspace
- For each such LMS Group or Section child of an OrgUnit that the SA is mapped to, the handler, deletes the LMS Group/Section (automatically resulting in an audit entry) and deletes all IM Mapping records associated with the LMS Group/Section.
- If everything is successful, the handler 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 handler must run before the DeleteIM Handler
- If this handler is used together with the DeleteLMSOffering handler, DeleteLMSGroupSection must precede DeleteLMSOffering.
DeleteSectionAssociationDeleteLMSOfferingHandler
The DeleteSectionAssociationDeleteLMSOfferingHandler is used if the desired behavior is to have the Brightspace Course Offering associated with the Section Association deleted.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.SectionAssociations.Handlers.DeleteSectionAssociationDeleteLMSOfferingHandler
Expected Behavior
For each mapped LMS Course Offering, the handler performs the following tasks:
- If the Offering has no more Mapped Sections as its children (need to compare all children of Offering to org units in IM Mapping table), the handler deletes the LMS Course Offering (Automatically resulting in an audit entry).
- If the offering has more Mapped Section as its children, the handler does not delete the LMS Course Offering.
- The handler does a soft-delete of the IM Mapping record associated with the Offering.
- If everything is successful, the handler 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 Notes
This handler must run before the DeleteIM Handler.
DeleteSectionAssociationUnenrolLMSGroupSectionHandler
The DeleteSectionAssociationUnenrolLMSGroupSectionHandler unenrolls users from any sections that are to be removed from the association.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.SectionAssociations.Handlers.DeleteSectionAssociationUnenrollLMSGroupSectionHandler
Expected behavior
This handler only runs if there is a mapping for the Section Association and there are associated sections (with a mapping) to be removed from the LMS. The handler performs the following tasks:
- For each Section in the Section Association Hierarchy, the handler determines which users are enrolled in the Section (from the IM Enrollments Table).
- Unenrolls the users from the specific LMS Course Section that is the be removed (automatically resulting in an audit entry).
- If everything is successful, the handler 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 handler should be placed before the DeleteLMSGroupSection handler to ensure no enrollments remain in the LMS that shouldn't.
DeleteSectionAssociationUnenrolLMSOfferingHandler
The DeleteSectionAssociationUnenrolLMSOfferingHandlerUnenrolls users from the offering parents of the deleted section mapping unless they're enrolled in another group/section with the same group type under the offering.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.SectionAssociations.Handlers.DeleteSectionAssociationUnenrolLMSOfferingHandler
Expected behavior
This handler only runs if there is a mapping for the Section Association and there are associated sections (with a mapping) to be removed from the LMS. The handler performs the following tasks:
- For each Section in the Section Association Hierarchy, the handler determines which users are enrolled in the Section (from the IM Enrollments Table).
- If the User is not enrolled in any Sections (or Groups) with the same group type, under the LMS Offering, the handler unenrolls the users from the LMS Course Offering that is the be removed (automatically resulting in an audit entry).
- If everything is successful, the handler 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 notes
- This handler should be placed after the Create IM handler.
- This handler should be placed before the DeleteLMSGroupSection handler to ensure no enrollments remain in the LMS that shouldn't.
- This handler should be placed before the Save IM handler.