rwth-acis / moodle-data-proxy

3 stars 1 forks source link

[BUG] proxy stops sending statements of a couse if one user has no role #49

Closed FBasels closed 2 years ago

FBasels commented 2 years ago
  1. Summary - If a user has no role in one course (is the case right after entering it), sending statements of this course stops with an error saying that there is no role assigned to the user.
  2. Bug Details
    1. What? - The proxy is not able to parse the role from the JSON object or some information is missing. This creates an exception and then no statement of any user from this course is sent.
    2. Where? - It happens here
    3. When?/How often? - It happens when a user has entered a course. It seems to take some time until moodle has assigned the correct course role to the student
    4. How?/Current state - Create a new user, enter a course and perform some actions in it. It will result in "Error while parsing user role in MoodleUser:" and an exception.
  3. (Optional) Fixed state - The proxy maybe should filter statements of users with no role, but other statements should be sent.
FBasels commented 2 years ago

Should be fixed now. The problem was not that the user has no role but that the role was not correctly requested. The getter of the subclass was not correctly overwriting the funciton of the abstract class and thus the userid was wrong.