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

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

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

The delete operations delete Gradebooks.

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

MethodcanCreateGradebooks
Description

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

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

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

Parametersosid.type.Type[]gradebookRecordTypesarray of gradebook record types
Returnboolean true if Gradebook creation using the specified Types is supported, false otherwise
ErrorsNULL_ARGUMENT gradebookRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetGradebookFormForCreate
Description

Gets the gradebook form for creating new gradebooks. A new form should be requested for each create transaction.

Parametersosid.type.Type[]gradebookRecordTypesarray of gradebook record types
Returnosid.grading.GradebookFormthe gradebook form
ErrorsNULL_ARGUMENT gradebookRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateGradebook
Description

Creates a new Gradebook.

Parametersosid.grading.GradebookFormgradebookFormthe form for this Gradebook
Returnosid.grading.Gradebookthe new Gradebook
ErrorsILLEGAL_STATE gradebookForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT gradebookForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED gradebookForm did not originate from getGradebookFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateGradebooks
Description

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

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

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

Parametersosid.id.IdgradebookIdthe Id of the Gradebook
Returnosid.grading.GradebookFormthe gradebook form
ErrorsNOT_FOUND gradebookId is not found
NULL_ARGUMENT gradebookId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateGradebook
Description

Updates an existing gradebook.

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

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

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

Deletes a Gradebook.

Parametersosid.id.IdgradebookIdthe Id of the Gradebook to remove
ErrorsNOT_FOUND gradebookId not found
NULL_ARGUMENT gradebookId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageGradebookAliases
Description

Tests if this user can manage Id aliases for Gradebooks. 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 Gradebook aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasGradebook
Description

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

Parametersosid.id.IdgradebookIdthe Id of a Gradebook
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND gradebookId not found
NULL_ARGUMENT gradebookId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.