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

This session creates, updates, and deletes Enrollments in bulk. 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 getEnrollmentFormsForCreate() specifying the desired activity, student, and record Types or none if no record Types are needed. Each of the returned EnrollmentForms 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 an 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.

The EnrollmentForms returned from getEnrollmentFormsForCreate() may be linked to the originating request through the peer Ids of the EnrollmentForm. In the case where there may be duplicates, any EnrollmentForm of the same peer Ids may be used for a create operation.

Once a batch of EnrollmentForms are submitted for create, a CreateResponse is returned for each EnrollmentForm, although the ordering is not defined. Only errors that pertain to the entire create operation are returned from createEnrollments(), errors specific to an individual EnrollmentForm are indicated in the corresponding CreateResponse. CreateResponses may be linked to the originating EnrollmentForm through the EnrollmentForm Id .

For updates, EnrollmentForms are requested to the Enrollment Id that is to be updated using getEnrollmentFormsForUpdate() where the reference Id in the EnrollmentForm may be used to link the request. 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.

Once a batch of EnrollmentForms are submitted for update, an UpdateResponse is returned for each EnrollmentForm, although the ordering is not defined. Only errors that pertain to the entire update operation are returned from updateEnrollments(), errors specific to an individual EnrollmentForm are indicated in the corresponding UpdateResponse. UpdateResponses may be linked to the originating EnrollmentForm through the EnrollmentForm Id.

The delete operations delete Enrollments in bulk. To unmap an Enrollment from the current CourseCatalog, the EnrollmentCourseCatalogAssignmentSession should be used. These delete operations attempt to remove the Enrollment itself thus removing it from all known CourseCatalog catalogs. Bulk delete operations return the results in DeleteResponses.

MethodgetEnrollmentFormsForCreate
Description

Gets the enrollment forms for creating a bunch of new enrollments. A form is returned for each activity and resource pair.

Parametersosid.course.program.batch.EnrollmentPeerListpeersthe relationship peers
osid.type.Type[]enrollmentRecordTypesarray of enrollment record types to be included in each create operation or an empty list if none
Returnosid.course.program.batch.EnrollmentBatchFormListthe enrollment forms
ErrorsNOT_FOUNDa programId or resourceId is not found
NULL_ARGUMENT peers or enrollmentRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to request forms with given record types
CompliancemandatoryThis method must be implemented.
MethodcreateEnrollments
Description

Creates a new set of Enrollments. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in the BatchCreateResponse .

Parametersosid.course.program.batch.EnrollmentBatchFormListenrollmentFormsthe enrollment forms
Returnosid.transaction.batch.CreateResponseListthe create responses
ErrorsNULL_ARGUMENT enrollmentForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetEnrollmentFormsForUpdate
Description

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

Parametersosid.id.IdListenrollmentIdsthe Ids of the Enrollment
Returnosid.course.program.batch.EnrollmentBatchFormListthe enrollment form
ErrorsNOT_FOUNDan enrollmentId is not found
NULL_ARGUMENT enrollmentIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateEnrollments
Description

Updates existing enrollments. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in the BatchCreateResponse .

Parametersosid.course.program.batch.EnrollmentBatchFormListenrollmentFormsthe form containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseListthe update responses
ErrorsNULL_ARGUMENT enrollmentForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteAllEnrollments
Description

Deletes all Enrollments in this CourseCatalog .

Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteEnrollments
Description

Deletes enrollments for the given Ids.

Parametersosid.id.IdListenrollmentIdsthe Ids of the enrollments to delete
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT enrollmentIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteEnrollmentsForProgramOffering
Description

Deletes enrollments for the given program offering.

Parametersosid.id.IdprogramOfferingIdan Id of a program
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT programOfferingId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteEnrollmentsForStudent
Description

Deletes enrollments for the given student resource.

Parametersosid.id.IdresourceIdan Id of a resource
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteIneffectiveEnrollmentsByDate
Description

Deletes enrollments expired before the given date.

Parametersosid.calendaring.DateTimedatea date
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT date is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaliasEnrollments
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 is an alias to the primary Id. If the alias is a pointer to another enrollment, it is reassigned to the given enrollment Id.

Parametersosid.transaction.batch.AliasRequestListaliasRequeststhe alias requests
Returnosid.transaction.batch.AliasResponseListthe alias responses
ErrorsNULL_ARGUMENT aliasRequests is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.