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

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

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

The delete operations delete AssessmentParts.

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
CompliancemandatoryThis method must be implemented.
MethodcanCreateAssessmentParts
Description

Tests if this user can create assessment parts. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to unauthorized users.

Returnboolean false if AssessmentPart creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateAssessmentPartWithRecordTypes
Description

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

Parametersosid.type.Type[]assessmentPartRecordTypesarray of assessment part record types
Returnboolean true if AssessmentPart creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT assessmentPartRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetAssessmentPartFormForCreateForAssessment
Description

Gets the assessment part form for creating new assessment parts for an assessment. A new form should be requested for each create transaction.

Parametersosid.id.IdassessmentIdan assessment Id
osid.type.Type[]assessmentPartRecordTypesarray of assessment part record types to be included in the create operation or an empty list if none
Returnosid.assessment.authoring.AssessmentPartFormthe assessment part form
ErrorsNOT_FOUND assessmentId is not found
NULL_ARGUMENT assessmentId or assessmentPartRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateAssessmentPartForAssessment
Description

Creates a new assessment part.

Parametersosid.assessment.authoring.AssessmentPartFormassessmentPartFormassessment part form
Returnosid.assessment.authoring.AssessmentPartthe new part
ErrorsILLEGAL_STATE assessmentPartForm already used in a create transaction
INVALID_ARGUMENT assessmentPartForm is invalid
NULL_ARGUMENT assessmentPartForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTED assessmentPartForm did not originate from getAssessmentPartFormForCreateForAssessment()
CompliancemandatoryThis method must be implemented.
MethodgetAssessmentPartFormForCreateForAssessmentPart
Description

Gets the assessment part form for creating new assessment parts under another assessment part. A new form should be requested for each create transaction.

Parametersosid.id.IdassessmentPartIdan assessment part Id
osid.type.Type[]assessmentPartRecordTypesarray of assessment part record types to be included in the create operation or an empty list if none
Returnosid.assessment.authoring.AssessmentPartFormthe assessment part form
ErrorsNOT_FOUND assessmentPartId is not found
NULL_ARGUMENT assessmentPartId or assessmentPartRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateAssessmentPartForAssessmentPart
Description

Creates a new assessment part.

Parametersosid.assessment.authoring.AssessmentPartFormassessmentPartFormassessment part form
Returnosid.assessment.authoring.AssessmentPartthe new part
ErrorsILLEGAL_STATE assessmentPartForm already used in a create transaction
INVALID_ARGUMENT assessmentPartForm is invalid
NULL_ARGUMENT assessmentPartForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTED assessmentPartForm did not originate from getAssessmentPartFormForCreateForAssessmentPart()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateAssessmentParts
Description

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

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

Parametersosid.id.IdassessmentPartIdthe Id of the AssessmentPart
Returnosid.assessment.authoring.AssessmentPartFormthe assessment part form
ErrorsNOT_FOUND assessmentPartId is not found
NULL_ARGUMENT assessmentPartId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodupdateAssessmentPart
Description

Updates an existing assessment part.

Parametersosid.id.IdassessmentPartIdthe Id of the AssessmentPart
osid.assessment.authoring.AssessmentPartFormassessmentPartFormpart form
ErrorsNOT_FOUND assessmentPartId not found
NULL_ARGUMENT assessmentPartId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTED assessmentPartForm is not of this service
CompliancemandatoryThis method must be implemented.
MethodcanDeleteAssessmentParts
Description

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

Removes an asessment part and all mapped items.

Parametersosid.id.IdassessmentPartIdthe Id of the AssessmentPart
ErrorsNOT_FOUND assessmentPartId not found
NULL_ARGUMENT assessmentPartId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodcanManageAssessmentPartAliases
Description

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

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

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