OSID Logo
OSID Specifications
assessment batch package
Version 3.0.0
Release Candidate Preview
Interfaceosid.assessment.batch.AssessmentOfferedBatchAdminSession
Implementsosid.assessment.AssessmentOfferedAdminSession
Description

This session creates, updates, and deletes AssessmentsOffered 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 AssessmentOffered, an AssessmentOfferedForm is requested using getAssessmentOfferedFormsForCreate() specifying the desired assessment and record Types or none if no record Types are needed. Each of the returned AssessmentOfferedForms 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 AssessmentOfferedForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each AssessmentOfferedForm corresponds to an attempted transaction.

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

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

For updates, AssessmentOfferedForms are requested to the AssessmentOffered Id that is to be updated using getAssessmentOfferedFormsForUpdate() where the reference Id in the AssessmentOfferedForm may be used to link the request. Similarly, the AssessmentOfferedForm has metadata about the data that can be updated and it can perform validation before submitting the update. The AssessmentOfferedForm can only be used once for a successful update and cannot be reused.

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

The delete operations delete AssessmentsOffered in bulk. To unmap an AssessmentOffered from the current Bank, the AssessmentOfferedBankAssignmentSession should be used. These delete operations attempt to remove the AssessmentOffered itself thus removing it from all known Bank catalogs. Bulk delete operations return the results in DeleteResponses.

MethodgetAssessmentOfferedFormsForCreate
Description

Gets the assessment offered forms for creating a bunch of new assessments offered. An AssessmentOfferedForm is returned for each supplied assessment.

Parametersosid.id.IdListassessmentIdsa list of assessment Ids
osid.type.Type[]assessmentOfferedRecordTypesarray of assessment offered record types to be included in each create operation or an empty list if none
Returnosid.assessment.batch.AssessmentOfferedBatchFormListthe assessment offered forms
ErrorsNOT_FOUNDan assessmentId is not found
NULL_ARGUMENT assessmentids or assessmentOfferedRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to request forms with given record types
CompliancemandatoryThis method must be implemented.
MethodcreateAssessmentsOffered
Description

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

Parametersosid.assessment.batch.AssessmentOfferedBatchFormListassessmentOfferedFormsthe assessment offered forms
Returnosid.transaction.batch.CreateResponseListthe create responses
ErrorsNULL_ARGUMENT assessmentOfferedForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAssessmentOfferedFormsForUpdate
Description

Gets the assessment offered forms for updating an existing set of assessments offered. A new assessment offeredform should be requested for each update transaction.

Parametersosid.id.IdListassessmentOfferedIdsthe Ids of the AssessmentOffered
Returnosid.assessment.batch.AssessmentOfferedBatchFormListthe assessment offered form
ErrorsNOT_FOUNDan assessmentOfferedId is not found
NULL_ARGUMENT assessmentOfferedIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateAssessmentsOffered
Description

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

Parametersosid.assessment.batch.AssessmentOfferedBatchFormListassessmentOfferedFormsthe form containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseListthe update responses
ErrorsNULL_ARGUMENT assessmentOfferedForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteAllAssessmentsOffered
Description

Deletes all AssessmentsOffered in this Bank .

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

Deletes assessments offered for the given Ids.

Parametersosid.id.IdListassessmentOfferedIdsthe Ids of the assessments offered to delete
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT assessmentOfferedIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteAssessmentsOfferedForAssessment
Description

Deletes all assessments offered for the given assessment,

Parametersosid.id.IdassessmentIdan Id of an assessment
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT assessmentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteIneffectiveAssessmentsOfferedByDate
Description

Deletes assessments offeredexpired 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.
MethodaliasAssessmentsOffered
Description

Adds an Id to an AssessmentOffered for the purpose of creating compatibility. The primary Id of the AssessmentOffered is determined by the provider. The new Id is an alias to the primary Id. If the alias is a pointer to another assessment offered, it is reassigned to the given assessment offered 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.