[Building Sakai] About group size created from course roster by " auto groups" - Site info
Zhen Qian
zqian at umich.edu
Wed May 13 06:29:22 PDT 2009
Kimberly:
For group based on a course roster, the members should be "provided"
instead of "added" into group. The following line adds the roster id
as the provider id for the group.
> // roster provider string
> group.setProviderGroupId(roster);
Ideally, the CourseManagementService should be providing the roster
member. If you take a look at the nightly build, e.g. http://
nightly2.sakaiproject.org:8083/portal, you can get a sense from the
sample cms implementation.
Thanks,
- Zhen
On May 13, 2009, at 9:11 AM, Kimberly Ma wrote:
> 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
> ---------------------------------------------------------------
> // 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/34fe6ef3/attachment.html
More information about the sakai-dev
mailing list