An external system may utilize the storage structure of the course record import feature to send course enrollments and course completions for any user in EthosCE, including those who have not yet created an account. The latter can be accomplished by sending an import record with the user's external identifier. This is especially useful if Creating a user via web service is not an option before enrolling a user via web service. Once the user is created, and logs in for the first time, they will be matched, via e-mail address or external identifier, and enrolled in the waiting courses.
If the enrollment triggers the awarding of credit from the course, rather than the credit being contained in the import, upon awarding the credit, all eligible credit reporters will fire. For example, PARS MOC board credit or a custom credit reporter.
Querying for an existing record
...
Once verified it does not exist, a creation request can be sent. The request below will store an enrollment record for course node 200, for the user unregistered_user@you-domain.com.
Info |
---|
nid: (Optional) The course node id. external_nid: (Optional) The course's External course ID (found under Course settings). This may be used when the nid is unavailable or unknown. external_mail: The e-mail address the user will have associated to their account at the time of login imported: The import status of the record. When sending web requests, this is always 0. If set to 0, the record will be imported at next user login. If set to 1, the record has been imported previously. Upon login, the system will switch this flag to 1, preventing duplicate importing. complete: The course completion status. If set to 0, the user will be enrolled in the course, only. If set to 1, the user will be enrolled, and also marked complete, triggering any eligible credits and course completion logic. |
...