[Building Sakai] About group size created from course roster by " auto groups" - Site info
Kimberly Ma
this4it at gmail.com
Wed May 13 06:11:38 PDT 2009
Hi, Zhen,
On Sakai2.6 testing, we found out that when we created a group for a course
*roster (not from role)* using "manage groups" - "Auto groups", the group is
created but the size of the group is zero, no member was added to that
group. I searched on jira and found SAK-14994,
The "auto groups" choice in Manage Groups should create separate group for
each section/role selected,
by looking at the code , you can see that no adding member function is
called when creating group for( !rosterList.isEmpty() ( if statement)). Is
there a designintention behind this ?
Thanks,
-Kim
Rutgers, OIRT
in
/site-manage/trunk/site-manage-group-section-role-helper/tool/src/java/org/sakaiproject/site/tool/helper/managegroupsectionrole/impl/SiteManageGroupSectionRoleHandler.java<http://source.sakaiproject.org/viewsvn/site-manage/trunk/site-manage-group-section-role-helper/tool/src/java/org/sakaiproject/site/tool/helper/managegroupsectionrole/impl/SiteManageGroupSectionRoleHandler.java/?rev=54706&view=diff&r1=54706&r2=54705&p1=/site-manage/trunk/site-manage-group-section-role-helper/tool/src/java/org/sakaiproject/site/tool/helper/managegroupsectionrole/impl/SiteManageGroupSectionRoleHandler.java&p2=/site-manage/trunk/site-manage-group-section-role-helper/tool/src/java/org/sakaiproject/site/tool/helper/managegroupsectionrole/impl/SiteManageGroupSectionRoleHandler.java>
---------------------------------------------------------------
// go and create the new group
if (!rosterList.isEmpty())
{
for (String roster:rosterList)
{
Group group = site.addGroup();
group.getProperties().addProperty(SiteConstants.GROUP_PROP_WSETUP_CREATED,
Boolean.TRUE.toString());
// roster provider string
group.setProviderGroupId(roster);
// set title
group.setTitle(roster);
}
}
// role based
if (!roleList.isEmpty())
{
for(String role:roleList)
{
Group group = site.addGroup();
group.getProperties().addProperty(SiteConstants.GROUP_PROP_WSETUP_CREATED,
Boolean.TRUE.toString());
group.getProperties().addProperty(SiteConstants.GROUP_PROP_ROLE_PROVIDERID,
role);
// add users with role selected into group
Set roleUsers = site.getUsersHasRole(role);
for (Iterator iRoleUsers =
roleUsers.iterator(); iRoleUsers.hasNext();)
{
String roleUserId = (String)
iRoleUsers.next();
Member member =
site.getMember(roleUserId);
group.addMember(roleUserId, role,
member.isActive(), false);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090513/594c1d09/attachment.html
More information about the sakai-dev
mailing list