User enrollments via web service

There are 2 records created when a user is enrolled in a course in EthosCE, and an optional third upon completion:

All three of these records can be created and updated via web service calls. Each displays to the user in different ways. The course_enrollment allows access to the course, while the course_report is used to populate the transcript pages (Pending activities, Completed activities, and Session credit). 

The course_report complete flag controls whether or not a user has completed the course, (1  = Complete, 0 = Incomplete). Completed courses appear in the user's Completed activities or Session credit tabs, while incomplete courses appear in the Pending activities tab.

The course_credit_awarded record contains the user's credit record, if any. It is displayed on the Completed activities tab, under the Credits and Credit type columns, respectively. However it is not required for a course to display in the transcript.

The following steps should be taken when attempting to enroll user, send a completion record, or award credit to a user, via web services

  1. Locate the course NID.

    • If the course does not exist, it may be created via the web service, as either a full course or imported course. An imported course is typically located in another system and added to EthosCE for tracking. It has limited functionality, compared to a full course.

  2. Create an enrollment via web service. This will also create the course_report record. There are multiple ways to send an enrollment.

    • If you wish to create an enrollment record immediately, you can create a course enrollment record directly via web services.

    • You may also queue enrollments, via the course transcript import functionality, to be converted upon the user's next login. This technique works for existing users via uid, but is especially useful for enrolling users who do not yet exist in EthosCE, using their external identifier.

  3. If required, update the course_report record to mark the user as complete.

  4. If required, create awarded credit records using the course_credit_awarded endpoint.

    • In cases where the user is not immediately awarded credit, for instance a user manually enrolls in a course, but an external service is awarding credit, additional course_credit_awarded calls will need to be made, to award the user credit in the course. A call must be made for each individual credit type awarded.

In EthosCE, upon enrollment, in a course without required course objects, the user will be marked completed in their course_report record (course_report complete = 1), and awarded any eligible credit. This flag must be set, either in creation or via update, if intending to send a full completion record via web service for displaying on the transcript. Upon awarding credit, all eligible credit reporters will fire. For example, PARS MOC board credit or a custom credit reporter.

In a course with required course objects, the user will be enrolled, however, their course_report record will mark the user as incomplete (course_report complete = 0). They will not be awarded any eligible credit. This is common when enrolling users via web service, to allow them to take the course within EthosCE.

See Also: