public interface ModuleCourseCatalogAssignmentSession extends OsidSession
This session provides methods to re-assign Modules
to
Course Catalogs.
A Module
may map to
multiple CourseCatalogs
and removing the last reference to
a Module
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 a Module
to another
CourseCatalog
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignModuleToCourseCatalog(Id moduleId,
Id courseCatalogId)
Adds an existing
Module to an CourseCatalog. |
boolean |
canAssignModules()
Tests if this user can alter module/course catalog mappings.
|
boolean |
canAssignModulesToCourseCatalog(Id courseCatalogId)
Tests if this user can alter module/course catalog mappings.
|
IdList |
getAssignableCourseCatalogIds(Id courseCatalogId)
Gets a list of course catalogs including and under the given course
catalog node in which any module can be assigned.
|
IdList |
getAssignableCourseCatalogIdsForModule(Id courseCatalogId,
Id moduleId)
Gets a list of course catalogs including and under the given course
catalog node in which a specific module can be assigned.
|
void |
reassignModuleToCourseCatalog(Id moduleId,
Id fromCourseCatalogId,
Id toCourseCatalogId)
Moves a
Module from one CourseCatalog to
another. |
void |
unassignModuleFromCourseCatalog(Id moduleId,
Id courseCatalogId)
Removes a
Module from an CourseCatalog. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignModules()
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 canAssignModulesToCourseCatalog(Id courseCatalogId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment 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 getAssignableCourseCatalogIdsForModule(Id courseCatalogId, Id moduleId) throws OperationFailedException
courseCatalogId
- the Id
of the
CourseCatalog
moduleId
- the Id
of the Module
Ids
NullArgumentException
- courseCatalogId
or moduleId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignModuleToCourseCatalog(Id moduleId, Id courseCatalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Module
to an CourseCatalog.
moduleId
- the Id
of the Module
courseCatalogId
- the Id
of the
CourseCatalog
AlreadyExistsException
- moduleId
is
already assigned to courseCatalogId
NotFoundException
- moduleId
or
courseCatalogId
not foundNullArgumentException
- moduleId
or
courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignModuleFromCourseCatalog(Id moduleId, Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Module
from an CourseCatalog.
moduleId
- the Id
of the Module
courseCatalogId
- the Id
of the
CourseCatalog
NotFoundException
- moduleId
or
courseCatalogId
not found or moduleId
not assigned to courseCatalogId
NullArgumentException
- moduleId
or
courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignModuleToCourseCatalog(Id moduleId, Id fromCourseCatalogId, Id toCourseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Module
from one CourseCatalog
to
another. Mappings to other CourseCatalogs
are
unaffected.moduleId
- the Id
of the Module
fromCourseCatalogId
- the Id
of the current
CourseCatalog
toCourseCatalogId
- the Id
of the destination
CourseCatalog
NotFoundException
- moduleId,
fromCourseCatalogId,
or toCourseCatalogId
not found or moduleId
not mapped to
fromCourseCatalogId
NullArgumentException
- moduleId
fromCourseCatalogId,
or toCourseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.