OSID Logo
OSID Specifications
course program package
Version 3.0.0
Release Candidate Preview
Interfaceosid.course.program.EnrollmentAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes Enrollments. The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create an Enrollment, an EnrollmentForm is requested using getEnrollmentFormFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned EnrollmentForm will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once the EnrollmentForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each EnrollmentForm corresponds to an attempted transaction.

For updates, EnrollmentForms are requested to the EnrollmentForm Id that is to be updated using getEnrollmentFormForUpdate(). Similarly, the EnrollmentForm has metadata about the data that can be updated and it can perform validation before submitting the update. The EnrollmentForm can only be used once for a successful update and cannot be reused.

The delete operations delete Enrollments. To unmap an EnrollmentForm from the current CourseCatalog, the EnrollmentCourseCatalogAssignmentSession should be used. These delete operations attempt to remove the EnrollmentForm itself thus removing it from all known CourseCatalog catalogs.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodgetCourseCatalogId
Description

Gets the CourseCatalog Id associated with this session.

Returnosid.id.Idthe CourseCatalog Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetCourseCatalog
Description

Gets the CourseCatalog associated with this session.

Returnosid.course.CourseCatalogthe course catalog
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateEnrollments
Description

Tests if this user can create Enrollments. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an Enrollment will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if Enrollment creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateEnrollmentWithRecordTypes
Description

Tests if this user can create a single Enrollment using the desired record types. While CourseProgramManager.getEnrollmentRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Enrollment. Providing an empty array tests if an Enrollment can be created with no records.

Parametersosid.type.Type[]enrollmentRecordTypesarray of enrollment record types
Returnboolean true if Enrollment creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT enrollmentRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetEnrollmentFormForCreate
Description

Gets the course form for creating new enrollments. A new form should be requested for each create transaction.

Parametersosid.id.IdprogramOfferingIdthe Id for a ProgramOffering
osid.id.IdresourceIdthe Id for a Resource
osid.type.Type[]enrollmentRecordTypesarray of enrollment record types
Returnosid.course.program.EnrollmentFormthe enrollment form
ErrorsNOT_FOUND programOfferingId, or resourceId is not found
NULL_ARGUMENT programOfferingId, resourceId, or enrollmentRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested recod types
CompliancemandatoryThis method must be implemented.
MethodcreateEnrollment
Description

Creates a new Enrollment.

Parametersosid.course.program.EnrollmentFormenrollmentFormthe form for this Enrollment
Returnosid.course.program.Enrollmentthe new Enrollment
ErrorsILLEGAL_STATE enrollmentForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT enrollmentForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED enrollmentForm did not originate from getEnrollmentFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateEnrollments
Description

Tests if this user can update Enrollments. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an Enrollment will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if Enrollment modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetEnrollmentFormForUpdate
Description

Gets the enrollment form for updating an existing enrollment. A new enrollment form should be requested for each update transaction.

Parametersosid.id.IdenrollmentIdthe Id of the Enrollment
Returnosid.course.program.EnrollmentFormthe enrollment form
ErrorsNOT_FOUND enrollmentId is not found
NULL_ARGUMENT enrollmentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateEnrollment
Description

Updates an existing enrollment.

Parametersosid.course.program.EnrollmentFormenrollmentFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE enrollmentForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT enrollmentForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED enrollmentForm did not originate from getEnrollmentFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteEnrollments
Description

Tests if this user can delete Enrollments. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an Enrollment will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if Enrollment deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteEnrollment
Description

Deletes an Enrollment.

Parametersosid.id.IdenrollmentIdthe Id of the Enrollment to remove
ErrorsNOT_FOUND enrollmentId not found
NULL_ARGUMENT enrollmentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageEnrollmentAliases
Description

Tests if this user can manage Id aliases for Enrollments. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if Enrollment aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasEnrollment
Description

Adds an Id to an Enrollment for the purpose of creating compatibility. The primary Id of the Enrollment is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another enrollment, it is reassigned to the given enrollment Id.

Parametersosid.id.IdenrollmentIdthe Id of an Enrollment
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is in use as a primary Id
NOT_FOUND enrollmentId not found
NULL_ARGUMENT enrollmentId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.