sofhouse / moodle-enrol_coursepilot

Plugin that allows managing Courses and Enrollments using Web services
GNU General Public License v3.0
0 stars 0 forks source link

enrol_coursepilot Enroll user in formations course #5

Open dvdcastro opened 1 month ago

dvdcastro commented 1 month ago

Story

As a web service consumer I can enroll/unenroll a user into a formations course using a web service function

AC

  1. Exists new web service function, enrol_coursepilot_edit_enrollment with the following parameters
    1. courseid: INT, Mandatory, Reference to a course that lives under one of the formations course categories
    2. userid: INT, Mandatory, Reference to a user id
    3. action: enroll or unenroll
  2. Upon calling this web service function
    1. The user is enrolled if the enroll action is used and they are not already enrolled in the course.
    2. The user is unenrolled if the unenroll action is used and they are enrolled in the course.
    3. An exception is thrown otherwise