[Building Sakai] Course Management API integration question

Ray Davis ray at media.berkeley.edu
Fri Feb 12 11:01:33 PST 2010


I'm late to this discussion so I may be missing some context, but it 
seems wrong to configure a Spring bean with the ID 
"org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider" 
: that's an internal Sakai-supplied *class*, not a documented *ID*. I 
think there was probably some copy-and-paste confusion at some point.

What seems to be happening in the log is that Sakai is looking for the 
GroupProvider (correct) and finding the internal 
CourseManagementGroupProvider (correct), but that provider isn't finding 
the properties you set up. If I read this configuration correctly, 
that's because you're setting the properties on the wrong Spring bean: 
they need to be set on "org.sakaiproject.authz.api.GroupProvider" 
instead, as shown at:
"org.sakaiproject.authz.api.GroupProvider"

Best,
Ray

On 2/12/10 10:42 AM, Nicola Monat-Jacobs wrote:
> Looking at this: http://jira.sakaiproject.org/browse/SAK-10465
>
> I'm wondering if my xml below is still the correct way to indicate role
> resolvers. Can anyone point me to a current example? My google-fu turns
> up nothing, but perhaps I'm missing something.
>
> Thanks,
> Nicola
>
>
> On Feb 12, 2010, at 10:31 AM, Nicola Monat-Jacobs wrote:
>
>> Thanks for writing back Zhen!
>>
>> So, I reached the conclusion that even if you have a simple CM
>> implementation, you still need to implement Sections in order to see
>> anything in Worksite Setup. Now I can select sections and create them,
>> however, I'm having a problem getting the students to be added. The
>> instructor gets added to the course, and I can see from the logs that
>> the students are being found, and added as students, but when it tries
>> to save the course membership, something fails. I'd appreciate any
>> thoughts you might have.
>>
>> Thinking of your suggestion of role resolvers, I checked the
>> components.xml and I see that I have:
>>
>> <bean
>> id="org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider"
>> class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
>> singleton="true">
>> <property name="transactionManager">
>> <ref
>> bean="org.sakaiproject.springframework.orm.hibernate.GlobalTransactionManager"/>
>> </property>
>> <property name="transactionAttributes">
>> <props>
>> <prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
>> </props>
>> </property>
>> <property name="target">
>> <bean
>> class="org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider"
>> init-method="init"
>> destroy-method="destroy">
>> <property name="cmService">
>> <ref
>> bean="org.sakaiproject.coursemanagement.api.CourseManagementService"/>
>> </property>
>> <property name="rolePreferences">
>> <list>
>> <value>Instructor</value>
>> <value>Teaching Assistant</value>
>> <value>Student</value>
>> </list>
>> </property>
>> <property name="roleResolvers">
>> <list>
>> <bean
>> class="org.sakaiproject.coursemanagement.impl.provider.SectionRoleResolver">
>> <property name="roleMap">
>> <map>
>> <entry key="Instructor" value="Instructor" />
>> <entry key="Student" value="Student" />
>> </map>
>> </property>
>> <property name="officialInstructorRole" value="Instructor" />
>> <property name="enrollmentStatusRoleMap">
>> <map>
>> <entry key="0" value="Student" />
>> <entry key="1" value="Student" />
>> </map>
>> </property>
>> </bean>
>> <bean
>> class="org.sakaiproject.coursemanagement.impl.provider.CourseOfferingRoleResolver">
>> <property name="roleMap">
>> <map>
>> <entry key="Instructor" value="Instructor" />
>> <entry key="Student" value="Student" />
>> </map>
>> </property>
>> </bean>
>> <bean
>> class="org.sakaiproject.coursemanagement.impl.provider.CourseSetRoleResolver">
>> <property name="roleMap">
>> <map>
>> <entry key="Instructor" value="Instructor" />
>> <entry key="Student" value="Student" />
>> </map>
>> </property>
>> </bean>
>> </list>
>> </property>
>> </bean>
>> </property>
>> </bean>
>>
>> </beans>
>>
>> So I think I have values for everything. Here's my stacktrace:
>>
>> INFO: Synchronizing internal sections with externally defined sections
>> in site 2e14b8ea-5ba9-44f2-81f8-95b09e41225a (2010-02-12 10:19:33,911
>> http-8080-Processor23_org.sakaiproject.component.section.sakai.SectionManagerImpl)
>> DEBUG: FederatedAuthzGroupProvider :: checking
>> org.provider.LdapAdminAuthzGroupProvider at 1e72466 (2010-02-12
>> 10:19:34,359
>> http-8080-Processor23_org.provider.FederatedAuthzGroupProvider)
>> getUserRolesForGroup: null
>> DEBUG: org.provider.LdapAdminAuthzGroupProvider at 1e72466returned
>> 0results (2010-02-12 10:19:34,365
>> http-8080-Processor23_org.provider.FederatedAuthzGroupProvider)
>> DEBUG: FederatedAuthzGroupProvider :: checking
>> org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider at 13159f1
>> (2010-02-12 10:19:34,366
>> http-8080-Processor23_org.provider.FederatedAuthzGroupProvider)
>> DEBUG: ------------------CMGP.getUserRolesForGroup(null) (2010-02-12
>> 10:19:34,366
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: null is mapped to 0 sections (2010-02-12 10:19:34,367
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: _____________getUserRolesForGroup={} (2010-02-12 10:19:34,367
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG:
>> org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider at 13159f1returned
>> 0results (2010-02-12 10:19:34,368
>> http-8080-Processor23_org.provider.FederatedAuthzGroupProvider)
>> INFO: Synchronizing internal sections with externally defined sections
>> in site 2e14b8ea-5ba9-44f2-81f8-95b09e41225a (2010-02-12 10:19:35,449
>> http-8080-Processor23_org.sakaiproject.component.section.sakai.SectionManagerImpl)
>> INFO: Synchronizing internal sections with externally defined sections
>> in site 2e14b8ea-5ba9-44f2-81f8-95b09e41225a (2010-02-12 10:19:36,053
>> http-8080-Processor23_org.sakaiproject.component.section.sakai.SectionManagerImpl)
>> DEBUG: FederatedAuthzGroupProvider :: checking
>> org.provider.LdapAdminAuthzGroupProvider at 1e72466 (2010-02-12
>> 10:19:36,834
>> http-8080-Processor23_org.provider.FederatedAuthzGroupProvider)
>> getUserRolesForGroup: course1
>> DEBUG: org.provider.LdapAdminAuthzGroupProvider at 1e72466returned
>> 0results (2010-02-12 10:19:36,838
>> http-8080-Processor23_org.provider.FederatedAuthzGroupProvider)
>> DEBUG: FederatedAuthzGroupProvider :: checking
>> org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider at 13159f1
>> (2010-02-12 10:19:36,840
>> http-8080-Processor23_org.provider.FederatedAuthzGroupProvider)
>> DEBUG: ------------------CMGP.getUserRolesForGroup(course1)
>> (2010-02-12 10:19:36,840
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: course1 is mapped to 1 sections (2010-02-12 10:19:36,840
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: getSection: course1 (2010-02-12 10:19:36,840
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: getCourseOffering: course1 (2010-02-12 10:19:37,114
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: Looking for roles in section course1 (2010-02-12 10:19:37,295
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: getSectionMemberships: course1 (2010-02-12 10:19:37,296
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: Adding student1 to userRoleMap with role=Student (2010-02-12
>> 10:19:37,494
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: Adding student2 to userRoleMap with role=Student (2010-02-12
>> 10:19:37,494
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: Adding student3 to userRoleMap with role=Student (2010-02-12
>> 10:19:37,494
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: Adding student4 to userRoleMap with role=Student (2010-02-12
>> 10:19:37,494
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: Adding student5 to userRoleMap with role=Student (2010-02-12
>> 10:19:37,494
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: Adding student6 to userRoleMap with role=Student (2010-02-12
>> 10:19:37,494
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: Adding student7 to userRoleMap with role=Instructor (2010-02-12
>> 10:19:37,494
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: getSection: course1 (2010-02-12 10:19:37,494
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: getCourseOffering: course1 (2010-02-12 10:19:37,673
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: Looking for roles in section course1 (2010-02-12 10:19:37,952
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: TEST: getCourseOfferingMemberships(String courseOfferingEid)
>> (2010-02-12 10:19:37,953
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: getSection: course1 (2010-02-12 10:19:37,958
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: getCourseOffering: course1 (2010-02-12 10:19:38,234
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: Looking for roles in section course1 (2010-02-12 10:19:38,511
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: getCourseOffering: course1 (2010-02-12 10:19:38,512
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: TEST: getCanonicalCourse: course1 (2010-02-12 10:19:38,691
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> WARN:
>> org.sakaiproject.site.tool.SiteAction at 1f3f6ff.updateCourseSiteSections
>> <mailto:org.sakaiproject.site.tool.SiteAction at 1f3f6ff.updateCourseSiteSections>:
>> Problem encountered while editing the site participants. (2010-02-12
>> 10:19:38,708 http-8080-Processor23_org.sakaiproject.site.tool.SiteAction)
>> java.lang.NullPointerException
>> at
>> org.sakaiproject.coursemanagement.impl.provider.CourseSetRoleResolver.getUserRoles(CourseSetRoleResolver.java:57)
>> at
>> org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider.getUserRolesForGroup(CourseManagementGroupProvider.java:88)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> at
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
>> at
>> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
>> at
>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>> at $Proxy4.getUserRolesForGroup(Unknown Source)
>> at
>> org.provider.FederatedAuthzGroupProvider.getUserRolesForGroup(FederatedAuthzGroupProvider.java:99)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> at
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
>> at
>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
>> at $Proxy4.getUserRolesForGroup(Unknown Source)
>> at
>> org.sakaiproject.authz.impl.DbAuthzGroupService$DbStorage.refreshAuthzGroup(DbAuthzGroupService.java:1923)
>> at
>> org.sakaiproject.authz.impl.DbAuthzGroupService$DbStorage.save(DbAuthzGroupService.java:966)
>> at
>> org.sakaiproject.authz.impl.BaseAuthzGroupService.completeSave(BaseAuthzGroupService.java:592)
>> at
>> org.sakaiproject.authz.impl.BaseAuthzGroupService.save(BaseAuthzGroupService.java:578)
>> at
>> org.sakaiproject.authz.cover.AuthzGroupService.save(AuthzGroupService.java:140)
>> at
>> org.sakaiproject.site.tool.SiteAction.updateCourseSiteSections(SiteAction.java:5032)
>> at org.sakaiproject.site.tool.SiteAction.doFinish(SiteAction.java:4929)
>> at
>> org.sakaiproject.site.tool.SiteAction.doAdd_site_option(SiteAction.java:11471)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> at
>> org.sakaiproject.cheftool.VelocityPortletPaneledAction.actionDispatch(VelocityPortletPaneledAction.java:593)
>> at
>> org.sakaiproject.cheftool.VelocityPortletPaneledAction.processAction(VelocityPortletPaneledAction.java:509)
>> at org.sakaiproject.cheftool.ToolServlet.doGet(ToolServlet.java:221)
>> at
>> org.sakaiproject.cheftool.VelocityPortletPaneledAction.doGet(VelocityPortletPaneledAction.java:1007)
>> at org.sakaiproject.cheftool.ToolServlet.doPost(ToolServlet.java:151)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
>> at org.sakaiproject.vm.ComponentServlet.service(ComponentServlet.java:56)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>> at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:565)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>> at
>> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
>> at
>> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)
>> at
>> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:364)
>> at
>> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
>> at
>> org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:459)
>> at
>> org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1346)
>> at
>> org.sakaiproject.portal.charon.handlers.ToolHandler.doTool(ToolHandler.java:163)
>> at
>> org.sakaiproject.portal.charon.handlers.ToolHandler.doGet(ToolHandler.java:86)
>> at
>> org.sakaiproject.portal.charon.handlers.ToolHandler.doPost(ToolHandler.java:63)
>> at
>> org.sakaiproject.portal.charon.SkinnableCharonPortal.doPost(SkinnableCharonPortal.java:1189)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>> at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:602)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>> at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
>> at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>> at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>> at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>> at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
>> at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
>> at
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>> at
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
>> at
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
>> at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>> at java.lang.Thread.run(Thread.java:595)
>> INFO: Email.sendMail: from: admin at sakai.org <mailto:admin at sakai.org>
>> subject: Official Course Site created by Lisa Baker for 2010 to:
>> admin at sakai.org.org <mailto:admin at sakai.org.org> headerTo:
>> admin at sakai.org.org <mailto:admin at sakai.org.org> (2010-02-12
>> 10:19:38,910
>> http-8080-Processor23_org.sakaiproject.email.impl.BasicEmailService)
>> INFO: Synchronizing internal sections with externally defined sections
>> in site 2e14b8ea-5ba9-44f2-81f8-95b09e41225a (2010-02-12 10:19:38,917
>> http-8080-Processor23_org.sakaiproject.component.section.sakai.SectionManagerImpl)
>> DEBUG: getSection: course1 (2010-02-12 10:19:38,956
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: getCourseOffering: course1 (2010-02-12 10:19:39,149
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: FederatedAuthzGroupProvider :: checking
>> org.provider.LdapAdminAuthzGroupProvider at 1e72466 (2010-02-12
>> 10:19:39,567
>> http-8080-Processor23_org.provider.FederatedAuthzGroupProvider)
>> getUserRolesForGroup: course1
>> DEBUG: org.provider.LdapAdminAuthzGroupProvider at 1e72466returned
>> 0results (2010-02-12 10:19:39,579
>> http-8080-Processor23_org.provider.FederatedAuthzGroupProvider)
>> DEBUG: FederatedAuthzGroupProvider :: checking
>> org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider at 13159f1
>> (2010-02-12 10:19:39,580
>> http-8080-Processor23_org.provider.FederatedAuthzGroupProvider)
>> DEBUG: ------------------CMGP.getUserRolesForGroup(course1)
>> (2010-02-12 10:19:39,580
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: course1 is mapped to 1 sections (2010-02-12 10:19:39,581
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: getSection: course1 (2010-02-12 10:19:39,581
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: getCourseOffering: course1 (2010-02-12 10:19:39,763
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: Looking for roles in section course1 (2010-02-12 10:19:39,943
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: getSectionMemberships: course1 (2010-02-12 10:19:39,943
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: Adding student1 to userRoleMap with role=Student (2010-02-12
>> 10:19:40,228
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: Adding student2 to userRoleMap with role=Student (2010-02-12
>> 10:19:40,228
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: Adding student3 to userRoleMap with role=Student (2010-02-12
>> 10:19:40,228
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: Adding student4 to userRoleMap with role=Student (2010-02-12
>> 10:19:40,228
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: Adding student5 to userRoleMap with role=Student (2010-02-12
>> 10:19:40,228
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: Adding student6 to userRoleMap with role=Student (2010-02-12
>> 10:19:40,228
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: Adding student7 to userRoleMap with role=Instructor (2010-02-12
>> 10:19:40,228
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: getSection: course1 (2010-02-12 10:19:40,228
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: getCourseOffering: course1 (2010-02-12 10:19:40,415
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: Looking for roles in section course1 (2010-02-12 10:19:40,697
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: TEST: getCourseOfferingMemberships(String courseOfferingEid)
>> (2010-02-12 10:19:40,698
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: getSection: course1 (2010-02-12 10:19:40,703
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: getCourseOffering: course1 (2010-02-12 10:19:40,896
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: Looking for roles in section course1 (2010-02-12 10:19:41,178
>> http-8080-Processor23_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>> DEBUG: getCourseOffering: course1 (2010-02-12 10:19:41,178
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> DEBUG: TEST: getCanonicalCourse: course1 (2010-02-12 10:19:41,457
>> http-8080-Processor23_org.coursemanagement.LdapCourseManagementService)
>> WARN: .saveAzgs - group: course1 : java.lang.NullPointerException
>> (2010-02-12 10:19:41,463
>> http-8080-Processor23_org.sakaiproject.site.impl.BaseSiteService)
>>
>>
>>
>>
>>
>>
>>
>> On Feb 11, 2010, at 1:30 PM, Zhen Qian wrote:
>>
>>> Nicola:
>>>
>>> In CourseManagement, there is hierarchy of role resolvers:
>>> SectionRoleResolver, CourseOfferingRoleResolver, and
>>> CourseSetRoleResolver. I noticed that there are the latter two from
>>> your log message, however, the SectionRoleResolver is missing.
>>>
>>> Could you please check whether you have the role definition at the
>>> Section level?
>>>
>>> Thanks,
>>>
>>> - Zhen
>>>
>>>
>>> On Thu, 11 Feb 2010 13:10:14 -0500, Nicola Monat-Jacobs
>>> <nicola at longsight.com <mailto:nicola at longsight.com>> wrote:
>>>
>>>     Okay, I was able to figure out that Worksite Setup calls a bunch
>>>     of CM methods to find some sections for the current user, so I
>>>     went ahead and implemented getSections() so that the same courses
>>>     would be returned there too.
>>>     catalina.out indicated that these are found and added to the list
>>>     of groups for the current user:
>>>     DEBUG: findCourseOfferingRoles: nicola at longsight.com
>>>     <mailto:nicola at longsight.com>::sdfdfdff7537x7fs7f (2010-02-11
>>>     13:03:24,295
>>>     http-8080-Processor19_org.coursemanagement.LdapCourseManagementService)
>>>     DEBUG: adding offering role to Map: course1::Instructor
>>>     (2010-02-11 13:03:24,637
>>>     http-8080-Processor19_org.coursemanagement.LdapCourseManagementService)
>>>     DEBUG: adding offering role to Map: course2::Instructor
>>>     (2010-02-11 13:03:24,637
>>>     http-8080-Processor19_org.coursemanagement.LdapCourseManagementService)
>>>     DEBUG: adding offering role to Map: course3::Instructor
>>>     (2010-02-11 13:03:24,637
>>>     http-8080-Processor19_org.coursemanagement.LdapCourseManagementService)
>>>     DEBUG: adding offering role to Map: course4::Instructor
>>>     (2010-02-11 13:03:24,637
>>>     http-8080-Processor19_org.coursemanagement.LdapCourseManagementService)
>>>     DEBUG: TEST: getSections: course1 (2010-02-11 13:03:24,650
>>>     http-8080-Processor19_org.coursemanagement.LdapCourseManagementService)
>>>     DEBUG: TEST: getSections: course4 (2010-02-11 13:03:24,836
>>>     http-8080-Processor19_org.coursemanagement.LdapCourseManagementService)
>>>     DEBUG: TEST: getSections: course2 (2010-02-11 13:03:25,020
>>>     http-8080-Processor19_org.coursemanagement.LdapCourseManagementService)
>>>     DEBUG: TEST: getSections: course3 (2010-02-11 13:03:25,213
>>>     http-8080-Processor19_org.coursemanagement.LdapCourseManagementService)
>>>     DEBUG: Found 4 groups for nicola at longsight.com
>>>     <mailto:nicola at longsight.com> from resolver
>>>     org.sakaiproject.coursemanagement.impl.provider.CourseOfferingRoleResolver
>>>     (2010-02-11 13:03:25,402
>>>     http-8080-Processor19_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>>>     DEBUG: Adding course1 to groupRoleMap with sakai roleInstructor
>>>     for user nicola at longsight.com <mailto:nicola at longsight.com>
>>>     (2010-02-11 13:03:25,402
>>>     http-8080-Processor19_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>>>     DEBUG: Adding course4 to groupRoleMap with sakai roleInstructor
>>>     for user nicola at longsight.com <mailto:nicola at longsight.com>
>>>     (2010-02-11 13:03:25,402
>>>     http-8080-Processor19_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>>>     DEBUG: Adding course2 to groupRoleMap with sakai roleInstructor
>>>     for user nicola at longsight.com <mailto:nicola at longsight.com>
>>>     (2010-02-11 13:03:25,402
>>>     http-8080-Processor19_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>>>     DEBUG: Adding course3 to groupRoleMap with sakai roleInstructor
>>>     for user nicola at longsight.com <mailto:nicola at longsight.com>
>>>     (2010-02-11 13:03:25,402
>>>     http-8080-Processor19_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>>>     DEBUG: Found 0 groups for nicola at longsight.com
>>>     <mailto:nicola at longsight.com> from resolver
>>>     org.sakaiproject.coursemanagement.impl.provider.CourseSetRoleResolver
>>>     (2010-02-11 13:03:25,404
>>>     http-8080-Processor19_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>>>     DEBUG: ______________getGroupRolesForUser={course1=Instructor,
>>>     course4=Instructor, course2=Instructor, course3=Instructor}
>>>     (2010-02-11 13:03:25,405
>>>     http-8080-Processor19_org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider)
>>>
>>>     But still - nothing shown to the user in the GUI.
>>>     Can anyone let me know what I am missing here?
>>>     Thanks!
>>>
>>>     On Feb 11, 2010, at 9:30 AM, Nicola Monat-Jacobs wrote:
>>>
>>>         Hi All -
>>>         I've never worked with the CM API before, so I'm wondering
>>>         perhaps if you folks on the list can give me some guidance.
>>>         We've got a Sakai 2.5.x environment and we'd like a very
>>>         simple CM implementation - á là
>>>         http://confluence.sakaiproject.org/display/CM/1+Simple+Course+Pattern
>>>         We'd like the faculty to be able to go to Worksite Setup and
>>>         see the courses they have available to create/activate.
>>>         However, although I can see in catalina.out that our
>>>         implementation of findCourseOfferingRoles() is bringing up
>>>         the relevant courses for Instructors, nothing is being shown
>>>         to them in the Worksite Setup tool. What method does Worksite
>>>         Setup look to to generate that list? It appears from the
>>>         documentation that I don't need to implement Sections if I
>>>         don't want them.
>>>         Thanks!
>>>         Nicola Monat-Jacobs
>>>         nicola at longsight.com <mailto:nicola at longsight.com>



More information about the sakai-dev mailing list