Moodle: LMS Enrollment Data Integration is only returning one enrollment record

Reported Issue

Grades not syncing with Moodle - checking the LMS data from Course Section -> "Enrollments from LMS", the symptom here was that there is only one LMS enrollment record being returned by the API for every course section.

SS&E Engineering Analysis

  1. Creating a new external web service in Moodle exposed the core_enrol_get_enrolled_users.
  2. Calling this service uncovered that email addresses were not being included in the result.
  3. Because the SS&E enrollments plugin works by creating a map keyed upon email address, the SS&E (Aviso) enrollments web service was not working.

To summarize, our analysis found that the reason the local_aviso_enrollments_by_moodle_id service was only returning one record was that all students had the same email address (i.e. an empty email address) and for that reason, each one was overwriting the previous one until it reached the end of the enrolled student list.

OpenLMS Analysis

OpenLMS support identified that the email address field on the users table was hidden and inaccessible by the SS&E (Aviso) user.

Resolution Steps

Once the client granted explicit permission for moodle/course:viewhiddenuserfields to the SS&E (Aviso) user via the role, this allowed the local_aviso_enrollments_by_moodle_id to return the expected results.

Note: SS&E Engineering confirmed that both the LMS plugin code and Moodle configuration did not change. As we are unable to determine why the permissions suddenly changed to restrict the SS&E (Aviso) user from accessing the student email addresses, a complete resolution to prevent this from happening again will require additional follow-up from OpenLMS that is currently pending.



Was this article helpful?
0 out of 0 found this helpful

Articles in this section

See more
How to Contact Support
There are many ways to reach out! Click here for our support options.
Watermark Academy
Click to access the Watermark Academy for consultation, training, and implementation companion courses.