The ITranslateCourseTemplate interface is used to translate LIS course templates into Brightspace course templates.
The interface implementation is D2L.IM.IPSIS.LIS.CMS.ITranslateCourseTemplate.
The following configuration lists provide a starting point for any LIS implementation:
IPSIS, Template
- CourseTemplateRequestBaseTranslator (Sort Order = 10)
- CourseTemplateRequestNameTitleRequiredTranslator (Sort Order = 20)
- CourseTemplateRequestDepOrgNameOptionalTranslator (Sort Order = 30)
CourseTemplateRequestBaseTranslator
The CourseTemplateRequestBaseTranslator initializes the results object and maps the OrgUnitCode and OrgUnitName based on the sourcedId in the request.
Implementation
D2L.IM.IPSIS.LIS.RequestAdapters.CMS.Default.CourseTemplateRequestBaseTranslator
Expected behavior
The translator performs the following tasks:
- The translator initializes the results object.
- Sets the OrgUnitCode and OrgUnitName to the value provided in the sourcedGUID.sourcedId.
- Processing continues to the next translator.
Entity
Property
|
Translation Result Object
|
LIS Request Mapping
|
Code
|
result.Entity.Code
|
courseTemplateRecord.sourcedGUID.sourcedId
|
Name
|
result.Entity.Name
|
courseTemplateRecord.sourcedGUID.sourcedId
|
Error behavior
If the sourcedId is not provided, an IncompleteRequestException is thrown, resulting in:
- The suspension of further processing.
- A LIS response header containing:
- CodeMajor = failure.
- Severity = status.
- CodeMinor = invaliddata.
Configuration note
This translator (or an alternative Base translator) must be configured first in the list of translators.
CourseTemplateRequestNameTitleRequiredTranslator
The CourseTemplateRequestNameTitleRequiredTranslator requires and maps a course template title.
Implementation
D2L.IM.IPSIS.LIS.RequestAdapters.CMS.Default.CourseTemplateRequestNameTitleRequiredTranslator
Expected behavior
The translator performs the following tasks:
- Updates the OrgUnitName to contain the value from the title string in the request.
- Processing continues to the next translator.
Entity
Property
|
Translation Result Object
|
LIS Request Mapping
|
Name
|
result.Entity.Name
|
courseTemplateRecord.courseTemplate.title.textString
|
Error behavior
If a course template title is not provided, an IncompleteRequestException is thrown, resulting in:
- The suspension of further processing.
- A LIS response header containing:
- CodeMajor = failure.
- Severity = status.
- CodeMinor = invaliddata.
Configuration note
Requires the Base translator to run first.
CourseTemplateRequestDepOrgNameOptionalTranslator
The CourseTemplateRequestDepOrgNameOptionalTranslator maps an org name to the department.
Implementation
D2L.IM.IPSIS.LIS.RequestAdapters.CMS.Default.CourseTemplateRequestDepOrgNameOptionalTranslator
Expected behavior
The translator performs the following tasks:
- Adds the Department Parent Mapping.
- Processing continues to the next translator.
Property
|
Translation Result Object
|
LIS Request Mapping
|
Parent DepartmentId
|
result.ParentDepartmentCode
|
courseTemplateRecord.courseTemplate.org.orgName.textString
|
Error behavior
If a course template title is not provided, an IncompleteRequestException is thrown, resulting in:
- The suspension of further processing.
- A LIS response header containing:
- CodeMajor = failure.
- Severity = status.
- CodeMinor = invaliddata.
Configuration notes
- Requires the Base translator to run first.
- This translator should not be configured with CourseTemplateRequestDepOrgNameRequiredTranslator.
CourseTemplateRequestDepOrgNameRequiredTranslator
The CourseTemplateRequestDepOrgNameRequiredTranslator requires an org name to map to the department.
Implementation
D2L.IM.IPSIS.LIS.RequestAdapters.CMS.Default.CourseTemplateRequestDepOrgNameRequiredTranslator
Expected behavior
The translator performs the following tasks:
- Adds the Department Parent Mapping from the OrgName in the LIS Request.
- Processing continues to the next translator.
Property
|
Translation Result Object
|
LIS Request Mapping
|
Parent DepartmentId
|
result.ParentDepartmentCode
|
courseTemplateRecord.courseTemplate.org.orgName.textString
|
Error behavior
If an orgName is not provided, an IncompleteRequestException is thrown, resulting in:
- The suspension of further processing.
- A LIS response header containing:
- CodeMajor = failure.
- Severity = status.
- CodeMinor = invaliddata.
Configuration notes
- Requires the Base translator to run first.
- This translator should not be configured with CourseTemplateRequestDepOrgNameOptionalTranslator.
CourseTemplateRequestTruncateOrgUnitCodeTranslator
The CourseTemplateRequestTruncateOrgUnitCodeTranslator truncates the org unit code of the result object if the code is longer than 50 characters. The truncated code is set at 50 characters.
Implementation
D2L.IM.IPSIS.LIS.RequestAdapters.CMS.Default.CourseTemplateRequestTruncateOrgUnitCodeTranslator
Expected behavior
The translator performs the following tasks:
- Checks to see if the result.Entity.Code is longer than 50 characters. If yes, the code is truncated to 50 characters.
- Processing continues to the next translator.
Configuration note
Requires the Base translator to run first.