| org.sakaiproject.section.api.CourseManager
All known Subclasses: org.sakaiproject.component.section.sakai.CourseManagerImpl, org.sakaiproject.component.section.CourseManagerHibernateImpl,
CourseManager | public interface CourseManager (Code) | | Provides methods for adding a top-level course object, to which CourseSections
can be associated, and for associating users with the course.
The membership-related methods are intended for use in testing the standalone
application only. In sakai, we will can use this as an external interface
that allows for Course creation, but does not alter membership in the course.
author: Josh Holtzman |
Method Summary | |
public ParticipationRecord | addEnrollment(User user, Course course) Adds a student to a course. | public ParticipationRecord | addInstructor(User user, Course course) Adds an instructor to a course. | public ParticipationRecord | addTA(User user, Course course) Adds a TA to a course. | public boolean | courseExists(String siteContext) Checks to see whether a course exists in this site. | public Course | createCourse(String siteContext, String title, boolean selfRegAllowed, boolean selfSwitchingAllowed, boolean externallyManaged) Creates a new Course object for this site.
Parameters: siteContext - The site context Parameters: title - The title of the course or site Parameters: selfRegAllowed - Whether to allow students to register for sections in this course. Parameters: selfSwitchingAllowed - Whether to allow students to switch sections in this course. Parameters: externallyManaged - Whether to flag this course as externally manager(read-only to the app). | public void | removeCourseMembership(String userUid, Course course) Removes a user from the course. | public void | removeOrphans(String siteContext) Removes any section membership record from a site that belongs to a user
who is no longer associated with the site. |
addEnrollment | public ParticipationRecord addEnrollment(User user, Course course)(Code) | | Adds a student to a course. Useful for dataloading in standalone mode.
Parameters: user - Parameters: course - |
addInstructor | public ParticipationRecord addInstructor(User user, Course course)(Code) | | Adds an instructor to a course. Useful for dataloading in standalone mode.
Parameters: user - Parameters: course - |
addTA | public ParticipationRecord addTA(User user, Course course)(Code) | | Adds a TA to a course. Useful for dataloading in standalone mode.
Parameters: user - Parameters: course - |
courseExists | public boolean courseExists(String siteContext)(Code) | | Checks to see whether a course exists in this site.
Parameters: siteContext - The site context |
createCourse | public Course createCourse(String siteContext, String title, boolean selfRegAllowed, boolean selfSwitchingAllowed, boolean externallyManaged)(Code) | | Creates a new Course object for this site.
Parameters: siteContext - The site context Parameters: title - The title of the course or site Parameters: selfRegAllowed - Whether to allow students to register for sections in this course. Parameters: selfSwitchingAllowed - Whether to allow students to switch sections in this course. Parameters: externallyManaged - Whether to flag this course as externally manager(read-only to the app). The newly created Course object. |
removeCourseMembership | public void removeCourseMembership(String userUid, Course course)(Code) | | Removes a user from the course.
Parameters: userUid - Parameters: course - |
removeOrphans | public void removeOrphans(String siteContext)(Code) | | Removes any section membership record from a site that belongs to a user
who is no longer associated with the site.
Parameters: siteContext - The site context from which to remove the orphaned records Parameters: userUids - The current set of user ids that are a member of the site.Must not be null or empty. |
|
|