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

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

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

The delete operations delete GradeEntries. To unmap a GradeEntry from the current Gradebook, the GradeEntryGradebookAssignmentSession should be used. These delete operations attempt to remove the GradeEntry 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.
MethodcanCreateGradeEntries
Description

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

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

Parametersosid.type.Type[]gradeEntryRecordTypesarray of grade entry record types
Returnboolean true if GradeEntry creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT gradeEntryRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetGradeEntryFormForCreate
Description

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

Parametersosid.id.IdgradebookColumnIdthe gradebook column
osid.id.IdresourceIdthe key resource
osid.type.Type[]gradeEntryRecordTypesarray of grade entry record types
Returnosid.grading.GradeEntryFormthe grade entry form
ErrorsNOT_FOUND gradebookColumnId or resourceId not found
NULL_ARGUMENT gradebookColumnId, resourceId, or gradeEntryRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateGradeEntry
Description

Creates a new GradeEntry.

Parametersosid.grading.GradeEntryFormgradeEntryFormthe form for this GradeEntry
Returnosid.grading.GradeEntrythe new GradeEntry
ErrorsILLEGAL_STATE gradeEntryForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT gradeEntryForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED gradeEntryForm did not originate from getGradeEntryFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanOverridecalculatedGradeEntries
Description

Tests if this user can override grade entries calculated from another. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a grade entry 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 GradeEntry override is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetGradeEntryFormForOverride
Description

Gets the grade entry form for overriding calculated grade entries. A new form should be requested for each create transaction.

Parametersosid.id.IdgradeEntryIdthe Id of the grade entry to be overridden
osid.type.Type[]gradeEntryRecordTypesarray of grade entry record types
Returnosid.grading.GradeEntryFormthe grade entry form
ErrorsALREADY_EXISTS gradeEntryId is already overridden
NOT_FOUND gradeEntryId not found or gradeEntryId is not a calculated entry
NULL_ARGUMENT gradeEntryId or gradeEntryRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodoverrideCalculatedGradeEntry
Description

Creates a new overriding GradeEntry.

Parametersosid.grading.GradeEntryFormgradeEntryFormthe form for this GradeEntry
Returnosid.grading.GradeEntrythe new GradeEntry
ErrorsILLEGAL_STATE gradeEntryForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT gradeEntryForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED gradeEntryForm did not originate from getGradeEntryFormForOverride()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateGradeEntries
Description

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

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

Parametersosid.id.IdgradeEntryIdthe Id of the GradeEntry
Returnosid.grading.GradeEntryFormthe grade entry form
ErrorsNOT_FOUND gradeEntryId is not found
NULL_ARGUMENT gradeEntryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateGradeEntry
Description

Updates an existing grade entry.

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

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

Deletes the GradeEntry identified by the given Id.

Parametersosid.id.IdgradeEntryIdthe Id of the GradeEntry to delete
ErrorsNOT_FOUNDa GradeEntry was not found identified by the given Id
NULL_ARGUMENT gradeEntryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageGradeEntryAliases
Description

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

Adds an Id to a GradeEntry for the purpose of creating compatibility. The primary Id of the GradeEntry 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 entry, it is reassigned to the given grade entry Id.

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