public interface CourseProgramAssignmentSession extends OsidSession
This session provides methods to assign Courses
to
programs.
A Course
may appear in multiple
Programs.
Modifier and Type | Method and Description |
---|---|
void |
assignCourseToProgram(Id courseId,
Id programId)
Adds an existing
Course to a program. |
boolean |
canAssignCourses()
Tests if this user can alter program/course mappings.
|
boolean |
canAssignCourseToProgram(Id programId)
Tests if this user can alter program/course mappings.
|
CourseCatalog |
getCourseCatalog()
Gets the
CourseCatalog associated with this session. |
Id |
getCourseCatalogId()
Gets the
CourseCatalog Id associated
with this session. |
void |
unassignCourseFromProgram(Id courseId,
Id programId)
Removes a
Course from a Program. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getCourseCatalogId()
CourseCatalog
Id
associated
with this session. CourseCatalog Id
associated with this
sessionmandatory
- This method must be implemented. CourseCatalog getCourseCatalog() throws OperationFailedException, PermissionDeniedException
CourseCatalog
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canAssignCourses()
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 canAssignCourseToProgram(Id programId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer lookup operations to
unauthorized users.programId
- the Id
of the Program
false
if mapping is not authorized, true
otherwiseNullArgumentException
- programId
is
null
mandatory
- This method must be implemented. void assignCourseToProgram(Id courseId, Id programId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Course
to a program.
courseId
- the Id
of the Course
programId
- the Id
of the Program
AlreadyExistsException
- courseId
is
already assigned to programId
NotFoundException
- courseId
or
programId
not foundNullArgumentException
- courseId
or
programId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignCourseFromProgram(Id courseId, Id programId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Course
from a Program.
courseId
- the Id
of the Course
programId
- the Id
of the Program
NotFoundException
- courseId
or
programId
not found or courseId
not
assigned to programId
NullArgumentException
- courseId
or
programId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.