private List getSiteInstructors(String siteContext) { Course course = getCourse(siteContext); if (course == null) { return new ArrayList(); } List sakaiMembers = securityService.unlockUsers(SectionAwareness.INSTRUCTOR_MARKER, course.getUuid()); List<InstructorRecordImpl> membersList = new ArrayList<InstructorRecordImpl>(); for (Iterator iter = sakaiMembers.iterator(); iter.hasNext(); ) { org.sakaiproject.user.api.User sakaiUser = (org.sakaiproject.user.api.User) iter.next(); User user = SakaiUtil.convertUser(sakaiUser); if (user != null) { InstructorRecordImpl record = new InstructorRecordImpl(course, user); membersList.add(record); } } return membersList; }
private List getSiteTeachingAssistants(String siteContext) { Course course = getCourse(siteContext); if (course == null) { return new ArrayList(); } List sakaiMembers = securityService.unlockUsers(SectionAwareness.TA_MARKER, course.getUuid()); if (log.isDebugEnabled()) log.debug("Site TAs size = " + sakaiMembers.size()); List<TeachingAssistantRecordImpl> membersList = new ArrayList<TeachingAssistantRecordImpl>(); for (Iterator iter = sakaiMembers.iterator(); iter.hasNext(); ) { org.sakaiproject.user.api.User sakaiUser = (org.sakaiproject.user.api.User) iter.next(); User user = SakaiUtil.convertUser(sakaiUser); if (user != null) { TeachingAssistantRecordImpl record = new TeachingAssistantRecordImpl(course, user); membersList.add(record); } } return membersList; }
private List getSiteEnrollments(String siteContext) { Course course = getCourse(siteContext); if (course == null) { log.error("Could not find course site " + siteContext); return new ArrayList(); } List sakaiMembers = securityService.unlockUsers(SectionAwareness.STUDENT_MARKER, course.getUuid()); if (log.isDebugEnabled()) log.debug("Site students size = " + sakaiMembers.size()); List<EnrollmentRecordImpl> membersList = new ArrayList<EnrollmentRecordImpl>(); for (Iterator iter = sakaiMembers.iterator(); iter.hasNext(); ) { org.sakaiproject.user.api.User sakaiUser = (org.sakaiproject.user.api.User) iter.next(); User user = SakaiUtil.convertUser(sakaiUser); if (user != null) { EnrollmentRecordImpl record = new EnrollmentRecordImpl(course, null, user); membersList.add(record); } } return membersList; }