November 15, 2014 - History

User Import - DEPRECATED interim method - to be automated as soon as LMS is in place.

Now use an import from Banner data

This process used the Import Users from CSV  plugin which was Last Updated: 2013-3-14 (as of 5/25/15)

Make certain Roles "student", "faculty" and "staff" exist and match the group_id's used below.

Script on gsulaw to generate a current list of CoL people at http://131.96.183.24/admin/update_wordpress.php (MyLaw req.)

Copy source of that page into a .csv file - remove any blank lines.

In WP admin dashboard for the import site, Users/Import From CSV - pick your file

Make sure "Update..." is checked and that "Notification" and "Password nag" are NOT checked!

After import is done, modify field names and group # below and run the following MySQL commands to update the groups:

INSERT IGNORE `wdpr_groups_user_group` (`user_id`, `group_id`) SELECT  `user_id`, '2' FROM `wdpr_usermeta` WHERE `meta_key`='wdpr_capabilities' AND `meta_value` LIKE '%faculty%';

INSERT IGNORE `wdpr_groups_user_group` (`user_id`, `group_id`) SELECT  `user_id`, '3' FROM `wdpr_usermeta` WHERE `meta_key`='wdpr_capabilities' AND `meta_value` LIKE '%staff%';

INSERT IGNORE `wdpr_groups_user_group` (`user_id`, `group_id`) SELECT  `user_id`, '4' FROM `wdpr_usermeta` WHERE `meta_key`='wdpr_capabilities' AND `meta_value` LIKE '%student%';

Add to 1,2,3 years groups

INSERT IGNORE `wdpr_groups_user_group` (`user_id`, `group_id`) SELECT  `user_id`, '10' FROM `wdpr_usermeta` WHERE `meta_key`='cohort' AND `meta_value` = '1';

INSERT IGNORE `wdpr_groups_user_group` (`user_id`, `group_id`) SELECT  `user_id`, '11' FROM `wdpr_usermeta` WHERE `meta_key`='cohort' AND `meta_value` = '2';

INSERT IGNORE `wdpr_groups_user_group` (`user_id`, `group_id`) SELECT  `user_id`, '12' FROM `wdpr_usermeta` WHERE `meta_key`='cohort' AND `meta_value` = '3';

group #  comes from `wdpr_groups_group`

 

Comments are closed.