The plug-in interface for IReadGradesHandler is used by IPSIS Adapters to support read operation for Grades.
The interface implementation is D2L.IM.IPSIS.OrgUnits.Memberships.Handlers.IReplaceEnrollmentHandler.
The following configuration lists for the ReadGradesHandler Interface are shipped with the product. They are listed along with the Extension point they are intended for.
IPSIS, Template - Grades
- ReadGradesGradableMappingGetFirstMappingWithGradesHandler (Sort Order = 10)
- ReadGradesResolveGradeTypeFromCourseSettingHandler (Sort Order = 20)
- ReadGradesStatusDefaultAllHandler (Sort Order = 30)
- ReadGradesDisplayTypeDefaultPointsHandler (Sort Order = 40)
- ReadGradesValidateHandler (Sort Order = 50)
- ReadGradesGetGradesForSectionMappingHandler (Sort Order = 60)
- ReadGradesFilterBySISEnrollmentsHandler (Sort Order = 70)
ReadGradesGradableMappingDefaultToFirstMappingHandler
A single orgUnit object in the SIS might be mapped to multiple OrgUnits in Brightspace. For example, this can happen with the default handlers for a section that is part of one or more section associations. When the input contains an SISId for an OrgUnit but no mapping, a single mapping needs to be selected from the set. The Default to First Mapping handler simply picks the first mapping in the list returned from the database.
Implementation
D2L.IM.IPSIS.Default.Grades.Handlers.ReadGradesGradableMappingDefaultToFirstMappingHandler
Expected behavior
The handler performs the following tasks:
- If there is already an OrgUnitMapping attached to the request, the handler does nothing.
- Otherwise, if there is no SisId on the request, the handler throws an IncompleteRequestException.
- If the SisId exists, the handler looks up the OrgUnit Mappings in the database.
- If there are multiple mappings returned, the handler selects the first one from the list. This is generally the one that has the lowest Id, meaning that it was mapped first.
- The request object Mapping is updated with this value. This information is available to later handlers.
Error behavior
If there is a problem during processing, an exception is thrown, along with as much detailed information as possible.
Configuration note
- The GradableMapping handler should be placed before actual grades are retrieved from the database.
- There are planned handlers that use other criteria to select a mapping, including picking the first mapping with grades or the one marked as gradable. To avoid confusion, only one such GradableMapping handler should be used in a given configuration list.
ReadGradesGradableMappingGetIsGradableMappingHandler
A single orgUnit object in the SIS might be mapped to multiple OrgUnits in Brightspace. For example, this can happen with the default handlers for a section that is part of one or more section associations. When the input contains an SISId for an OrgUnit but no mapping, we need to select a single mapping from the set. The Get Is Gradable Mapping handler picks the first mapping which is marked as Is Gradable.
Implementation
D2L.IM.IPSIS.Default.Grades.Handlers.ReadGradesGradableMappingGetIsGradableMappingHandler
Expected behavior
The handler performs the following tasks:
- If there is already an OrgUnitMapping attached to the request, the handler does nothing.
- Otherwise, if there is no SisId on the request, the handler throws an IncompleteRequestException.
- If the SisId exists, the handler looks up its OrgUnit Mappings in the database.
- If there are multiple mappings returned, the handler selects the first one that has the is gradable flag set to true. If there is no such mapping, the handler throws a NoGradableSectionsException.
- If multiple mappings are set to gradable, the handler throws a MultipleGradableSectionsException.
- The request object Mapping is updated with this value. This information is available to later handlers.
Error behavior
If there is a problem during processing, an exception is thrown, along with as much detailed information as possible.
Configuration notes
- The GradableMapping handler should be placed before actual grades are retrieved from the database.
- There are handlers that use other criteria to select a mapping, including picking the first mapping with grades or just the first mapping in general. To avoid confusion, only one such GradableMapping handler should be used in a given configuration list.
ReadGradesResolveGradeTypeFromCourseSettingHandler
When a grade type (final adjusted/calculated) is not yet set (via a translator or earlier handler), this handler sets the grade type based on the relevant config variable (Grades.Calculation.ReleaseAdjustedGrade).
The handler reads the setting from the course offering and not the section. It grabs the parent org unit mapping (course offering) for config variable access.
Implementation
D2L.IM.IPSIS.Default.Grades.Handlers.ReadGradesResolveGradeTypeFromCourseSettingHandler
Expected behavior
The handler performs the following tasks:
- If the grade type is not yet set, retrieve the config variable for GradeType. It is controlled by a grade book setting.
- Set the grade type (either final calculated or final adjusted).
Error behavior
If there is a problem during processing, an exception is thrown, along with as much detailed information as possible.
Configuration note
The ResolveGradeType handler should occur before the actual grades are retrieved from the database (i.e. before ReadGradesGetGradesForSectionHandler) and after selecting the Mapping.
ReadGradesStatusDefaultAllHandler
This handler sets the grade status to All.
Implementation
D2L.IM.IPSIS.Default.Grades.Handlers.ReadGradesStatusDefaultAllHandler
Expected behavior
If the grade status is not yet set, set the grade status to All.
Configuration notes
- The StatusDefault handler must occur before the DisplayTypeDefault (Points or Symbols) handler.
- The StatusDefault handler should occur before the actual grades are retrieved from the database (ie before ReadGradesGetGradesForSectionMappingHandler).
- This StatusDefault handler should not be used in conjunction with any other StatusDefault handler.
ReadGradesGetGradesForSectionMappingHandler
The ReadGradesGetGradesForSectionMappingHandler retrieves the grades from the database.
Implementation
D2L.IM.IPSIS.Default.Grades.Handlers.ReadGradesGetGradesForSectionMappingHandler
Expected behavior
The handler performs the following tasks:
- If the input SIS Id does not correspond to a Section in the IM tables, the handler throws an exception.
- Otherwise, the handler retrieves the actual Grades from the Grades Manager, filtered by the options set so far.
- Retrieves the SIS Enrollments for all users enrolled in the specified OrgUnit from the Mapping.
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 occur after any handler that sets the request Type, Status, or Mapping, but before the Grades are filtered.
ReadGradesValidateHandler
The ReadGradesValidateHandler validates that all required properties have been set, and the orgUnit is of a type that supports grades in the Brightspace.
Implementation
D2L.IM.IPSIS.Default.Grades.Handlers.ReadGradesValidateHandler
Expected behavior
- If the input SIS Id does not correspond to a Section of Offering in the IM tables, the handler throws an exception.
- Otherwise, the handler validates that the GradeType and GradeStatus on the request object have been set by previous translators and/or handlers.
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 occur after the type and status are selected, but before actually reading the grades from the database.
ReadGradesMatchGradesToSISEnrolledUsersHandler
The ReadGradesMatchGradesToSISEnrolledUsersHandler accepts a list of grades, and returns a list of grades paired with SIS UserIds. Any grades that do not correspond to SIS Enrolled users are omitted.
Implementation
D2L.IM.IPSIS.Default.Grades.Handlers.ReadGradesIncludeOnlySISEnrolledUsersHandler
Expected behavior
The Grades manager returns all Grades for the OrgUnit, but those Grades correspond to an LMS UserId, not an SIS UserId. This handler determines the appropriate SIS UserId for each Grade, and returns a set of Grade/SISUserId pairs. If there is no SIS UserId for a given user, the associated Grade is omitted from the results.
The handler performs the following tasks:
- Retrieve a list of Enrollments for the current OrgUnit.
- For each one, determine the SIS UserId of the enrolled User.
- Find the first IGrade matching that User, if any.
- Create a new object encapsulating pairs of IGrade and SISUserId, and attach it to the response.
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 occur after reading the grades from the database.
- This handler is necessary to allow the SIS to match grades to users using an Id they understand. This handler (or a customized replacement) should always be configured.
ReadGradesStatusDefaultReleasedOnlyHandler
The ReadGradesStatusDefaultReleasedOnlyHandler handler sets the grade type to Released.
Implementation
D2L.IM.IPSIS.Default.Grades.Handlers.ReadGradesStatusDefaultReleasedOnlyHandler
Expected behavior
If the grade type is not yet set, set the grade type to Released.
Error behavior
If there is a problem during processing, an exception is thrown, along with as much detailed information as possible.
Configuration notes
- The StatusDefault handler must occur before the DisplayTypeDefault (Points or Symbols) handler.
- The StatusDefault handler should occur before the actual grades are retrieved from the database (i.e., before ReadGradesGetGradesForSectionMappingHandler).
- This StatusDefault handler should not be used in conjunction with any other StatusDefault handler.
ReadGradesGradableMappingGetFirstMappingWithGradesHandler
The ReadGradesGradableMappingGetFirstMappingWithGradesHandler sets the org unit mapping to the first (sorted by orgunitmapping id) which has available grades.
Implementation
D2L.IM.IPSIS.Default.Grades.Handlers.ReadGradesGradableMappingGetFirstMappingWithGradesHandler
Expected behavior
The handler performs the following tasks:
- If the org unit mapping is not set, the handler grabs all org unit mappings which match the external identifier and sorts them by org unit mapping id.
- The handler checks for the first one which has a grade marked as available. Checked grades are pulled based on the related offering grade type flag (i.e., if the section's course offering is configured to release FinalAdjusted, then the handler checks for Available Final Adjusted grades). Available means that the grade either has a numerator that is greater than 0, or has a symbol set. Essentially availability means the grade has a set value in that section.
- The handler sets the request org unit mapping to that mapping.
Error behavior
- If there is a problem during processing, an exception is thrown, along with as much detailed information as possible.
- If no org unit mappings are found, an OrgUnitMappingNotFoundException is thrown.
- If no grades are found for any of the org unit mappings, then a NoGradableSectionFoundException is thrown.
Configuration notes
- This handler should be placed before the grades are actually read from the database. It should also be placed before any handler which needs to know the org unit it's working on (such as the handler which tries to read org unit configuration).
- This handler is one of many which selects an org unit mapping. There should never be more than one of these such handlers in the active configuration at one time.
ReadGradesDisplayTypeDefaultPointsHandler
The ReadGradesDisplayTypeDefaultPointsHandler sets the grade display type to Points. This affects the display in the Grades Export UI, as well as the grades sent to the SIS.
Implementation
D2L.IM.IPSIS.Default.Grades.Handlers.ReadGradesDisplayTypeDefaultPointsHandler
Expected behavior
If the grade display type is not yet set, the handler sets the grade display type to Points.
Error behavior
If there is a problem during processing, an exception is thrown, along with as much detailed information as possible.
Configuration notes
- The DisplayTypeDefault handler should occur before the actual grades are retrieved from the database (i.e., before ReadGradesGetGradesForSectionMappingHandler).
- This DisplayTypeDefault handler should not be used in conjunction with any other DisplayTypeDefault handler.
ReadGradesDisplayTypeDefaultSymbolsHandler
The ReadGradesDisplayTypeDefaultSymbolsHandler sets the grade display type to Symbols. This affects the display in the Grades Export UI, as well as the grades sent to the SIS.
Implementation
D2L.IM.IPSIS.Default.Grades.Handlers.ReadGradesDisplayTypeDefaultSymbolsHandler
Expected behavior
If the grade display type is not yet set, the handler sets the grade display type to Symbols.
Error behavior
If there is a problem during processing, an exception is thrown, along with as much detailed information as possible.
Configuration notes
- The DisplayTypeDefault handler should occur before the actual grades are retrieved from the database (i.e., before ReadGradesGetGradesForSectionMappingHandler).
- This DisplayTypeDefault handler should not be used in conjunction with any other DisplayTypeDefault handler.