OSID Logo
OSID Specifications
grading calculation package
Version 3.0.0
Release Candidate Preview
Interfaceosid.grading.calculation.GradebookColumnCalculationAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete GradebookColumnCalculations.

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

MethodgetGradebookId
Description

Gets the Gradebook Id associated with this session.

Returnosid.id.Idthe Gradebook Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetGradebook
Description

Gets the Gradebook associated with this session.

Returnosid.grading.Gradebookthe Gradebook associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateGradebookColumnCalculations
Description

Tests if this user can create gradebook column calculationss. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a gradebook column 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 GradebookColumnCalculation creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateGradebookColumnCalculationWithRecordTypes
Description

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

Parametersosid.type.Type[]gradebookColumnRecordCalculationTypesarray of gradebook column calculation record types
Returnboolean true if GradebookColumnCalculation creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT gradebookColumnRecordCalculationTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetGradebookColumnCalculationFormForCreate
Description

Gets the gradebook column calculation form for creating new gradebook columns. A new form should be requested for each create transaction.

Parametersosid.id.IdgradebookColumnIdthe Id for the GradebookColumn
osid.type.Type[]gradebookColumnRecordCalculationTypesarray of gradebook column calculation record types
Returnosid.grading.calculation.GradebookColumnCalculationFormthe gradebook column calculation form
ErrorsALREADY_EXISTS gradebookColumnId already has a calculation
NOT_FOUND gradebookColumnId is not found
NULL_ARGUMENT gradebokColumnId or gradebookColumnRecordCalculationTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateGradebookColumnCalculation
Description

Creates a new GradebookColumnCalculation.

Parametersosid.grading.calculation.GradebookColumnCalculationFormgradebookColumnCalculationFormthe form containing the elements to be updated
Returnosid.grading.calculation.GradebookColumnCalculationthe new GradebookColumnCalculation
ErrorsILLEGAL_STATE gradebookColumnCalculationForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT gradebookColumnCalculationForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED gradebookColumnCalculationForm did not originate from getGradebookColumnCalculationFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateGradebookColumnCalculations
Description

Tests if this user can update gradebook column calculations. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a GradebookColumnCalculation 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 gradebook column calculation modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetGradebookColumnCalculationFormForUpdate
Description

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

Parametersosid.id.IdgradebookColumnCalculationIdthe Id of the GradebookColumnCalculation
Returnosid.grading.calculation.GradebookColumnCalculationFormthe gradebook column calculation form
ErrorsNOT_FOUND gradebookColumnCalculationId is not found
NULL_ARGUMENT gradebookColumnCalculationId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodupdateGradebookColumnCalculation
Description

Updates an existing gradebook column calculation.

Parametersosid.grading.calculation.GradebookColumnCalculationFormgradebookColumnCalculationFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE gradebookColumnCalculationForm already used in a update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT gradebookColumnCalculationForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED gradebookColumnCalculationForm did not originate from getGradebookColumnCalculationFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteGradebookColumnCalculations
Description

Tests if this user can delete gradebook column calculations. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a GradebookColumnCalculation 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 GradebookColumnCalculation deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteGradebookColumnCalculation
Description

Deletes the GradebookColumnCalculation identified by the given Id.

Parametersosid.id.IdgradebookColumnCalculationIdthe Id of the GradebookColumnCalculation to delete
ErrorsNOT_FOUNDa GradebookColumnCalculation was not found identified by the given Id
NULL_ARGUMENT gradebookColumnCalculationId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.