public interface EnrollmentCourseCatalogAssignmentSession extends OsidSession
This session provides methods to re-assign Enrollments
to CourseCatalogs. An Enrollment may appear
in multiple CourseCatalog objects and removing the last
reference to an Enrollment is the equivalent of deleting
it. Each CourseCatalog may have its own authorizations
governing who is allowed to operate on it.
Adding a reference of an Enrollment to another
CourseCatalog is not a copy operation (eg: does not change its
Id ).
| Modifier and Type | Method and Description |
|---|---|
void |
assignEnrollmentToCatalog(Id enrollmentId,
Id courseCatalogId)
Adds an existing
Enrollment to a CourseCatalog. |
boolean |
canAssignEnrollments()
Tests if this user can alter enrollment/course catalog mappings.
|
boolean |
canAssignEnrollmentToCourseCatalog(Id courseCatalogId)
Tests if this user can alter enrollment/course catalog mappings.
|
IdList |
getAssignableCourseCatalogIds(Id courseCatalogId)
Gets a list of course catalogs including and under the given course
catalog node in which any enrollment can be assigned.
|
IdList |
getAssignableCourseCatalogIdsForEnrollment(Id courseCatalogId,
Id enrollmentId)
Gets a list of course catalogs including and under the given course
catalog node in which a specific enrollment can be assigned.
|
void |
reassignEnrollmeentToCourseCatalog(Id enrollmentId,
Id fromCourseCatalogId,
Id toCourseCatalogId)
Moves an
Enrollment from one CourseCatalog
to another. |
void |
unassignEnrollmentFromCourseCatalog(Id enrollmentId,
Id courseCatalogId)
Removes an
Enrollment from a CourseCatalog. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canAssignEnrollments()
PERMISSION_DENIED. This is intended as
a hint to an application that may opt not to offer assignment
operations to unauthorized users. false if mapping is not authorized, true
otherwisemandatory - This method must be implemented. boolean canAssignEnrollmentToCourseCatalog(Id courseCatalogId)
PERMISSION_DENIED. This is intended as
a hint to an application that may opt not to offer lookup operations
to unauthorized users.courseCatalogId - the Id of the
CourseCatalog false if mapping is not authorized, true
otherwiseNullArgumentException - courseCatalogId
is null mandatory - This method must be implemented. IdList getAssignableCourseCatalogIds(Id courseCatalogId) throws OperationFailedException
courseCatalogId - the Id of the
CourseCatalog Ids NullArgumentException - courseCatalogId
is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. IdList getAssignableCourseCatalogIdsForEnrollment(Id courseCatalogId, Id enrollmentId) throws OperationFailedException
courseCatalogId - the Id of the
CourseCatalog enrollmentId - the Id of the Enrollment
Ids NullArgumentException - courseCatalogId
or enrollmentId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void assignEnrollmentToCatalog(Id enrollmentId, Id courseCatalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Enrollment to a CourseCatalog.
enrollmentId - the Id of the Enrollment
courseCatalogId - the Id of the
CourseCatalog AlreadyExistsException - enrollmentId is
already assigned to courseCatalogId NotFoundException - enrollmentId or
courseCatalogId not foundNullArgumentException - enrollmentId or
courseCatalogId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignEnrollmentFromCourseCatalog(Id enrollmentId, Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Enrollment from a CourseCatalog.
enrollmentId - the Id of the Enrollment
courseCatalogId - the Id of the
CourseCatalog NotFoundException - enrollmentId or
courseCatalogId not found or
enrollmentId not assigned to courseCatalogId
NullArgumentException - enrollmentId or
courseCatalogId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void reassignEnrollmeentToCourseCatalog(Id enrollmentId, Id fromCourseCatalogId, Id toCourseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Enrollment from one CourseCatalog
to another. Mappings to other CourseCatalogs
are unaffected.enrollmentId - the Id of the Enrollment
fromCourseCatalogId - the Id of the current
CourseCatalog toCourseCatalogId - the Id of the destination
CourseCatalog NotFoundException - enrollmentId,
fromCourseCatalogId, or toCourseCatalogId
not found or enrollmentId, not mapped
to fromCourseCatalogId NullArgumentException - enrollmentId,
fromCourseCatalogId, or toCourseCatalogId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.