Moodle | Totara | Create bulk enrollments from command line

| By Webner

1. Go Home ► Site administration ► Development ► Debugging and set Debug messages with “DEVELOPER: extra debug messages for developers”.

2. Create a testcourse.bash file in root directory with :

for i in {1..100}
echo $var
php admin/tool/generator/cli/maketestcourse.php --shortname=$var --size=S

3. Run “bash testcourse.bash” command from command line.

Notes :

*In this script we are creating 100 courses with shortnames like (Course_from_script_1, Course_from_script_2, Course_from_script_3……).

*–size=S means enroll 100 users in every course. Available sizes (XS, S, M, L, XL, or XXL).

*Users are created by the system with email like

Leave a Reply

Your email address will not be published. Required fields are marked *