From: Antony C. <an...@sm...> - 2006-04-06 13:50:44
|
Naomi has been working on functionality to allow users to email all (and individual) members of groups that they belong to. The list of groups is found by the following select statement: Group.findGroups("name like '" + zonePrefix + ".%' and group_id in (select group_id from members where user_id=" + user.getUserId().intValue() + ")"); at uhi e.g. students and staff are in the 'uhi' zone so this will ignore bodington default groups (allusers, allstaff... etc.) and localgroup.owners/adhoc. This is pretty general so could I guess go into head. Have a look at http://www.dev.clan.uhi.ac.uk/site/ - login uhistdnt3/uhistdnt3. The tricky bit is presenting groups in a logical way. E.g. we have uhi.uh.upel70309.staff and uhi.uh.upel70309.students (zone.faculty.module.*) so we have some String searching to find the corresponding group name depending whether the user is staff or student and presenting the user with the option of selecting staff or student for a given group. This wouldn't be so easy to generalise but could possibly be done with a regx set in template or bodington.properties - depends of course on how an institution names groups and if this is consistent. However, it's not essential and all groups could just be presented with full description. Any interest in this functionality out there? Any suggestions? Cheers, Antony -- Antony Corfield, UHI e-Frameworks developer |