Forums | Mahara Community
Developers
/
Populating groups with users
23 August 2011, 10:52
Hi,
I have an external database with course IDs and course membership user ids. I would like to add an option to populate a Mahara group with users from a course with a certain ID, from my external db.
I see that plugins in Mahara can have a cron option. I would like to use this to update group membership every morning.
My question is where to make my plugin. Should I make it a grouptype? That would mean users would have to pick a certain type of group to be able to import users via a course ID. That could be a bit confusing.
Or should it be an import plugin?
Any hints or issues to be aware of?
Thanks,
Mike
23 August 2011, 11:48
Or should I just forget about plugins and build it into group/edit.php ?
23 August 2011, 17:03
Hi Mike, I'm not sure any of the existing plugin types would fit too well. I'd be tempted to use the local directory if I were doing that: put a function into local/lib.php to read the external db & populate the groups, and add a row in the cron table to call your function every morning.
24 August 2011, 3:20
Hi Richard,
Thanks for that, I hadn't come across the local directory - I will try that approach.
Mike