OSID Logo
OSID Specifications
assessment package
Version 3.0.0
Release Candidate Preview
Interfaceosid.assessment.AssessmentAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Assessments. To unmap an Assessment from the current Bank, the AssessmentBankAssignmentSession should be used. These delete operations attempt to remove the Assessment itself thus removing it from all known Bank catalogs.

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

MethodgetBankId
Description

Gets the Bank Id associated with this session.

Returnosid.id.Idthe Bank Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetBank
Description

Gets the Bank associated with this session.

Returnosid.assessment.Bankthe Bank associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodcanCreateAssessments
Description

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

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

Parametersosid.type.Type[]assessmentRecordTypesarray of assessment record types
Returnboolean true if Assessment creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT assessmentRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetAssessmentFormForCreate
Description

Gets the assessment form for creating new assessments. A new form should be requested for each create transaction.

Parametersosid.type.Type[]assessmentRecordTypesarray of assessment record types to be included in the create operation or an empty list if none
Returnosid.assessment.AssessmentFormthe assessment form
ErrorsNULL_ARGUMENT assessmentRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateAssessment
Description

Creates a new Assessment.

Parametersosid.assessment.AssessmentFormassessmentFormthe form for this Assessment
Returnosid.assessment.Assessmentthe new Assessment
ErrorsILLEGAL_STATE assessmentForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT assessmentForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTED assessmentForm did not originate from getAssessmentFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateAssessments
Description

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

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

Parametersosid.id.IdassessmentIdthe Id of the Assessment
Returnosid.assessment.AssessmentFormthe assessment form
ErrorsNOT_FOUND assessmentId is not found
NULL_ARGUMENT assessmentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodupdateAssessment
Description

Updates an existing assessment.

Parametersosid.assessment.AssessmentFormassessmentFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE assessmentForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT assessmentForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTED assessmentForm did not originate from getAssessmentFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteAssessments
Description

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

Deletes an Assessment.

Parametersosid.id.IdassessmentIdthe Id of the Assessment to remove
ErrorsNOT_FOUND assessmentId not found
NULL_ARGUMENT assessmentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodcanManageAssessmentAliases
Description

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

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

Parametersosid.id.IdassessmentIdthe Id of an Assessment
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is in use as a primary Id
NOT_FOUND assessmentId not found
NULL_ARGUMENT assessmentId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.