[Building Sakai] Sakai Course Management - Course Site participant list

Mike Jennings mike_jennings at unc.edu
Tue Nov 6 06:19:19 PST 2012


We too had this same issue, as our rosters were in the course management 
tables, but the information was not being reflected correctly in the 
Section Info tool on the site.

We did the same thing as David and implemented the example batch job 
found here

https://source.sakaiproject.org/svn/edu-services/trunk/cm-service/cm-authz-synchronizer/

I did make a small addition to the code that would get every group for a 
site and do the save on that group so that the groups would be refreshed 
with the save.

>                         // Sync The groups
>                         Collection<Group> groups = site.getGroups();
>                         // Currently there's no exposed way to refresh provided groups for a site. Instead,
>                         // it occurs as a side-effect of calling "save" on the site's associated AuthzGroup.
>                         for (Group group : groups) {
>                                 try {
>                                         log.info("Trying to sync gruop id for " + group.getId());
>                                         //AuthzGroup authzGroup = authzGroupService.getAuthzGroup(group.getId());
>                                         AuthzGroup authzGroup = authzGroupService.getAuthzGroup("/site/" + site.getId() + "/group/" + group.getId());
>                                         authzGroupService.save(authzGroup);
>                                 } catch (GroupNotDefinedException e) {
>                                         log.warn("AuthzGroup for site " + site.getId() + " not found", e);
>                                         continue;
>                                 } catch (AuthzPermissionException e) {
>                                         log.warn("Unable to synchronize AuthzGroup for site " + site.getId(), e);
>                                         continue;
>                                 }
>                         }


Mike



==============================================================================
Mike Jennings
Teaching and Learning Developer
University of North Carolina at Chapel Hill

Office: (919) 843-5013
Cell: (919) 698-3746
E-mail: mike_jennings at unc.edu

On 11/6/2012 8:20 AM, David Horwitz wrote:
>
> On 11/06/2012 03:15 PM, Aaron Zeckoski wrote:
>> The first initial upload of this file, will create all the users in the file
>> as Sakai users. The problem we now have is that when a user already exist in
>> Sakai, and we make changes to the upload file (for example, adding more
>> users to the Course Management data), the Site participant list does not
>> reflect the new users that I added, only when clicking on the button "Update
>> Participants", the new users are added to the participant list. I thought
>> that they would have been added automatically or is this not the case?
>>
>
> Realm memberships are cached as they are expensive to calculate on the
> fly. The get updated in 2 ways:
>
> - when the realm is saved (as in your example) - members of that realm
> - when a user logs in - that users memberships
>
>
> We have a quartz job that saves the realms of all current course sites
> during the night ...
>
> D
>
>
>> Regards,
>>
>> Jaco Gillman
>>
>> Java Developer
>>
>> opencollab
>>
>> Tel: +27 21 970 4017  |  Fax: +27 21 914 3098
>>
>> Email: jaco at opencollab.co.za  |  Skype: gillmanjc
>>
>> Web: www.opencollab.co.za
>>
>>
>>
>> _______________________________________________
>> sakai-dev mailing list
>> sakai-dev at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>
>> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org
>> with a subject of "unsubscribe"
>>
>>
>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>


More information about the sakai-dev mailing list