enrol_csv
Batch-enrol users from a CSV into a Moodle course, creating missing users with temporary passwords and showing status per row.
Instructions
Batch-enrol users in a course from a CSV (email,firstname,lastname[,role]). Creates missing users by default with a random temp password. Returns per-row status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| course_id | Yes | ||
| csv_content | Yes | CSV with headers email,firstname,lastname[,role]. role defaults to student. | |
| default_role_shortname | No | student | |
| create_users_if_missing | No | If true, unknown emails trigger a user creation with a random temp password. |