OSID Logo
OSID Specifications
grading package
Version 3.0.0
Interfaceosid.grading.GradeAdminSession
Implementsosid.OsidSession
Implemented Byosid.grading.batch.GradeBatchAdminSession
Used Byosid.grading.GradingManager
osid.grading.GradingProxyManager
Description

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

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

The delete operations delete Grades . To unmap a Grade from the current Gradebook , the GradeGradebookAssignmentSession should be used. These delete operations attempt to remove the Grade 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
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateGrades
Description

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

Returnbooleanfalse if Grade creation is not authorized, true otherwise
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 cr eated with no records.

Parametersosid.type.Type[]gradeRecordTypesarray of grade record types
Returnbooleantrue if Grade creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENTgradeRecordTypes 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.IdgradeSystemIda grade system Id
osid.type.Type[]gradeRecordTypesarray of grade record types
Returnosid.grading.GradeFormthe grade form
ErrorsNOT_FOUNDgradeSystemId not found
NULL_ARGUMENTgradeSystemId 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_STATEgradeForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENTgradeForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDgradeForm 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. Th is is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnbooleanfalse if Grade modification is not authorized, true otherwise
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_FOUNDgradeId is not found
NULL_ARGUMENTgradeId 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_STATEgradeForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENTgradeForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDgradeForm 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. Th is is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnbooleanfalse if Grade deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteGrade
Description

Deletes a Grade .

Parametersosid.id.IdgradeIdthe Id of the Grade to remove
ErrorsNOT_FOUNDgradeId not found
NULL_ARGUMENTgradeId 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.

Returnbooleanfalse 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_EXISTSaliasId is already assigned
NOT_FOUNDgradeId not found
NULL_ARGUMENTgradeId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.