The plug-in interface for IReplaceCourseOfferingHandler is used by IPSIS Adapters to support the replace operation for course offerings.
The interface implementation is D2L.IM.IPSIS.OrgUnits.CourseOfferings.Handlers.IReplaceCourseOfferingHandler.
The following configuration lists for the ReplaceCourseOfferingHandler Interface are shipped with the product. They are listed along with the extension point they are intended for.
IPSIS, Template - Course Offering
- ReplaceCourseOfferingReadHandler (Sort Order = 10)
- ReplaceCourseOfferingValidateHandler (Sort Order = 20)
- ReplaceCourseOfferingDisallowParentChangesIfChildrenExistHandler (Sort Order = 30)
- ReplaceCourseOfferingTemplateUpdateDepartmentsLMSHandler (Sort Order = 40)
- ReplaceCourseOfferingCreateLMSHandler (Sort Order = 50)
- ReplaceCourseOfferingCreateIMHandler (Sort Order = 60)
- ReplaceCourseOfferingSaveLMSHandler (Sort Order = 70)
- ReplaceCourseOfferingSaveIMHandler (Sort Order = 80)
ReplaceCourseOfferingCopyCourseHandler
The ReplaceCourseOfferingCopyCourseHandler configures the system to automatically copy course content from a source course into a newly created course offering using the IPSIS platform.
Implementation
D2l.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.ReplaceCourseOfferingCopyCourseHandler.
Expected behavior
The handler performs the following tasks by searching for the org unit from which to copy content:
- If implicit course copy is enabled through the UI, attempts to find the org unit to copy from by copying from a parent template or a sibling course offering that has an OrgUnit Code matching the template OrgUnit Code.
- If explicit course copy is used, looks for “CopyCourseSourceExternalId”, “CopyCourseParent”, “CoupCourseSourceOrgUnitId”, or “CopyCourseSourceOrgUnitCode” extension fields.
Error behavior
If there is a problem during processing, an exception is thrown, along with as much detailed information as possible.
Configuration note
If you manually configure the ReplaceCourseOfferingHandler list, place this handler last.
ReplaceCourseOfferingReadHandler
The ReplaceCourseOfferingReadHandler reads all information related to the course offering that exists in Brightspace or IM tables of the database to be used in further handlers.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.ReplaceCourseOfferingReadHandler
Expected behavior
The handler performs the following tasks:
- Attempts to read information about the course offering from the IM tables.
- If found, attempts to read any mappings to Brightspace for the course offering.
- If found, attempts to read about the course offering from Brightspace.
- Checks to see if any parents (Semester, Template, or Department) were specified in the request.
- If specified, the handler attempts to retrieve mappings and OrgUnit details for each specified parent, placing them in request.ParentOrgUnits.
- If a parent SIS Id maps to multiple D2L OrgUnits, then only the first Semester or Template will be used for each SIS Id.
- If a parent was specified but it doesn't exist in the database, the underlying DataProvider throws an OrgUnitMappingNotFoundException, which is caught and logged.
- 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
A Read handler should occur before Validate handlers.
ReplaceCourseOfferingValidateHandler
This handler ensures that a valid code and name are assigned to the course offering and that a valid template exists.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.ReplaceCourseOfferingValidateHandler
Expected behavior
The handler performs the following tasks:
- Checks to ensure that both a code and name are specified for the request. These values must be strings of length greater than 0.
- If either the code or the name are null or empty, the handler throws an ArgumentNullException and all handler processing stops.
- At least one parent template must be present in request.ParentOrgUnits. If no template parents are found, a ParentNotFoundException is thrown and all handler processing stops.
- If everything is successful, processing continues to the next handler (Return True).
ReplaceCourseOfferingDisallowParentChangesIfChildrenExistHandler
This handler can be used to prevent deleting or swapping a parent template added by IPSIS for any offering that already has children. In the absence of this handler, parents added by IPSIS may be freely updated, which might alter the hierarchy information for ancestors and descendants of the current offering.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.ReplaceCourseOfferingParentDepartmentValidateHandler
Expected behavior
- If the offering already exists (replace instead of create):
- If a parent OrgUnit added by IPSIS will be removed or replaced, throw an exception to prevent any further handlers from running.
Note: manually added OrgUnits will always be removed with or without this handler in place
Configuration notes
- This handler should be configured to run after the Validate handlers.
- This handler should be configured to run before the Create handlers.
ReplaceCourseOfferingTemplateUpdateDepartmentsLMSHandler
This handler updates the course template that is the parent of the offering to have the department parents specified in the offering request.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.ReplaceCourseOfferingTemplateUpdateDepartmentsLMSHandler
Expected behavior
The handler performs the following tasks:
- Reads the departments associated with the template that is the parent of the current course offering.
- If a department is specified in the offering that is currently not assigned as a parent of the course template, the handler updates it accordingly.
- 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
Anytime after the Read handlers.
ReplaceCourseOfferingCreateLMSHandler
This handler creates course offerings in Brightspace.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.ReplaceCourseOfferingCreateLMSHandler
Expected behavior
This handler only runs if there are no Brightspace course offerings associated with the request in both the IM and the LMS tables. The handler performs the following tasks:
- Creates the course offering using the information passed in the request (triggering automatic audit logging).
- If the create process is successful, the handler sets the ReplaceRequestStatus = EntityCreated and processing continues to the next handler.
- If there is an error, the handler sets the ReplaceRequestStatus = CreateFailed and returns false.
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 is placed after any Validate handlers.
- The Create LMS handler should occur before the Create IM handler.
ReplaceCourseOfferingCreateIMHandler
This handler creates the Entity in the IM tables, and a mapping if one is defined.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.ReplaceCourseOfferingCreateIMHandler
Expected behavior
This handler only runs if there is no matching Entity in the IM tables. The handler performs the following tasks:
- Creates the course offering in the IM Platform.
- Creates the IM Hierarchy.
- If there is an OrgUnit associated with the request, the handler creates the IM Platform course offfering mapping to the Brightspace course offering.
- If everything is successful, the handler sets ReplaceRequestStatus = EntityCreated.
- 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
Place this handler after any CreateLMS handlers.
ReplaceCourseOfferingSaveLMSHandler
The ReplaceCourseOfferingSaveLMSHandler saves any changes that have been made to the Brightspace course offering.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.ReplaceCourseOfferingSaveLMSHandler
Expected behavior
This handler only runs if there are changes to be saved for the Brightspace course offering. The handler performs the following tasks:
- Removes any departments from the request ParentOrgUnits (these will be added as parents of the offering's parent template)
- Updates the course offering (triggering automatic audit logging).
- If everything is successful, if ReplaceRequestStatus != EntityCreated, the handler sets ReplaceRequestStatus = EntityUpdated.
- 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
Place this handler after any Create handlers.
ReplaceCourseOfferingSaveIMHandler
The ReplaceCourseOfferingSaveIMHandler saves any changes that have been made to the course offering.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.ReplaceCourseOfferingSaveLMSHandler
Expected behavior
This handler only runs if there are changes to be saved for the course offering. The handler performs the following tasks:
- Removes any departments from the request ParentOrgUnits (these are added as parents of the offering's parent template).
- Updates the course offering (triggering automatic audit logging).
- If everything is successful, if ReplaceRequestStatus != EntityCreated, the handler sets ReplaceRequestStatus = EntityUpdated.
- 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
Place this handler after any Create handlers.
ReplaceCourseOfferingSaveIMHandler
The save handler saves any changes that have been made to IM Entity and mappings. This includes updating the hierarchy information, and propagating changes to all ancestors and descendants of the given offering.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.ReplaceCourseOfferingSaveIMHandler
Expected behavior
This handler only runs if there are changes to be saved for the Entity or Mappings in the IM tables. The handler performs the following tasks:
- Updates the IM Entity.
- Updates the IM Hierarchy and updates relationship information for any parents/children affected.
- Updates the IM Entity mappings.
- If everything is successful, sets ReplaceRequestStatus = EntityUpdated.
- 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
Place this handler after any SaveLMS handlers.
ReplaceCourseOfferingNameNoUpdateLMSHandler
The ReplaceCourseOfferingNameNoUpdateLMSHandler is used when an organization does not want the course offering name to be updated after initial creation. This handler is necessary if an organization allows users to update course names through Brightspace.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.ReplaceCourseOfferingNameNoUpdateLMSHandler
Expected behavior
The handler performs the following tasks:
- Updates the request object to indicate that the name should not be updated.
- 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
This handler is expected to run after the Read handlers, but before the Create handlers.
ReplaceCourseOfferingStatusNoUpdateLMSHandler
This handler is used when an organization does not want status to be updated after initial creation.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.ReplaceCourseOfferingStatusNoUpdateLMSHandler
Expected behavior
The handler performs the following tasks:
- Updates the request object to indicate that the status should not be updated.
- 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
This handler is expected to run after the read handlers, but before the create.
ReplaceCourseOfferingDatesNoUpdateLMSHandler
The ReplaceCourseOfferingDatesNoUpdateLMSHandler is used when an organization does not want dates to be updated after initial creation.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.ReplaceCourseOfferingDatesNoUpdateLMSHandler
Expected behavior
The handler performs the following tasks:
- Updates the request object to indicate that the start and end dates should not be updated.
- 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
This hander is expected to run after the read handlers, but before the create handler.
ReplaceCourseOfferingCodeNoUpdateLMSHandler
The ReplaceCourseOfferingCodeNoUpdateLMSHandler is used when an organization does not want the course offering code to be updated after initial creation. This handler is necessary if an institution allows users to update course codes through Brightspace.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.ReplaceCourseOfferingCodeNoUpdateLMSHandler
Expected behavior
The handler performs the following tasks:
- Updates the request object to indicate that the code should not be updated.
- 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
This handler is expected to run after the read handlers, but before the create.
ReplaceCourseOfferingTemplateUpdateDepartmentsLMSHandler
The ReplaceCourseOfferingTemplateUpdateDepartmentsLMSHandler updates the course template that is the parent of the offering so that the department parents are specified in the offering request.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.ReplaceCourseOfferingTemplateUpdateDepartmentsLMSHandler
Expected behavior
- Read the departments (from Brightspace) associated with the template that is the parent of the current course offering.
- If a department is specified in the offering that is currently not assigned as a parent of the course template, update it accordingly.
- 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
This handler can be used anytime after the Read handlers.
ReplaceCourseOfferingValidateLMSOrgUnitExistsHandler
This handler checks to see if the org unit that the request corresponds to has been deleted in Brightspace.
Implementation
D2L.IM.IPSIS.Default.OrgUnits.CourseOfferings.Handlers.ReplaceCourseOfferingValidateLMSOrgUnitExistsHandler
Expected behavior
The handler performs the following tasks:
- Tries to get the current org unit.
- If the current org unit does not exist (either the request is a create, or the org unit was deleted from Brightspace), try to get the ExternalOrgUnitInfo for the request.
- If the ExternalOrgUnitInfo is valid, then this isn't a create, and the org unit was deleted from Brightspace. An UpdateOrgUnitFailedException is thrown.
- This exception causes the LIS Service to respond with invaliddata. This was deemed to be the most suitable response code for this situation.
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 is placed after the read handlers, usually as one of the first validate handlers.