Delegates enrolled onto Moodle courses via API bypass enrollment duration

Delegates enrolled onto Moodle courses via API bypass enrollment duration

by Ellen Greyling -
Number of replies: 0

Hiya! 

We're having a bit of an issue with our API integration with Moodle, and I was wondering if you could help? Whenever a delegate is passed over to Moodle from our TMS to Moodle, it ignores any enrollment durations set by the admin on the Moodle side and enrolls the delegate onto the elearning course with an open-ended duration. We use web service call "enrol_manual_enrol_users" to enrol users and pass across : userid, courseid, roleid. We're wondering if we need to amend our code to include start time and end time, or if this should be picked up automatically on the Moodle end? Moodle seems to automatically populated enrollment durations for all other delegates that are enrolled via manual enrollments, including via import.

 

HTR:

  1. Enroll user onto course on TMS side
  2. Delegate is passed across to Moodle via API
  3. Delegate is enrolled onto course, but without enrollment duration

Would expect enrollment duration to be automatically populated when delegate is manually enrolled via API


Average of ratings: -