I am working on course enrollment automation script.
I am using code of /admin/tool/uploaduser/index.php
Basically I am using same file what Brian Pool did in this discussion. https://moodle.org/mod/forum/discuss.php?d=105653#p1349386
My concern is when I ran code it keep shows following error.
|Unknown role "student"|
I drill down to issue and found out that following line of code is not executing. I have no idea why.
$rolecache = uu_allowed_roles_cache(); // Course roles lookup cache.
I am very new to moodle and not very expert in php programming.