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

This session creates, updates, and deletes GradeSystems. 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 getGradeSystemFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned GradeSystemForm 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 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.

For updates, GradeSystemForms are requested to the GradeSystem Id that is to be updated using getGradeSystemFormForUpdate(). 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.

The delete operations delete GradeSystems 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.

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.
MethodcanCreateGradeSystems
Description

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

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

Parametersosid.type.Type[]gradeSystemRecordTypesarray of grade system types
Returnboolean true if GradeSystem creation using the specified Types is supported, false otherwise
ErrorsNULL_ARGUMENT gradeSystemRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetGradeSystemFormForCreate
Description

Gets the grade system form for creating new grade systems. A new form should be requested for each create transaction.

Parametersosid.type.Type[]gradeSystemRecordTypesarray of grade system types
Returnosid.grading.GradeSystemFormthe grade system form
ErrorsNULL_ARGUMENT gradeSystemRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateGradeSystem
Description

Creates a new GradeSystem.

Parametersosid.grading.GradeSystemFormgradeSystemFormthe form for this GradeSystem
Returnosid.grading.GradeSystemthe new GradeSystem
ErrorsILLEGAL_STATE gradeSystemForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT gradeSystemForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED gradeSystemForm did not originate from getGradeSystemFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateGradeSystems
Description

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

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

Parametersosid.id.IdgradeSystemIdthe Id of the GradeSystem
Returnosid.grading.GradeSystemFormthe grade system form
ErrorsNOT_FOUND gradeSystemId is not found
NULL_ARGUMENT gradeSystemId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateGradeSystem
Description

Updates an existing grade system.

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

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

Deletes a GradeSystem.

Parametersosid.id.IdgradeSystemIdthe Id of the GradeSystem to remove
ErrorsNOT_FOUND gradeSystemId not found
NULL_ARGUMENT gradeSystemId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageGradeSystemAliases
Description

Tests if this user can manage Id aliases for GradeSystems. 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 GradeSystem aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasGradeSystem
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 performs as 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.id.IdgradeSystemIdthe Id of a GradeSystem
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND gradeSystemId not found
NULL_ARGUMENT gradeSystemId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateGrades
Description

Tests if this user can create Grade s for a GradeSystem. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a GradeSystem 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.

Parametersosid.id.IdgradeSystemIdthe Id of a GradeSystem
Returnboolean false if Grade creation is not authorized, true otherwise
ErrorsNULL_ARGUMENT gradeSystemId is null
CompliancemandatoryThis method must be implemented.
MethodcanCreateGradeWithRecordTypes
Description

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

Parametersosid.id.IdgradeSystemIdthe Id of a GradeSystem
osid.type.Type[]gradeRecordTypesarray of grade recod types
Returnboolean true if Grade creation using the specified Types is supported, false otherwise
ErrorsNULL_ARGUMENT gradeSystemId or gradeRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetGradeFormForCreate
Description

Gets the grade form for creating new grades. A new form should be requested for each create transaction.

Parametersosid.id.IdgradeSystemIdthe Id of a GradeSystem
osid.type.Type[]gradeRecordTypesarray of grade recod types
Returnosid.grading.GradeFormthe grade form
ErrorsNOT_FOUND gradeSystemId is not found
NULL_ARGUMENT gradeSystemId or gradeRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateGrade
Description

Creates a new Grade.

Parametersosid.grading.GradeFormgradeFormthe form for this Grade
Returnosid.grading.Gradethe new Grade
ErrorsILLEGAL_STATE gradeForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT gradeForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED gradeForm did not originate from getGradeFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateGrades
Description

Tests if this user can update Grades. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Grade 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.

Parametersosid.id.IdgradeSystemIdthe Id of a GradeSystem
Returnboolean false if Grade modification is not authorized, true otherwise
ErrorsNULL_ARGUMENT gradeSystemId is null
CompliancemandatoryThis method must be implemented.
MethodgetGradeFormForUpdate
Description

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

Parametersosid.id.IdgradeIdthe Id of the Grade
Returnosid.grading.GradeFormthe grade form
ErrorsNOT_FOUND gradeId is not found
NULL_ARGUMENT gradeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateGrade
Description

Updates an existing grade.

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

Tests if this user can delete grades. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Grade 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.

Parametersosid.id.IdgradeSystemIdthe Id of a GradeSystem
Returnboolean false if Grade deletion is not authorized, true otherwise
ErrorsNULL_ARGUMENT gradeSystemId is null
CompliancemandatoryThis method must be implemented.
MethoddeleteGrade
Description

Deletes a Grade.

Parametersosid.id.IdgradeIdthe Id of the Grade to remove
ErrorsNOT_FOUND gradeId not found
NULL_ARGUMENT gradeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageGradeAliases
Description

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

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

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