OSID Logo
OSID Specifications
grading batch package
Version 3.1.0
Interfaceosid.grading.batch.GradeSystemBatchAdminSession
Implementsosid.grading.GradeSystemAdminSession
Used Byosid.grading.batch.GradingBatchManager
osid.grading.batch.GradingBatchProxyManager
Description

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

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

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

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

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

The delete operations delete GradeSystems in bulk. To unmap a GradeSystem from the current Gradebook, the GradeSystemGradebookAssignmentSession should be used. These delete operations attempt to remove the GradeSystem itself thus removing it from all known Gradebook catalogs. Bulk delete operations return the results in DeleteResponses.

MethodgetGradeSystemFormsForCreate
Description

Gets the grade system forms for creating a bunch of new grade systems.

Parameterscardinalnumber the number of forms to retrieve
osid.type.Type[]gradeSystemRecordTypes array of grade system record types to be included in each create operation or an empty list if none
Returnosid.grading.batch.GradeSystemBatchFormList the grade system forms
ErrorsNULL_ARGUMENT gradeSystemRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED unable to request forms with given record types
Compliancemandatory This method must be implemented.
MethodcreateGradeSystems
Description

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

Parametersosid.grading.batch.GradeSystemBatchFormListgradeSystemForms the grade system forms
Returnosid.transaction.batch.CreateResponseList the create responses
ErrorsNULL_ARGUMENT gradeSystemForms is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetGradeSystemFormsForUpdate
Description

Gets the grade system forms for updating an existing set of grade systems. A new grade system form should be requested for each update transaction.

Parametersosid.id.IdListgradeSystemIds the Ids of the GradeSystem
Returnosid.grading.batch.GradeSystemBatchFormList the grade system forms
ErrorsNOT_FOUND a gradeSystemId is not found
NULL_ARGUMENT gradeSystemIds is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateGradeSystems
Description

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

Parametersosid.grading.batch.GradeSystemBatchFormListgradeSystemForms the form containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseList the update responses
ErrorsNULL_ARGUMENT gradeSystemForms is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddeleteAllGradeSystems
Description

Deletes all GradeSystems in this Gradebook.

Returnosid.transaction.batch.DeleteResponseList the delete responses
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddeleteGradeSystems
Description

Deletes grade systems for the given Ids.

Parametersosid.id.IdListgradeSystemIds the Ids of the grade systems to delete
Returnosid.transaction.batch.DeleteResponseList the delete responses
ErrorsNULL_ARGUMENT gradeSystemIds is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodaliasGradeSystems
Description

Adds an Id to a GradeSystem for the purpose of creating compatibility. The primary Id of the GradeSystem is determined by the provider. The new Id is an alias to the primary Id. If the alias is a pointer to another grade system, it is reassigned to the given grade system Id.

Parametersosid.transaction.batch.AliasRequestListaliasRequests the alias requests
Returnosid.transaction.batch.AliasResponseList the alias responses
ErrorsNULL_ARGUMENT aliasRequests is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.