Moodle | Totara | Create bulk enrollments from command line

Author - Kailash
10.11.2017
|
0 Comments
|

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}
do
var="Course_from_script_$i"
echo $var
php admin/tool/generator/cli/maketestcourse.php --shortname=$var --size=S
done

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 @example.com.

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Leave a Reply

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

Send your message