Yarra Hills Secondary College ©2015 Bulk creation of parent accounts MoodleMoot Australia 2015
A big thank you to Mary Cooch – blogged a solution – parents-to-children-in-moodle-parent-role/ Maxime Pelletier – Moodle plugin Penny Leach – Original plugin
The problem We want parents to have access to their students’ courses Moodle requires this to be done one parent at a time – Create a parent account – Assign parent to the student – Inform parent of account details
The Solution Create Parent role – See Create cohort called Parents – this makes it easy to find parent accounts – See
The Solution Create csv file of parent data – username,password,firstname,lastname, , role1,cohort1 Example
The Solution Parent data was exported from CASES21 – NOTE: The list was crosschecked to remove any parents with access restrictions Parents without were excluded Username was family ID (from CASES21) with a f or m added for female parent or male parent – one account each Password randomly generated
The Solution Create csv file of parents, child and role – username,childusername,parent Example Note: a parent with more than one child must have a separate entry for each child.
The Solution Bulk create Parent accounts using – Site Administration Users Accounts Upload Users use csv file of parent data
The Solution Create a new table in the Moodle database Backup database first! – Table name: mdl_parent – 3 fields: parent, child, role – all varchar(255) I use phpMyAdmin to access mysql database Import data from csv file into table
The Solution Install Moodle plugin User role assignment from external database Plugin name: enrol_dbuserrel Go to Settings>Site administration>Notifications to enable plugin
The Solution Manage the setting for the dbuserrel plugin – Map new database fields to Moodle fields
The Solution
Enable plugin – Administration > Plugins > Enrolments > Manage enrol plugins – ( Turn eye on )
The Solution Run the synchronisation cron – Run Command Prompt – Navigate to PHP directory containing php.exe (eg. c:\Program Files (x86)\PHP\v5.6) – Execute php.exe –f "c:\inetpub\wwwroot\moodledev\enrol\ dbuserrel\cli\sync.php” Note: This step removes all previous parent roles
The Solution Bulk parents with their details using Word Mail Merge
Questions PowerPoint: