| org.sakaiproject.section.api.SectionManager
All known Subclasses: org.sakaiproject.component.section.sakai.SectionManagerImpl, org.sakaiproject.component.section.SectionManagerHibernateImpl,
SectionManager | public interface SectionManager (Code) | | An internal service interface for the Section Manager Tool (AKA "Section Info")
to provide for the creation, modification, and removal of CourseSections, along
with the membership of of these sections.
This service is not to be used outside of the Section Manager Tool.
author: Josh Holtzman |
Inner Class :public enum ExternalIntegrationConfig | |
Method Summary | |
public CourseSection | addSection(String courseUuid, String title, String category, Integer maxEnrollments, String location, Time startTime, Time endTime, boolean monday, boolean tuesday, boolean wednesday, boolean thursday, boolean friday, boolean saturday, boolean sunday) Adds a CourseSection with a single meeting time to a parent CourseSection.
This method is deprecated. | public ParticipationRecord | addSectionMembership(String userUid, Role role, String sectionUuid) Adds a user to a section under the specified role. | public Collection<CourseSection> | addSections(String courseUuid, Collection<CourseSection> sections) Adds multiple sections at once. | public void | disbandSection(String sectionUuid) Disbands a course section. | public void | disbandSections(Set<String> sectionUuids) Disbands course sections. | public void | dropEnrollmentFromCategory(String studentUid, String siteContext, String category) Removes the user from any enrollment to a section of the given category. | public void | dropSectionMembership(String userUid, String sectionUuid) Removes a user from a section. | public List<EnrollmentRecord> | findSiteEnrollments(String siteContext, String pattern) Finds a list of
org.sakaiproject.section.api.coursemanagement.EnrollmentRecordEnrollmentRecord s belonging to the current site and whose sort name, display name,
or display id start with the given string pattern. | public String | getCategoryName(String categoryId, Locale locale) Gets the localized name of a given category. | public ExternalIntegrationConfig | getConfiguration(Object obj) Gets the application-wide configuration setting. | public Course | getCourse(String siteContext) Gets the course (whatever that means) associated with this site context. | public CourseSection | getSection(String sectionUuid) Gets a
org.sakaiproject.section.api.coursemanagement.CourseSection CourseSection by its uuid. | public List<String> | getSectionCategories(String siteContext) Gets the list of section categories. | public List<EnrollmentRecord> | getSectionEnrollments(String sectionUuid) Gets a list of
org.sakaiproject.section.api.coursemanagement.EnrollmentRecordEnrollmentRecord s belonging to a section. | public Set<EnrollmentRecord> | getSectionEnrollments(String userUid, String courseUuid) Gets all of the section enrollments for a user in a course. | public SectionEnrollments | getSectionEnrollmentsForStudents(String siteContext, Set studentUids) Gets a SectionEnrollments data structure for the given students. | public List<ParticipationRecord> | getSectionTeachingAssistants(String sectionUuid) Gets a list of
org.sakaiproject.section.api.coursemanagement.ParticipationRecordParticipationRecord s for all TAs in a section. | public List<CourseSection> | getSections(String siteContext) Gets the sections associated with this site context. | public List<CourseSection> | getSectionsInCategory(String siteContext, String categoryId) Lists the sections in this context that are a member of the given category. | public User | getSiteEnrollment(String siteContext, String studentUid) Gets a single User object for a student in a site. | public List<EnrollmentRecord> | getSiteEnrollments(String siteContext) Gets a list of
org.sakaiproject.section.api.coursemanagement.EnrollmentRecordEnrollmentRecord s belonging to the current site. | public List<ParticipationRecord> | getSiteInstructors(String siteContext) Gets a list of
org.sakaiproject.section.api.coursemanagement.ParticipationRecordParticipationRecord s for all instructors in the current site. | public List<ParticipationRecord> | getSiteTeachingAssistants(String siteContext) Gets a list of
org.sakaiproject.section.api.coursemanagement.ParticipationRecordParticipationRecord s for all TAs in the current site. | public int | getTotalEnrollments(String learningContextUuid) Returns the total number of students enrolled in a learning context. | public List<EnrollmentRecord> | getUnsectionedEnrollments(String courseUuid, String category) The Section Manager tool could use more specific queries on membership,
such as this: getting all students in a primary section that are not
enrolled in any secondary sections of a given type. | public boolean | isExternallyManaged(String courseUuid) Determines whether a course is externally managed. | public boolean | isSelfRegistrationAllowed(String courseUuid) Determines whether students can enroll themselves in a section. | public boolean | isSelfSwitchingAllowed(String courseUuid) Determines whether students can switch sections once they are enrolled in
a section of a given category (for instance, swapping one lab for another). | public EnrollmentRecord | joinSection(String sectionUuid) Adds the current user to a section as a student. | public void | setExternallyManaged(String courseUuid, boolean externallyManaged) Sets a course as externally or internally managed. | public void | setJoinOptions(String courseUuid, boolean joinAllowed, boolean switchAllowed) Sets the join/switch options for a course. | public void | setSectionMemberships(Set userUids, Role role, String sectionId) Defines the complete set of users that make up the members of a section in
a given role. | public void | switchSection(String newSectionUuid) Switches a student's currently assigned section. | public void | updateSection(String sectionUuid, String title, Integer maxEnrollments, String location, Time startTime, Time endTime, boolean monday, boolean tuesday, boolean wednesday, boolean thursday, boolean friday, boolean saturday, boolean sunday) Updates the persistent representation of the given CourseSection. | public void | updateSection(String sectionUuid, String title, Integer maxEnrollments, List<Meeting> meetings) Updates a section and all of its meetings. |
CONFIGURATION_KEY | final public static String CONFIGURATION_KEY(Code) | | |
addSection | public CourseSection addSection(String courseUuid, String title, String category, Integer maxEnrollments, String location, Time startTime, Time endTime, boolean monday, boolean tuesday, boolean wednesday, boolean thursday, boolean friday, boolean saturday, boolean sunday)(Code) | | Adds a CourseSection with a single meeting time to a parent CourseSection.
This method is deprecated. Please use addSection(String courseUuid, String title,
String category, Integer maxEnrollments, List meetings)
Parameters: courseUuid - Parameters: title - Parameters: category - Parameters: maxEnrollments - Parameters: location - Parameters: startTime - Parameters: startTimeAm - Parameters: endTime - Parameters: endTimeAm - Parameters: monday - Parameters: tuesday - Parameters: wednesday - Parameters: thursday - Parameters: friday - Parameters: saturday - Parameters: sunday - |
addSectionMembership | public ParticipationRecord addSectionMembership(String userUid, Role role, String sectionUuid) throws MembershipException, RoleConfigurationException(Code) | | Adds a user to a section under the specified role. If a student is added
to a section, s/he will be automatically removed from any other section
of the same category in this site. So adding 'student1' to 'Lab1', for
example, will automatically remove 'student1' from 'Lab2'. TAs may be
added to multiple sections in a site regardless of category.
Parameters: userUid - Parameters: role - Parameters: sectionUuid - throws: MembershipException - Only students and TAs can be members of asection. Instructor roles are assigned only at the course level. throws: RoleConfigurationException - Thrown when no sakai role can beidentified to represent the given role. |
addSections | public Collection<CourseSection> addSections(String courseUuid, Collection<CourseSection> sections)(Code) | | Adds multiple sections at once. This should help address the inefficiencies
described in http://bugs.sakaiproject.org/jira/browse/SAK-7503.
Meeting times should be, but are not handled by an external calendar service.
So, the added functionality of linking course sections to repeating events (meet
every 2nd Tuesday of the month at 3pm) is currently out of scope. Instead,
meetings are represented as a start time, end time, and seven booleans
representing the days that the section meets.
Parameters: courseUuid - Parameters: sections - |
disbandSection | public void disbandSection(String sectionUuid)(Code) | | Disbands a course section. This does not affect enrollment records for
the course.
Parameters: sectionUuid - |
disbandSections | public void disbandSections(Set<String> sectionUuids)(Code) | | Disbands course sections. This does not affect enrollment records for
the course.
Parameters: sectionUuids - |
dropEnrollmentFromCategory | public void dropEnrollmentFromCategory(String studentUid, String siteContext, String category)(Code) | | Removes the user from any enrollment to a section of the given category.
Parameters: studentUid - Parameters: siteContext - Parameters: category - |
dropSectionMembership | public void dropSectionMembership(String userUid, String sectionUuid)(Code) | | Removes a user from a section.
Parameters: userUid - Parameters: sectionUuid - |
getCategoryName | public String getCategoryName(String categoryId, Locale locale)(Code) | | Gets the localized name of a given category.
Parameters: categoryId - A string identifying the category Parameters: locale - The locale of the client An internationalized string to display for this category. |
getConfiguration | public ExternalIntegrationConfig getConfiguration(Object obj)(Code) | | Gets the application-wide configuration setting.
Parameters: obj - An object to pass any necessary context information. |
getCourse | public Course getCourse(String siteContext)(Code) | | Gets the course (whatever that means) associated with this site context.
Parameters: siteContext - The site context The course (whatever that means) |
getSectionCategories | public List<String> getSectionCategories(String siteContext)(Code) | | Gets the list of section categories. These are not configurable on a per-course
or per-context bases.
Parameters: siteContext - The site context (which is not used in thecurrent implementation) A List of unique Strings that identify the available sectioncategories. |
getSectionEnrollments | public Set<EnrollmentRecord> getSectionEnrollments(String userUid, String courseUuid)(Code) | | Gets all of the section enrollments for a user in a course. Useful for
listing all of the sections in which a student is enrolled.
Parameters: userUid - Parameters: courseUuid - A Set of EnrollmentRecords |
getSectionEnrollmentsForStudents | public SectionEnrollments getSectionEnrollmentsForStudents(String siteContext, Set studentUids)(Code) | | Gets a SectionEnrollments data structure for the given students.
Parameters: siteContext - The site context Parameters: studentUids - The Set of userUids to include in the SectionEnrollments |
getSiteEnrollment | public User getSiteEnrollment(String siteContext, String studentUid)(Code) | | Gets a single User object for a student in a site.
Parameters: siteContext - Needed by the standalone implementation to find the user Parameters: studentUid - The User representing this student |
getTotalEnrollments | public int getTotalEnrollments(String learningContextUuid)(Code) | | Returns the total number of students enrolled in a learning context. Useful for
comparing to the max number of enrollments allowed in a section.
Parameters: sectionUuid - |
getUnsectionedEnrollments | public List<EnrollmentRecord> getUnsectionedEnrollments(String courseUuid, String category)(Code) | | The Section Manager tool could use more specific queries on membership,
such as this: getting all students in a primary section that are not
enrolled in any secondary sections of a given type. For instance, 'Who
are the students who are not enrolled in any lab?'
A List of org.sakaiproject.section.api.coursemanagement.EnrollmentRecordEnrollmentRecords of students who are enrolled in the course but arenot enrolled in a section of the given section category. |
isExternallyManaged | public boolean isExternallyManaged(String courseUuid)(Code) | | Determines whether a course is externally managed.
Parameters: courseUuid - |
isSelfRegistrationAllowed | public boolean isSelfRegistrationAllowed(String courseUuid)(Code) | | Determines whether students can enroll themselves in a section.
Parameters: courseUuid - |
isSelfSwitchingAllowed | public boolean isSelfSwitchingAllowed(String courseUuid)(Code) | | Determines whether students can switch sections once they are enrolled in
a section of a given category (for instance, swapping one lab for another).
Parameters: courseUuid - |
joinSection | public EnrollmentRecord joinSection(String sectionUuid) throws RoleConfigurationException(Code) | | Adds the current user to a section as a student. This is a convenience
method for addSectionMembership(currentUserId, Role.STUDENT, sectionId).
Parameters: sectionUuid - throws: RoleConfigurationException - If there is no valid student role, orif there is more than one group-scoped role flagged as a student role. |
setExternallyManaged | public void setExternallyManaged(String courseUuid, boolean externallyManaged)(Code) | | Sets a course as externally or internally managed.
Parameters: courseUuid - Parameters: externallyManaged - |
setJoinOptions | public void setJoinOptions(String courseUuid, boolean joinAllowed, boolean switchAllowed)(Code) | | Sets the join/switch options for a course.
Parameters: courseUuid - Parameters: joinAllowed - Parameters: switchAllowed - |
setSectionMemberships | public void setSectionMemberships(Set userUids, Role role, String sectionId) throws RoleConfigurationException(Code) | | Defines the complete set of users that make up the members of a section in
a given role. This is useful when doing bulk modifications of section
membership.
Parameters: userUids - The set of userUids as strings Parameters: sectionId - The sectionId throws: RoleConfigurationException - If there is no properly configured rolein the site matching the role specified. |
switchSection | public void switchSection(String newSectionUuid) throws RoleConfigurationException(Code) | | Switches a student's currently assigned section. If the student is enrolled
in another section of the same type, that enrollment will be dropped.
This is a convenience method to allow a drop/add (a switch) in a single transaction.
Parameters: newSectionUuid - The new section uuid to which the student should be assigned throws: RoleConfigurationException - If there is no valid student role, orif there is more than one group-scoped role flagged as a student role. |
updateSection | public void updateSection(String sectionUuid, String title, Integer maxEnrollments, String location, Time startTime, Time endTime, boolean monday, boolean tuesday, boolean wednesday, boolean thursday, boolean friday, boolean saturday, boolean sunday)(Code) | | Updates the persistent representation of the given CourseSection. Once
a section is created, its category is immutable. This method will remove all
but one Meeting associated with this CourseSection. To update a CourseSection
and all of its meetings, use updateSection(String sectionUuid, String title,
Integer maxEnrollments, List meetings).
Parameters: sectionUuid - Parameters: title - Parameters: maxEnrollments - Parameters: location - Parameters: startTime - Parameters: startTimeAm - Parameters: endTime - Parameters: endTimeAm - Parameters: monday - Parameters: tuesday - Parameters: wednesday - Parameters: thursday - Parameters: friday - Parameters: saturday - Parameters: sunday - |
updateSection | public void updateSection(String sectionUuid, String title, Integer maxEnrollments, List<Meeting> meetings)(Code) | | Updates a section and all of its meetings. Notice that you can not change a
section's category once it's been created.
Parameters: sectionUuid - Parameters: title - Parameters: maxEnrollments - Parameters: meetings - |
|
|