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

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

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

The delete operations delete AssessmentsOffered. To unmap an AssessmentOffered from the current Bank, the AssessmentOfferedBankAssignmentSession should be used. These delete operations attempt to remove the AssessmentOffered 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.
MethodcanCreateAssessmentsOffered
Description

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

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

Parametersosid.type.Type[]assessmentOfferedRecordTypesarray of assessment offered record types
Returnboolean true if AssessmentOffered creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT assessmentOfferedRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetAssessmentOfferedFormForCreate
Description

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

Parametersosid.id.IdassessmentIdthe Id of the related Assessment
osid.type.Type[]assessmentOfferedRecordTypesarray of assessment offered record types to be included in the create operation or an empty list if none
Returnosid.assessment.AssessmentOfferedFormthe assessment offered form
ErrorsNOT_FOUND assessmentId is not found
NULL_ARGUMENT assessmentId or assessmentOfferedRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateAssessmentOffered
Description

Creates a new AssessmentOffered.

Parametersosid.assessment.AssessmentOfferedFormassessmentOfferedFormthe form for this AssessmentOffered
Returnosid.assessment.AssessmentOfferedthe new AssessmentOffered
ErrorsILLEGAL_STATE assessmentOffreredForm 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.
MethodcanUpdateAssessmentsOffered
Description

Tests if this user can update AssessmentOffered objects. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an AssessmentOffered 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.
MethodgetAssessmentOfferedFormForUpdate
Description

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

Parametersosid.id.IdassessmentOfferedIdthe Id of the AssessmentOffered
Returnosid.assessment.AssessmentOfferedFormthe assessment offered form
ErrorsNOT_FOUND assessmentOfferedId is not found
NULL_ARGUMENT assessmentOfferedId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodupdateAssessmentOffered
Description

Updates an existing assessment offered.

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

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

Deletes an AssessmentOffered.

Parametersosid.id.IdassessmentOfferedIdthe Id of the AssessmentOffered to remove
ErrorsNOT_FOUND assessmentOfferedId not found
NULL_ARGUMENT assessmentOfferedId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodcanManageAssessmentOfferedAliases
Description

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

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

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