Protect against buggy participants reports from Aalto SISU API #1180
Labels
area: enrollment
Related to course enrollments
area: student information systems
Related to student information systems (SIS), e.g. Oodi, SISU, Salesforce
effort: hours
Estimated to take less than one day, from the creation of a new branch to the merging
experience: beginner
required knowledge estimate
requester: team
The issue is raised by a person inside the A+ developer team
Milestone
Course enrollments can optionally be fetched from Student Information System such as SISU in Aalto. SISU responds with list of student numbers. Based on the list, student is enrolled in A+ if she did not exist on the course yet. On the other hand, if the student number is not on the list, the A+ enrollment is removed, if it happened as a result of this SISU message.
It has turned out that Aalto's SISU API gateway occasionally returns an empty list for all courses queried using this API because of some malfunction. This causes all students to be removed from course enrollments (and a major hassle as a result). Therefore we should add a check to the code to protect against this situation: if the response contains an empty participant list, it should be ignored.
The relevant code is in enroll_from_sis method.
Aalto-specific SISU plugin is used to carry out the API messaging in Aalto. The plugin is in separate repository. As a side note, It was noted that when SISU API returns an error code in the plugin, it would ne nice if the error handling reported the error code more clearly in logs.
The text was updated successfully, but these errors were encountered: