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

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

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

The delete operations delete AssessmentsTaken. To unmap an AssessmentTakenForm from the current Bank, the AssessmentTakenFormBankAssignmentSession should be used. These delete operations attempt to remove the AssessmentTakenForm 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.
MethodcanCreateAssessmentsTaken
Description

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

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

Parametersosid.type.Type[]assessmentTakenRecordTypesarray of assessment taken record types
Returnboolean true if AssessmentTaken creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT assessmentTakenRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetAssessmentTakenFormForCreate
Description

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

Parametersosid.id.IdassessmentOfferedIdthe Id of the related AssessmentOffered
osid.type.Type[]assessmentTakenRecordTypesarray of assessment taken record types to be included in the create operation or an empty list if none
Returnosid.assessment.AssessmentTakenFormthe assessment taken form
ErrorsNOT_FOUND assessmentOfferedId is not found
NULL_ARGUMENT assessmentOfferedId or assessmentTakenRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateAssessmentTaken
Description

Creates a new AssessmentTaken.

Parametersosid.assessment.AssessmentTakenFormassessmentTakenFormthe form for this AssessmentTaken
Returnosid.assessment.AssessmentTakenthe new AssessmentTaken
ErrorsILLEGAL_STATE assessmentTakenForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT assessmentTakenForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTED assessmentOfferedForm did not originate from getAssessmentTakenFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateAssessmentsTaken
Description

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

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

Parametersosid.id.IdassessmentTakenIdthe Id of the AssessmentTaken
Returnosid.assessment.AssessmentTakenFormthe assessment taken form
ErrorsNOT_FOUND assessmentTakenId is not found
NULL_ARGUMENT assessmentTakenId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodupdateAssessmentTaken
Description

Updates an existing assessment taken.

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

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

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

Deletes an AssessmentTaken.

Parametersosid.id.IdassessmentTakenIdthe Id of the AssessmentTaken to remove
ErrorsNOT_FOUND assessmentTakenId not found
NULL_ARGUMENT assessmentTakenId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodcanManageAssessmentTakenAliases
Description

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

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

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