Bank¶
Bank¶
-
class
dlkit.services.assessment.Bank¶ Bases:
dlkit.osid.objects.OsidCatalog,dlkit.osid.sessions.OsidSession-
get_bank_record(bank_record_type)¶ Gets the bank record corresponding to the given
BankrecordType. This method is used to retrieve an object implementing the requested record. Thebank_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(bank_record_type)istrue.Parameters: bank_record_type ( osid.type.Type) – a bank record typeReturns: the bank record Return type: osid.assessment.records.BankRecordRaise: NullArgument–bank_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(bank_record_type)isfalse
-
Assessment Methods¶
Bank.can_take_assessments()¶Tests if this user can take this assessment section. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a
PermissionDenied. This is intended as a hint to an application that may opt not to offer assessment operations to unauthorized users.
Returns: falseif assessment methods are not authorized,trueotherwiseReturn type: boolean
Bank.has_assessment_begun(assessment_taken_id)¶Tests if this assessment has started. An assessment begins from the designated start time if a start time is defined. If no start time is defined the assessment may begin at any time. Assessment sections cannot be accessed if the return for this method is
false.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenReturns: trueif this assessment has begun,falseotherwiseReturn type: booleanRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.is_assessment_over(assessment_taken_id)¶Tests if this assessment is over. An assessment is over if
finished_assessment()is invoked or the designated finish time has expired.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenReturns: trueif this assessment is over,falseotherwiseReturn type: booleanRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.requires_synchronous_sections(assessment_taken_id)¶Tests if synchronous sections are required. This method should be checked to determine if all sections are available when requested, or the next sections becomes available only after the previous section is complete.
There are two methods for retrieving sections. One is using the built-in hasNextSection() and getNextSection() methods. In synchronous mode, hasNextSection() is false until the current section is completed. In asynchronous mode,
has_next_section()returns true until the end of the assessment.
AssessmentSectionsmay also be accessed via anAssessmentSectionList. If syncronous sections are required,AssessmentSectionList.available() == 0andAssessmentSectionList.getNextQuestion()blocks until the section is complete.AssessmentSectionList.hasNext()is always true until the end of the assessment is reached.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenReturns: trueif this synchronous sections are required,falseotherwiseReturn type: booleanRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_first_assessment_section(assessment_taken_id)¶Gets the first assessment section in this assesment. All assessments have at least one
AssessmentSection.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenReturns: the first assessment section Return type: osid.assessment.AssessmentSectionRaise: IllegalState–has_assessment_begun()isfalseRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.has_next_assessment_section(assessment_section_id)¶Tests if there is a next assessment section in the assessment following the given assessment section
Id.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: trueif there is a next section,falseotherwiseReturn type: booleanRaise: IllegalState–has_assessment_begun()isfalseRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_next_assessment_section(assessment_section_id)¶Gets the next assessemnt section following the given assesment section.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: the next section Return type: osid.assessment.AssessmentSectionRaise: IllegalState–has_next_assessment_section()isfalseRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.has_previous_assessment_section(assessment_section_id)¶Tests if there is a previous assessment section in the assessment following the given assessment section
Id.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: trueif there is a previous assessment section,falseotherwiseReturn type: booleanRaise: IllegalState–has_assessment_begun()isfalseRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_previous_assessment_section(assessment_section_id)¶Gets the next assessemnt section following the given assesment section.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: the previous assessment section Return type: osid.assessment.AssessmentSectionRaise: IllegalState–has_next_assessment_section()isfalseRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessment_section(assessment_section_id)¶Gets an assessemnts section by
Id.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: the assessment section Return type: osid.assessment.AssessmentSectionRaise: IllegalState–has_assessment_begun()isfalseRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessment_sections(assessment_taken_id)¶Gets the assessment sections of this assessment.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenReturns: the list of assessment sections Return type: osid.assessment.AssessmentSectionListRaise: IllegalState–has_assessment_begun()isfalseRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.is_assessment_section_complete(assessment_section_id)¶Tests if the all responses have been submitted to this assessment section. If
is_assessment_section_complete()is false, thenget_unanswered_questions()may return a list of questions that can be submitted.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: trueif this assessment section is complete,falseotherwiseReturn type: booleanRaise: IllegalState–is_assessment_over()istrueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Bank.get_incomplete_assessment_sections(assessment_taken_id)¶Gets the incomplete assessment sections of this assessment.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenReturns: the list of incomplete assessment sections Return type: osid.assessment.AssessmentSectionListRaise: IllegalState–has_assessment_begun()isfalseRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.has_assessment_section_begun(assessment_section_id)¶Tests if this assessment section has started. A section begins from the designated start time if a start time is defined. If no start time is defined the section may begin at any time. Assessment items cannot be accessed or submitted if the return for this method is
false.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: trueif this assessment section has begun,falseotherwiseReturn type: booleanRaise: IllegalState–has_assessment_begun()isfalse or is_assessment_over()istrueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Bank.is_assessment_section_over(assessment_section_id)¶Tests if this assessment section is over. An assessment section is over if new or updated responses can not be submitted such as the designated finish time has expired.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: trueif this assessment is over,falseotherwiseReturn type: booleanRaise: IllegalState–has_assessmen_sectiont_begun()isfalse or is_assessment_section_over()istrueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Bank.requires_synchronous_responses(assessment_section_id)¶Tests if synchronous responses are required in this assessment section. This method should be checked to determine if all items are available when requested, or the next item becomes available only after the response to the current item is submitted.
There are two methods for retrieving questions. One is using the built-in
has_next_question()andget_next_question()methods. In synchronous mode,has_next_question()isfalseuntil the response for the current question is submitted. In asynchronous mode,has_next_question()returnstrueuntil the end of the assessment.
Questionsmay also be accessed via aQuestionList. If syncronous responses are required,QuestionList.available() == 0andQuestionList.getNextQuestion()blocks until the response is submitted.QuestionList.hasNext()is always true until the end of the assessment is reached.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: trueif this synchronous responses are required,falseotherwiseReturn type: booleanRaise: IllegalState–has_assessment_begun()isfalse or is_assessment_over()istrueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Bank.get_first_question(assessment_section_id)¶Gets the first question in this assesment section.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: the first question Return type: osid.assessment.QuestionRaise: IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.has_next_question(assessment_section_id, item_id)¶Tests if there is a next question following the given question
Id.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns:
trueif there is a next question,falseotherwiseReturn type:
booleanRaise:
IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise:
NotFound–assessment_section_idoritem_idis not found, oritem_idnot part ofassessment_section_idRaise:
NullArgument–assessment_section_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_next_question(assessment_section_id, item_id)¶Gets the next question in this assesment section.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns: the next question
Return type:
osid.assessment.QuestionRaise:
IllegalState–has_next_question()isfalseRaise:
NotFound–assessment_section_idoritem_idis not found, oritem_idnot part ofassessment_section_idRaise:
NullArgument–assessment_section_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.has_previous_question(assessment_section_id, item_id)¶Tests if there is a previous question preceeding the given question
Id.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns:
trueif there is a previous question,falseotherwiseReturn type:
booleanRaise:
IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise:
NotFound–assessment_section_idoritem_idis not found, oritem_idnot part ofassessment_section_idRaise:
NullArgument–assessment_section_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_previous_question(assessment_section_id, item_id)¶Gets the previous question in this assesment section.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns: the previous question
Return type:
osid.assessment.QuestionRaise:
IllegalState–has_previous_question()isfalseRaise:
NotFound–assessment_section_idoritem_idis not found, oritem_idnot part ofassessment_section_idRaise:
NullArgument–assessment_section_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_question(assessment_section_id, item_id)¶Gets the
Questionspecified by itsId.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns: the returned
QuestionReturn type:
osid.assessment.QuestionRaise:
IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise:
NotFound–assessment_section_idoritem_idis not found, oritem_idnot part ofassessment_section_idRaise:
NullArgument–assessment_section_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_questions(assessment_section_id)¶Gets the questions of this assessment section.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: the list of assessment questions Return type: osid.assessment.QuestionListRaise: IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_response_form(assessment_section_id, item_id)¶Gets the response form for submitting an answer.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns: an answer form
Return type:
osid.assessment.AnswerFormRaise:
IllegalState–has_assessment_section_begun()isfalse or is_assessment_section_over()istrueRaise:
NotFound–assessment_section_idoritem_idis not found, oritem_idnot part ofassessment_section_idRaise:
NullArgument–assessment_section_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.submit_response(assessment_section_id, item_id, answer_form)¶Submits an answer to an item.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItem- answer_form (
osid.assessment.AnswerForm) – the responseRaise:
IllegalState–has_assessment_section_begun()isfalse or is_assessment_section_over()istrueRaise:
InvalidArgument– one or more of the elements in the form is invalidRaise:
NotFound–assessment_section_idoritem_idis not found, oritem_idnot part ofassessment_section_idRaise:
NullArgument–assessment_section_id, item_id,oranswer_formisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failureRaise:
Unsupported–answer_formis not of this service
Bank.skip_item(assessment_section_id, item_id)¶Skips an item.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemRaise:
IllegalState–has_assessment_section_begun()isfalse or is_assessment_section_over()istrueRaise:
NotFound–assessment_section_idoritem_idis not found, oritem_idnot part ofassessment_section_idRaise:
NullArgument–assessment_section_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Bank.is_question_answered(assessment_section_id, item_id)¶Tests if the given item has a response.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns:
trueif this item has a response,falseotherwiseReturn type:
booleanRaise:
IllegalState–has_assessment_section_begun()isfalse or is_assessment_section_over()istrueRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Bank.get_unanswered_questions(assessment_section_id)¶Gets the unanswered questions of this assessment section.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: the list of questions with no rsponses Return type: osid.assessment.QuestionListRaise: IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.has_unanswered_questions(assessment_section_id)¶Tests if there are unanswered questions in this assessment section.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: trueif there are unanswered questions,falseotherwiseReturn type: booleanRaise: IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_first_unanswered_question(assessment_section_id)¶Gets the first unanswered question in this assesment section.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: the first unanswered question Return type: osid.assessment.QuestionRaise: IllegalState–has_unanswered_questions()isfalseRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.has_next_unanswered_question(assessment_section_id, item_id)¶Tests if there is a next unanswered question following the given question
Id.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns:
trueif there is a next unanswered question,falseotherwiseReturn type:
booleanRaise:
IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_next_unanswered_question(assessment_section_id, item_id)¶Gets the next unanswered question in this assesment section.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns: the next unanswered question
Return type:
osid.assessment.QuestionRaise:
IllegalState–has_next_unanswered_question()isfalseRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.has_previous_unanswered_question(assessment_section_id, item_id)¶Tests if there is a previous unanswered question preceeding the given question
Id.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns:
trueif there is a previous unanswered question,falseotherwiseReturn type:
booleanRaise:
IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_previous_unanswered_question(assessment_section_id, item_id)¶Gets the previous unanswered question in this assesment section.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns: the previous unanswered question
Return type:
osid.assessment.QuestionRaise:
IllegalState–has_previous_unanswered_question()isfalseRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_response(assessment_section_id, item_id)¶Gets the submitted response to the associated item.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns: the response
Return type:
osid.assessment.ResponseRaise:
IllegalState–has_assessment_section_begun()isfalse or is_assessment_section_over()istrueRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Bank.get_responses(assessment_section_id)¶Gets all submitted responses.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: the list of responses Return type: osid.assessment.ResponseListRaise: IllegalState–has_assessment_section_begun()isfalse or is_assessment_section_over()istrueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Bank.clear_response(assessment_section_id, item_id)¶Clears the response to an item The item appears as unanswered. If no response exists, the method simply returns.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemRaise:
IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Bank.finish_assessment_section(assessment_section_id)¶Indicates an assessment section is complete. Finished sections may or may not allow new or updated responses.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionRaise: IllegalState–has_assessment_section_begun()isfalse or is_assessment_section_over()istrueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Bank.is_answer_available(assessment_section_id, item_id)¶Tests if an answer is available for the given item.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns:
trueif an answer are available,falseotherwiseReturn type:
booleanRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Bank.get_answers(assessment_section_id, item_id)¶Gets the acceptable answers to the associated item.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns: the answers
Return type:
osid.assessment.AnswerListRaise:
IllegalState–is_answer_available()isfalseRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Bank.finish_assessment(assessment_taken_id)¶Indicates the entire assessment is complete.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenRaise: IllegalState–has_begun()isfalse or is_over()istrueRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Item Lookup Methods¶
Bank.can_lookup_items()¶Tests if this user can perform
Itemlookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer lookup operations.
Returns: falseif lookup methods are not authorized,trueotherwiseReturn type: boolean
Bank.use_comparative_item_view()¶The returns from the lookup methods may omit or translate elements based on this session, such as assessment, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
Bank.use_plenary_item_view()¶A complete view of the
Itemreturns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
Bank.use_federated_bank_view()¶Federates the view for methods in this session. A federated view will include assessment items in assessment banks which are children of this assessment bank in the assessment bank hierarchy.
Bank.use_isolated_bank_view()¶Isolates the view for methods in this session. An isolated view restricts lookups to this assessment bank only.
Bank.get_item(item_id)¶Gets the
Itemspecified by itsId. In plenary mode, the exactIdis found or aNotFoundresults. Otherwise, the returnedItemmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anItemand retained for compatibility.
Parameters: item_id ( osid.id.Id) – theIdof theItemto retrieveReturns: the returned ItemReturn type: osid.assessment.ItemRaise: NotFound– noItemfound with the givenIdRaise: NullArgument–item_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_items_by_ids(item_ids)¶Gets an
ItemListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the items specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleItemsmay be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: item_ids ( osid.id.IdList) – the list ofIdsto retrieveReturns: the returned ItemlistReturn type: osid.assessment.ItemListRaise: NotFound– anId wasnot foundRaise: NullArgument–item_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_items_by_genus_type(item_genus_type)¶Gets an
ItemListcorresponding to the given assessment item genusTypewhich does not include assessment items of genus types derived from the specifiedType. In plenary mode, the returned list contains all known assessment items or an error results. Otherwise, the returned list may contain only those assessment items that are accessible through this session.
Parameters: item_genus_type ( osid.type.Type) – an assessment item genus typeReturns: the returned ItemlistReturn type: osid.assessment.ItemListRaise: NullArgument–item_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_items_by_parent_genus_type(item_genus_type)¶Gets an
ItemListcorresponding to the given assessment item genusTypeand include any additional assessment items with genus types derived from the specifiedType. In plenary mode, the returned list contains all known assessment items or an error results. Otherwise, the returned list may contain only those assessment items that are accessible through this session.
Parameters: item_genus_type ( osid.type.Type) – an assessment item genus typeReturns: the returned ItemlistReturn type: osid.assessment.ItemListRaise: NullArgument–item_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_items_by_record_type(item_record_type)¶Gets an
ItemListcontaining the given assessment item recordType. In plenary mode, the returned list contains all known items or an error results. Otherwise, the returned list may contain only those assessment items that are accessible through this session.
Parameters: item_record_type ( osid.type.Type) – an item record typeReturns: the returned ItemlistReturn type: osid.assessment.ItemListRaise: NullArgument–item_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_items_by_question(question_id)¶Gets an
ItemListcontaining the given question. In plenary mode, the returned list contains all known items or an error results. Otherwise, the returned list may contain only those assessment items that are accessible through this session.
Parameters: question_id ( osid.id.Id) – a questionIdReturns: the returned ItemlistReturn type: osid.assessment.ItemListRaise: NullArgument–question_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_items_by_answer(answer_id)¶Gets an
ItemListcontaining the given answer. In plenary mode, the returned list contains all known items or an error results. Otherwise, the returned list may contain only those assessment items that are accessible through this session.
Parameters: answer_id ( osid.id.Id) – an answerIdReturns: the returned ItemlistReturn type: osid.assessment.ItemListRaise: NullArgument–answer_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_items_by_learning_objective(objective_id)¶Gets an
ItemListcontaining the given learning objective. In plenary mode, the returned list contains all known items or an error results. Otherwise, the returned list may contain only those assessment items that are accessible through this session.
Parameters: objective_id ( osid.id.Id) – a learning objectiveIdReturns: the returned ItemlistReturn type: osid.assessment.ItemListRaise: NullArgument–objective_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_items_by_learning_objectives(objective_ids)¶Gets an
ItemListcontaining the given learning objectives. In plenary mode, the returned list contains all known items or an error results. Otherwise, the returned list may contain only those assessment items that are accessible through this session.
Parameters: objective_ids ( osid.id.IdList) – a list of learning objectiveIdsReturns: the returned ItemlistReturn type: osid.assessment.ItemListRaise: NullArgument–objective_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Item Query Methods¶
Bank.can_search_items()¶Tests if this user can perform
Itemsearches. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPermissionDenied. This is intended as a hint to an pplication that may wish not to offer search operations to unauthorized users.
Returns: falseif search methods are not authorized,trueotherwiseReturn type: boolean
Bank.use_federated_bank_view()Federates the view for methods in this session. A federated view will include assessment items in assessment banks which are children of this assessment bank in the assessment bank hierarchy.
Bank.use_isolated_bank_view()Isolates the view for methods in this session. An isolated view restricts lookups to this assessment bank only.
Bank.item_query¶Gets an assessment item query.
Returns: the assessment item query Return type: osid.assessment.ItemQuery
Bank.get_items_by_query(item_query)¶Gets a list of
Itemsmatching the given item query.
Parameters: item_query ( osid.assessment.ItemQuery) – the item queryReturns: the returned ItemListReturn type: osid.assessment.ItemListRaise: NullArgument–item_queryisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–item_queryis not of this service
Item Admin Methods¶
Bank.can_create_items()¶Tests if this user can create
Items. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anItemwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
Returns: falseifItemcreation is not authorized,trueotherwiseReturn type: boolean
Bank.can_create_item_with_record_types(item_record_types)¶Tests if this user can create a single
Itemusing the desired record types. WhileAssessmentManager.getItemRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificItem. Providing an empty array tests if anItemcan be created with no records.
Parameters: item_record_types ( osid.type.Type[]) – array of item record typesReturns: trueifItemcreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–item_record_typesisnull
Bank.get_item_form_for_create(item_record_types)¶Gets the assessment item form for creating new assessment items. A new form should be requested for each create transaction.
Parameters: item_record_types ( osid.type.Type[]) – array of item record types to be included in the create operation or an empty list if noneReturns: the assessment item form Return type: osid.assessment.ItemFormRaise: NullArgument–item_record_typesisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported– unable to get form for requested record types
Bank.create_item(item_form)¶Creates a new
Item.
Parameters: item_form ( osid.assessment.ItemForm) – the form for thisItemReturns: the new ItemReturn type: osid.assessment.ItemRaise: IllegalState–item_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–item_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–item_formdid not originate fromget_item_form_for_create()
Bank.can_update_items()¶Tests if this user can update
Items. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anItemwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
Returns: falseif assessment item modification is not authorized,trueotherwiseReturn type: boolean
Bank.get_item_form_for_update(item_id)¶Gets the assessment item form for updating an existing item. A new item form should be requested for each update transaction.
Parameters: item_id ( osid.id.Id) – theIdof theItemReturns: the assessment item form Return type: osid.assessment.ItemFormRaise: NotFound–item_idis not foundRaise: NullArgument–item_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.update_item(item_form)¶Updates an existing item.
Parameters: item_form ( osid.assessment.ItemForm) – the form containing the elements to be updatedRaise: IllegalState–item_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–item_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–item_formdid not originate fromget_item_form_for_update()
Bank.can_delete_items()¶Tests if this user can delete
Items. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anItemwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.
Returns: falseifItemdeletion is not authorized,trueotherwiseReturn type: boolean
Bank.delete_item(item_id)¶Deletes the
Itemidentified by the givenId.
Parameters: item_id ( osid.id.Id) – theIdof theItemto deleteRaise: NotFound– anItemwas not found identified by the givenIdRaise: NullArgument–item_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.can_manage_item_aliases()¶Tests if this user can manage
Idaliases forItems. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
Returns: falseifItemaliasing is not authorized,trueotherwiseReturn type: boolean
Bank.alias_item(item_id, alias_id)¶Adds an
Idto anItemfor the purpose of creating compatibility. The primaryIdof theItemis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another item, it is reassigned to the given itemId.
Parameters:
- item_id (
osid.id.Id) – theIdof anItem- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis in use as a primaryIdRaise:
NotFound–item_idnot foundRaise:
NullArgument–item_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.can_create_questions()¶Tests if this user can create
Questions. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aQuestionwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
Returns: falseifQuestioncreation is not authorized,trueotherwiseReturn type: boolean
Bank.can_create_question_with_record_types(question_record_types)¶Tests if this user can create a single
Questionusing the desired record types. WhileAssessmentManager.getQuestionRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificQuestion. Providing an empty array tests if aQuestioncan be created with no records.
Parameters: question_record_types ( osid.type.Type[]) – array of question record typesReturns: trueifQuestioncreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–question_record_typesisnull
Bank.get_question_form_for_create(item_id, question_record_types)¶Gets the question form for creating new questions. A new form should be requested for each create transaction.
Parameters:
- item_id (
osid.id.Id) – an assessment itemId- question_record_types (
osid.type.Type[]) – array of question record types to be included in the create operation or an empty list if noneReturns: the question form
Return type:
osid.assessment.QuestionFormRaise:
NullArgument–question_record_typesisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurredRaise:
Unsupported– unable to get form for requested record types
Bank.create_question(question_form)¶Creates a new
Question.
Parameters: question_form ( osid.assessment.QuestionForm) – the form for thisQuestionReturns: the new QuestionReturn type: osid.assessment.QuestionRaise: AlreadyExists– a question already exists for this itemRaise: IllegalState–question_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–question_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–question_formdid not originate fromget_question_form_for_create()
Bank.can_update_questions()¶Tests if this user can update
Questions. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aQuestionwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
Returns: falseif question modification is not authorized,trueotherwiseReturn type: boolean
Bank.get_question_form_for_update(question_id)¶Gets the question form for updating an existing question. A new question form should be requested for each update transaction.
Parameters: question_id ( osid.id.Id) – theIdof theQuestionReturns: the question form Return type: osid.assessment.QuestionFormRaise: NotFound–question_idis not foundRaise: NullArgument–question_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.update_question(question_form)¶Updates an existing question.
Parameters: question_form ( osid.assessment.QuestionForm) – the form containing the elements to be updatedRaise: IllegalState–question_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–question_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–question_formdid not originate fromget_question_form_for_update()
Bank.can_delete_questions()¶Tests if this user can delete
Questions. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aQuestionwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.
Returns: falseifQuestiondeletion is not authorized,trueotherwiseReturn type: boolean
Bank.delete_question(question_id)¶Deletes the
Questionidentified by the givenId.
Parameters: question_id ( osid.id.Id) – theIdof theQuestionto deleteRaise: NotFound– aQuestionwas not found identified by the givenIdRaise: NullArgument–question_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.can_create_answers()¶Tests if this user can create
Answers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aAnswerwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
Returns: falseifAnswercreation is not authorized,trueotherwiseReturn type: boolean
Bank.can_create_answers_with_record_types(answer_record_types)¶Tests if this user can create a single
Answerusing the desired record types. WhileAssessmentManager.getAnswerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificAnswer. Providing an empty array tests if anAnswercan be created with no records.
Parameters: answer_record_types ( osid.type.Type[]) – array of answer record typesReturns: trueifAnswercreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–answern_record_typesisnull
Bank.get_answer_form_for_create(item_id, answer_record_types)¶Gets the answer form for creating new answers. A new form should be requested for each create transaction.
Parameters:
- item_id (
osid.id.Id) – an assessment itemId- answer_record_types (
osid.type.Type[]) – array of answer record types to be included in the create operation or an empty list if noneReturns: the answer form
Return type:
osid.assessment.AnswerFormRaise:
NullArgument–answer_record_typesisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurredRaise:
Unsupported– unable to get form for requested record types
Bank.create_answer(answer_form)¶Creates a new
Answer.
Parameters: answer_form ( osid.assessment.AnswerForm) – the form for thisAnswerReturns: the new AnswerReturn type: osid.assessment.AnswerRaise: IllegalState–answer_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–answer_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–answer_formdid not originate fromget_answer_form_for_create()
Bank.can_update_answers()¶Tests if this user can update
Answers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anAnswerwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
Returns: falseif answer modification is not authorized,trueotherwiseReturn type: boolean
Bank.get_answer_form_for_update(answer_id)¶Gets the answer form for updating an existing answer. A new answer form should be requested for each update transaction.
Parameters: answer_id ( osid.id.Id) – theIdof theAnswerReturns: the answer form Return type: osid.assessment.AnswerFormRaise: NotFound–answer_idis not foundRaise: NullArgument–answer_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.update_answer(answer_form)¶Updates an existing answer.
Parameters: answer_form ( osid.assessment.AnswerForm) – the form containing the elements to be updatedRaise: IllegalState–answer_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–answer_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–answer_formdid not originate fromget_answer_form_for_update()
Bank.can_delete_answers()¶Tests if this user can delete
Answers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anAnswerwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.
Returns: falseifAnswerdeletion is not authorized,trueotherwiseReturn type: boolean
Bank.delete_answer(answer_id)¶Deletes the
Answeridentified by the givenId.
Parameters: answer_id ( osid.id.Id) – theIdof theAnswerto deleteRaise: NotFound– anAnswerwas not found identified by the givenIdRaise: NullArgument–answer_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Assessment Lookup Methods¶
Bank.can_lookup_assessments()¶Tests if this user can perform
Assessmentlookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
Returns: falseif lookup methods are not authorized,trueotherwiseReturn type: boolean
Bank.use_comparative_assessment_view()¶The returns from the lookup methods may omit or translate elements based on this session, such as assessment, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
Bank.use_plenary_assessment_view()¶A complete view of the
Assessmentreturns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
Bank.use_federated_bank_view()Federates the view for methods in this session. A federated view will include assessment items in assessment banks which are children of this assessment bank in the assessment bank hierarchy.
Bank.use_isolated_bank_view()Isolates the view for methods in this session. An isolated view restricts lookups to this assessment bank only.
Bank.get_assessment(assessment_id)¶Gets the
Assessmentspecified by itsId. In plenary mode, the exactIdis found or aNotFoundresults. Otherwise, the returnedAssessmentmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aAssessmentand retained for compatibility.
Parameters: assessment_id ( osid.id.Id) –Idof theAssessmentReturns: the assessment Return type: osid.assessment.AssessmentRaise: NotFound–assessment_idnot foundRaise: NullArgument–assessment_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_by_ids(assessment_ids)¶Gets an
AssessmentListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the assessments specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleAssessmentsmay be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: assessment_ids ( osid.id.IdList) – the list ofIdsto retrieveReturns: the returned AssessmentlistReturn type: osid.assessment.AssessmentListRaise: NotFound– anId wasnot foundRaise: NullArgument–assessment_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– assessment failure
Bank.get_assessments_by_genus_type(assessment_genus_type)¶Gets an
AssessmentListcorresponding to the given assessment genusTypewhich does not include assessments of types derived from the specifiedType. In plenary mode, the returned list contains all known assessments or an error results. Otherwise, the returned list may contain only those assessments that are accessible through this session.
Parameters: assessment_genus_type ( osid.type.Type) – an assessment genus typeReturns: the returned AssessmentlistReturn type: osid.assessment.AssessmentListRaise: NullArgument–assessment_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_by_parent_genus_type(assessment_genus_type)¶Gets an
AssessmentListcorresponding to the given assessment genusTypeand include any additional assessments with genus types derived from the specifiedType. In plenary mode, the returned list contains all known assessments or an error results. Otherwise, the returned list may contain only those assessments that are accessible through this session.
Parameters: assessment_genus_type ( osid.type.Type) – an assessment genus typeReturns: the returned AssessmentlistReturn type: osid.assessment.AssessmentListRaise: NullArgument–assessment_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_by_record_type(assessment_record_type)¶Gets an
AssessmentListcorresponding to the given assessment recordType. The set of assessments implementing the given record type is returned. In plenary mode, the returned list contains all known assessments or an error results. Otherwise, the returned list may contain only those assessments that are accessible through this session.
Parameters: assessment_record_type ( osid.type.Type) – an assessment record typeReturns: the returned AssessmentlistReturn type: osid.assessment.AssessmentListRaise: NullArgument–assessment_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.assessments¶Gets all
Assessments. In plenary mode, the returned list contains all known assessments or an error results. Otherwise, the returned list may contain only those assessments that are accessible through this session.
Returns: a list of AssessmentsReturn type: osid.assessment.AssessmentListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Assessment Query Methods¶
Bank.can_search_assessments()¶Tests if this user can perform
Assessmentsearches. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPermissionDenied. This is intended as a hint to an pplication that may wish not to offer search operations to unauthorized users.
Returns: falseif search methods are not authorized,trueotherwiseReturn type: boolean
Bank.use_federated_bank_view()Federates the view for methods in this session. A federated view will include assessment items in assessment banks which are children of this assessment bank in the assessment bank hierarchy.
Bank.use_isolated_bank_view()Isolates the view for methods in this session. An isolated view restricts lookups to this assessment bank only.
Bank.assessment_query¶Gets an assessment query.
Returns: the assessment query Return type: osid.assessment.AssessmentQuery
Bank.get_assessments_by_query(assessment_query)¶Gets a list of
Assessmentsmatching the given assessment query.
Parameters: assessment_query ( osid.assessment.AssessmentQuery) – the assessment queryReturns: the returned AssessmentListReturn type: osid.assessment.AssessmentListRaise: NullArgument–assessment_queryisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_queryis not of this service
Assessment Admin Methods¶
Bank.can_create_assessments()¶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 anAssessmentwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
Returns: falseifAssessmentcreation is not authorized,trueotherwiseReturn type: boolean
Bank.can_create_assessment_with_record_types(assessment_record_types)¶Tests if this user can create a single
Assessmentusing the desired record interface types. WhileAssessmentManager.getAssessmentRecordTypes()can be used to examine which record interfaces are supported, this method tests which record(s) are required for creating a specificAssessment. Providing an empty array tests if anAssessmentcan be created with no records.
Parameters: assessment_record_types ( osid.type.Type[]) – array of assessment record typesReturns: trueifAssessmentcreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–assessment_record_typesisnull
Bank.get_assessment_form_for_create(assessment_record_types)¶Gets the assessment form for creating new assessments. A new form should be requested for each create transaction.
Parameters: assessment_record_types ( osid.type.Type[]) – array of assessment record types to be included in the create operation or an empty list if noneReturns: the assessment form Return type: osid.assessment.AssessmentFormRaise: NullArgument–assessment_record_typesisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported– unable to get form for requested record types
Bank.create_assessment(assessment_form)¶Creates a new
Assessment.
Parameters: assessment_form ( osid.assessment.AssessmentForm) – the form for thisAssessmentReturns: the new AssessmentReturn type: osid.assessment.AssessmentRaise: IllegalState–assessment_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–assessment_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_formdid not originate fromget_assessment_form_for_create()
Bank.can_update_assessments()¶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 anAssessmentwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
Returns: falseifAssessmentmodification is not authorized,trueotherwiseReturn type: boolean
Bank.get_assessment_form_for_update(assessment_id)¶Gets the assessment form for updating an existing assessment. A new assessment form should be requested for each update transaction.
Parameters: assessment_id ( osid.id.Id) – theIdof theAssessmentReturns: the assessment form Return type: osid.assessment.AssessmentFormRaise: NotFound–assessment_idis not foundRaise: NullArgument–assessment_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.update_assessment(assessment_form)¶Updates an existing assessment.
Parameters: assessment_form ( osid.assessment.AssessmentForm) – the form containing the elements to be updatedRaise: IllegalState–assessment_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–assessment_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_form did not originate from get_assessment_form_for_update()
Bank.can_delete_assessments()¶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 anAssessmentwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.
Returns: falseifAssessmentdeletion is not authorized,trueotherwiseReturn type: boolean
Bank.delete_assessment(assessment_id)¶Deletes an
Assessment.
Parameters: assessment_id ( osid.id.Id) – theIdof theAssessmentto removeRaise: NotFound–assessment_idnot foundRaise: NullArgument–assessment_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.can_manage_assessment_aliases()¶Tests if this user can manage
Idaliases forAssessments. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
Returns: falseifAssessmentaliasing is not authorized,trueotherwiseReturn type: boolean
Bank.alias_assessment(assessment_id, alias_id)¶Adds an
Idto anAssessmentfor the purpose of creating compatibility. The primaryIdof theAssessmentis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another assessment, it is reassigned to the given assessmentId.
Parameters:
- assessment_id (
osid.id.Id) – theIdof anAssessment- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis in use as a primaryIdRaise:
NotFound–assessment_idnot foundRaise:
NullArgument–assessment_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Assessment Basic Authoring Methods¶
Tests if this user can author assessments. 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
PermissionDenied. This is intended as a hint to an application that may opt not to offer authoring operations to unauthorized users.
Returns: falseif mapping is not authorized,trueotherwiseReturn type: boolean
Bank.get_items(assessment_taken_id)¶Gets the items questioned in a assessment.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenReturns: the list of assessment questions Return type: osid.assessment.ItemListRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.add_item(assessment_id, item_id)¶Adds an existing
Itemto an assessment.
Parameters:
- assessment_id (
osid.id.Id) – theIdof theAssessment- item_id (
osid.id.Id) – theIdof theItemRaise:
NotFound–assessment_idoritem_idnot foundRaise:
NullArgument–assessment_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.remove_item(assessment_id, item_id)¶Removes an
Itemfrom this assessment.
Parameters:
- assessment_id (
osid.id.Id) – theIdof theAssessment- item_id (
osid.id.Id) – theIdof theItemRaise:
NotFound–assessment_idoritem_idnot found oritem_idnot onassessmentidRaise:
NullArgument–assessment_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.move_item(assessment_id, item_id, preceeding_item_id)¶Moves an existing item to follow another item in an assessment.
Parameters:
- assessment_id (
osid.id.Id) – theIdof theAssessment- item_id (
osid.id.Id) – theIdof anItem- preceeding_item_id (
osid.id.Id) – theIdof a preceedingItemin the sequenceRaise:
NotFound–assessment_idis not found, oritem_idorpreceeding_item_idnot onassessment_idRaise:
NullArgument–assessment_id, item_idorpreceeding_item_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.order_items(item_ids, assessment_id)¶Sequences existing items in an assessment.
Parameters:
- item_ids (
osid.id.Id[]) – theIdof theItems- assessment_id (
osid.id.Id) – theIdof theAssessmentRaise:
NotFound–assessment_idis not found or anitem_idis not onassessment_idRaise:
NullArgument–assessment_idoritem_idsisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Assessment Offered Lookup Methods¶
Bank.can_lookup_assessments_offered()¶Tests if this user can perform
AssessmentOfferedlookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
Returns: falseif lookup methods are not authorized,trueotherwiseReturn type: boolean
Bank.use_comparative_assessment_offered_view()¶The returns from the lookup methods may omit or translate elements based on this session, such as assessment, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
Bank.use_plenary_assessment_offered_view()¶A complete view of the
AssessmentOfferedreturns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
Bank.use_federated_bank_view()Federates the view for methods in this session. A federated view will include assessment items in assessment banks which are children of this assessment bank in the assessment bank hierarchy.
Bank.use_isolated_bank_view()Isolates the view for methods in this session. An isolated view restricts lookups to this assessment bank only.
Bank.get_assessment_offered(assessment_offered_id)¶Gets the
AssessmentOfferedspecified by itsId. In plenary mode, the exactIdis found or aNotFoundresults. Otherwise, the returnedAssessmentOfferedmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anAssessmentOfferedand retained for compatibility.
Parameters: assessment_offered_id ( osid.id.Id) –Idof theAssessmentOfferedReturns: the assessment offered Return type: osid.assessment.AssessmentOfferedRaise: NotFound–assessment_offered_idnot foundRaise: NullArgument–assessment_offered_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_offered_by_ids(assessment_offered_ids)¶Gets an
AssessmentOfferedListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the assessments specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleAssessmentOfferedobjects may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: assessment_offered_ids ( osid.id.IdList) – the list ofIdsto retrieveReturns: the returned AssessmentOfferedlistReturn type: osid.assessment.AssessmentOfferedListRaise: NotFound– anId wasnot foundRaise: NullArgument–assessment_offered_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– assessment failure
Bank.get_assessments_offered_by_genus_type(assessment_offered_genus_type)¶Gets an
AssessmentOfferedListcorresponding to the given assessment offered genusTypewhich does not include assessments of types derived from the specifiedType. In plenary mode, the returned list contains all known assessments offered or an error results. Otherwise, the returned list may contain only those assessments offered that are accessible through this session.
Parameters: assessment_offered_genus_type ( osid.type.Type) – an assessment offered genus typeReturns: the returned AssessmentOfferedlistReturn type: osid.assessment.AssessmentOfferedListRaise: NullArgument–assessment_offered_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_offered_by_parent_genus_type(assessment_offered_genus_type)¶Gets an
AssessmentOfferedListcorresponding to the given assessment offered genusTypeand include any additional assessments with genus types derived from the specifiedType. In plenary mode, the returned list contains all known assessments or an error results. Otherwise, the returned list may contain only those assessments offered that are accessible through this session.
Parameters: assessment_offered_genus_type ( osid.type.Type) – an assessment offered genus typeReturns: the returned AssessmentOfferedlistReturn type: osid.assessment.AssessmentOfferedListRaise: NullArgument–assessment_offered_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_offered_by_record_type(assessment_record_type)¶Gets an
AssessmentOfferedListcorresponding to the given assessment offered recordType. The set of assessments implementing the given record type is returned. In plenary mode, the returned list contains all known assessments offered or an error results. Otherwise, the returned list may contain only those assessments offered that are accessible through this session.
Parameters: assessment_record_type ( osid.type.Type) – an assessment offered record typeReturns: the returned AssessmentOfferedlistReturn type: osid.assessment.AssessmentOfferedListRaise: NullArgument–assessment_offered_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_offered_by_date(start, end)¶Gets an
AssessmentOfferedListthat have designated start times where the start times fall in the given range inclusive. In plenary mode, the returned list contains all known assessments offered or an error results. Otherwise, the returned list may contain only those assessments offered that are accessible through this session.
Parameters:
- start (
osid.calendaring.DateTime) – start of time range- end (
osid.calendaring.DateTime) – end of time rangeReturns: the returned
AssessmentOfferedlistReturn type:
osid.assessment.AssessmentOfferedListRaise:
InvalidArgument–endis less thanstartRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_assessments_offered_for_assessment(assessment_id)¶Gets an
AssessmentOfferedListby the given assessment. In plenary mode, the returned list contains all known assessments offered or an error results. Otherwise, the returned list may contain only those assessments offered that are accessible through this session.
Parameters: assessment_id ( osid.id.Id) –Idof anAssessmentReturns: the returned AssessmentOfferedlistReturn type: osid.assessment.AssessmentOfferedListRaise: NullArgument–assessment_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.assessments_offered¶Gets all
AssessmentOfferedelements. In plenary mode, the returned list contains all known assessments offered or an error results. Otherwise, the returned list may contain only those assessments offered that are accessible through this session.
Returns: a list of AssessmentOfferedelementsReturn type: osid.assessment.AssessmentOfferedListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Assessment Offered Query Methods¶
Bank.can_search_assessments_offered()¶Tests if this user can perform
AssessmentOfferedsearches. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPermissionDenied. This is intended as a hint to an application that may wish not to offer search operations to unauthorized users.
Returns: falseif search methods are not authorized,trueotherwiseReturn type: boolean
Bank.use_federated_bank_view()Federates the view for methods in this session. A federated view will include assessment items in assessment banks which are children of this assessment bank in the assessment bank hierarchy.
Bank.use_isolated_bank_view()Isolates the view for methods in this session. An isolated view restricts lookups to this assessment bank only.
Bank.assessment_offered_query¶Gets an assessment offered query.
Returns: the assessment offered query Return type: osid.assessment.AssessmentOfferedQuery
Bank.get_assessments_offered_by_query(assessment_offered_query)¶Gets a list of
AssessmentOfferedelements matching the given assessment offered query.
Parameters: assessment_offered_query ( osid.assessment.AssessmentOfferedQuery) – the assessment offered queryReturns: the returned AssessmentOfferedListReturn type: osid.assessment.AssessmentOfferedListRaise: NullArgument–assessment_offered_queryisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_offered_queryis not of this service
Assessment Offered Admin Methods¶
Bank.can_create_assessments_offered()¶Tests if this user can create
AssessmentOfferedobjects. A return of true does not guarantee successful authoriization. A return of false indicates that it is known creating anAssessmentOfferedwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
Returns: falseifAssessmentOfferedcreation is not authorized,trueotherwiseReturn type: boolean
Bank.can_create_assessment_offered_with_record_types(assessment_offered_record_types)¶Tests if this user can create a single
AssessmentOfferedusing the desired record types. WhileAssessmentManager.getAssessmentOfferedRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificAssessmentOffered. Providing an empty array tests if anAssessmentOfferedcan be created with no records.
Parameters: assessment_offered_record_types ( osid.type.Type[]) – array of assessment offered record typesReturns: trueifAssessmentOfferedcreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–assessment_offered_record_typesisnull
Bank.get_assessment_offered_form_for_create(assessment_id, assessment_offered_record_types)¶Gets the assessment offered form for creating new assessments offered. A new form should be requested for each create transaction.
Parameters:
- assessment_id (
osid.id.Id) – theIdof the relatedAssessment- assessment_offered_record_types (
osid.type.Type[]) – array of assessment offered record types to be included in the create operation or an empty list if noneReturns: the assessment offered form
Return type:
osid.assessment.AssessmentOfferedFormRaise:
NotFound–assessment_idis not foundRaise:
NullArgument–assessment_idorassessment_offered_record_typesisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurredRaise:
Unsupported– unable to get form for requested record types
Bank.create_assessment_offered(assessment_offered_form)¶Creates a new
AssessmentOffered.
Parameters: assessment_offered_form ( osid.assessment.AssessmentOfferedForm) – the form for thisAssessmentOfferedReturns: the new AssessmentOfferedReturn type: osid.assessment.AssessmentOfferedRaise: IllegalState–assessment_offrered_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–assessment_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_formdid not originate fromget_assessment_form_for_create()
Bank.can_update_assessments_offered()¶Tests if this user can update
AssessmentOfferedobjects. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anAssessmentOfferedwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
Returns: falseifAssessmentmodification is not authorized,trueotherwiseReturn type: boolean
Bank.get_assessment_offered_form_for_update(assessment_offered_id)¶Gets the assessment offered form for updating an existing assessment offered. A new assessment offered form should be requested for each update transaction.
Parameters: assessment_offered_id ( osid.id.Id) – theIdof theAssessmentOfferedReturns: the assessment offered form Return type: osid.assessment.AssessmentOfferedFormRaise: NotFound–assessment_offered_idis not foundRaise: NullArgument–assessment_offered_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.update_assessment_offered(assessment_offered_form)¶Updates an existing assessment offered.
Parameters: assessment_offered_form ( osid.assessment.AssessmentOfferedForm) – the form containing the elements to be updatedRaise: IllegalState–assessment_offrered_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–assessment_offered_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_formdid not originate fromget_assessment_form_for_update()
Bank.can_delete_assessments_offered()¶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 anAssessmentOfferedwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer a delete operations to unauthorized users.
Returns: falseifAssessmentOffereddeletion is not authorized,trueotherwiseReturn type: boolean
Bank.delete_assessment_offered(assessment_offered_id)¶Deletes an
AssessmentOffered.
Parameters: assessment_offered_id ( osid.id.Id) – theIdof theAssessmentOfferedto removeRaise: NotFound–assessment_offered_idnot foundRaise: NullArgument–assessment_offered_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.can_manage_assessment_offered_aliases()¶Tests if this user can manage
Idaliases forAssessmentsOffered. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
Returns: falseifAssessmentOfferedaliasing is not authorized,trueotherwiseReturn type: boolean
Bank.alias_assessment_offered(assessment_offered_id, alias_id)¶Adds an
Idto anAssessmentOfferedfor the purpose of creating compatibility. The primaryIdof theAssessmentOfferedis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another assessment offered, it is reassigned to the given assessment offeredId.
Parameters:
- assessment_offered_id (
osid.id.Id) – theIdof anAssessmentOffered- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis in use as a primaryIdRaise:
NotFound–assessment_offered_idnot foundRaise:
NullArgument–assessment_offered_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Assessment Taken Lookup Methods¶
Bank.can_lookup_assessments_taken()¶Tests if this user can perform
AssessmentTakenlookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
Returns: falseif lookup methods are not authorized,trueotherwiseReturn type: boolean
Bank.use_comparative_assessment_taken_view()¶The returns from the lookup methods may omit or translate elements based on this session, such as assessment, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
Bank.use_plenary_assessment_taken_view()¶A complete view of the
AssessmentTakenreturns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
Bank.use_federated_bank_view()Federates the view for methods in this session. A federated view will include assessment items in assessment banks which are children of this assessment bank in the assessment bank hierarchy.
Bank.use_isolated_bank_view()Isolates the view for methods in this session. An isolated view restricts lookups to this assessment bank only.
Bank.get_assessment_taken(assessment_taken_id)¶Gets the
AssessmentTakenspecified by itsId. In plenary mode, the exactIdis found or aNotFoundresults. Otherwise, the returnedAssessmentTakenmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anAssessmentTakenand retained for compatibility.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenReturns: the assessment taken Return type: osid.assessment.AssessmentTakenRaise: NotFound–assessment_taken_idnot foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_ids(assessment_taken_ids)¶Gets an
AssessmentTakenListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the assessments specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleAssessmentTakenobjects may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: assessment_taken_ids ( osid.id.IdList) – the list ofIdsto retrieveReturns: the returned AssessmentTaken listReturn type: osid.assessment.AssessmentTakenListRaise: NotFound– anId wasnot foundRaise: NullArgument–assessment_taken_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– assessment failure
Bank.get_assessments_taken_by_genus_type(assessment_taken_genus_type)¶Gets an
AssessmentTakenListcorresponding to the given assessment taken genusTypewhich does not include assessments of types derived from the specifiedType. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters: assessment_taken_genus_type ( osid.type.Type) – an assessment taken genus typeReturns: the returned AssessmentTaken listReturn type: osid.assessment.AssessmentTakenListRaise: NullArgument–assessment_taken_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_parent_genus_type(assessment_taken_genus_type)¶Gets an
AssessmentTakenListcorresponding to the given assessment taken genusTypeand include any additional assessments with genus types derived from the specifiedType. In plenary mode, the returned list contains all known assessments or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters: assessment_taken_genus_type ( osid.type.Type) – an assessment taken genus typeReturns: the returned AssessmentTaken listReturn type: osid.assessment.AssessmentTakenListRaise: NullArgument–assessment_taken_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_record_type(assessment_taken_record_type)¶Gets an
AssessmentTakenListcorresponding to the given assessment taken recordType. The set of assessments implementing the given record type is returned. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session. In both cases, the order of the set is not specified.
Parameters: assessment_taken_record_type ( osid.type.Type) – an assessment taken record typeReturns: the returned AssessmentTakenlistReturn type: osid.assessment.AssessmentTakenListRaise: NullArgument–assessment_taken_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_date(from_, to)¶Gets an
AssessmentTakenListstarted in the given date range inclusive. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session. In both cases, the order of the set is not specified.
Parameters:
- from (
osid.calendaring.DateTime) – start date- to (
osid.calendaring.DateTime) – end dateReturns: the returned
AssessmentTakenlistReturn type:
osid.assessment.AssessmentTakenListRaise:
InvalidArgument–fromis greater thantoRaise:
NullArgument–fromortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_for_taker(resource_id)¶Gets an
AssessmentTakenListfor the given resource. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters: resource_id ( osid.id.Id) –Idof aResourceReturns: the returned AssessmentTakenlistReturn type: osid.assessment.AssessmentTakenListRaise: NullArgument–resource_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_date_for_taker(resource_id, from_, to)¶Gets an
AssessmentTakenListstarted in the given date range inclusive for the given resource. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters:
- resource_id (
osid.id.Id) –Idof aResource- from (
osid.calendaring.DateTime) – start date- to (
osid.calendaring.DateTime) – end dateReturns: the returned
AssessmentTakenlistReturn type:
osid.assessment.AssessmentTakenListRaise:
InvalidArgument–fromis greater thantoRaise:
NullArgument–resource_id, fromortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_for_assessment(assessment_id)¶Gets an
AssessmentTakenListfor the given assessment. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters: assessment_id ( osid.id.Id) –Idof anAssessmentReturns: the returned AssessmentTakenlistReturn type: osid.assessment.AssessmentTakenListRaise: NullArgument–assessment_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_date_for_assessment(assessment_id, from_, to)¶Gets an
AssessmentTakenListstarted in the given date range inclusive for the given assessment. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters:
- assessment_id (
osid.id.Id) –Idof anAssessment- from (
osid.calendaring.DateTime) – start date- to (
osid.calendaring.DateTime) – end dateReturns: the returned
AssessmentTakenlistReturn type:
osid.assessment.AssessmentTakenListRaise:
InvalidArgument–fromis greater thantoRaise:
NullArgument–assessment_id, fromortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_for_taker_and_assessment(resource_id, assessment_id)¶Gets an
AssessmentTakenListfor the given resource and assessment. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters:
- resource_id (
osid.id.Id) –Idof aResource- assessment_id (
osid.id.Id) –Idof anAssessmentReturns: the returned
AssessmentTakenlistReturn type:
osid.assessment.AssessmentTakenListRaise:
NullArgument–resource_idorassessment_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_date_for_taker_and_assessment(resource_id, assessment_id, from_, to)¶Gets an
AssessmentTakenListstarted in the given date range inclusive for the given resource and assessment. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters:
- resource_id (
osid.id.Id) –Idof aResource- assessment_id (
osid.id.Id) –Idof anAssessment- from (
osid.calendaring.DateTime) – start date- to (
osid.calendaring.DateTime) – end dateReturns: the returned
AssessmentTakenlistReturn type:
osid.assessment.AssessmentTakenListRaise:
InvalidArgument–fromis greater thantoRaise:
NullArgument–resource_id, assessment_id, fromortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_for_assessment_offered(assessment_offered_id)¶Gets an
AssessmentTakenListby the given assessment offered. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters: assessment_offered_id ( osid.id.Id) –Idof anAssessmentOfferedReturns: the returned AssessmentTakenlistReturn type: osid.assessment.AssessmentTakenListRaise: NullArgument–assessment_offered_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_date_for_assessment_offered(assessment_offered_id, from_, to)¶Gets an
AssessmentTakenListstarted in the given date range inclusive for the given assessment offered. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters:
- assessment_offered_id (
osid.id.Id) –Idof anAssessmentOffered- from (
osid.calendaring.DateTime) – start date- to (
osid.calendaring.DateTime) – end dateReturns: the returned
AssessmentTakenlistReturn type:
osid.assessment.AssessmentTakenListRaise:
InvalidArgument–fromis greater thantoRaise:
NullArgument–assessment_offered_id, from,ortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_for_taker_and_assessment_offered(resource_id, assessment_offered_id)¶Gets an
AssessmentTakenListfor the given resource and assessment offered. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters:
- resource_id (
osid.id.Id) –Idof aResource- assessment_offered_id (
osid.id.Id) –Idof anAssessmentOfferedReturns: the returned
AssessmentTakenlistReturn type:
osid.assessment.AssessmentTakenListRaise:
NullArgument–resource_idorassessmen_offeredt_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_date_for_taker_and_assessment_offered(resource_id, assessment_offered_id, from_, to)¶Gets an
AssessmentTakenListstarted in the given date range inclusive for the given resource and assessment offered. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters:
- resource_id (
osid.id.Id) –Idof aResource- assessment_offered_id (
osid.id.Id) –Idof anAssessmentOffered- from (
osid.calendaring.DateTime) – start date- to (
osid.calendaring.DateTime) – end dateReturns: the returned
AssessmentTakenlistReturn type:
osid.assessment.AssessmentTakenListRaise:
InvalidArgument–fromis greater thantoRaise:
NullArgument–resource_id, assessment_offered_id, from,ortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.assessments_taken¶Gets all
AssessmentTakenelements. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Returns: a list of AssessmentTakenelementsReturn type: osid.assessment.AssessmentTakenListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Assessment Taken Query Methods¶
Bank.can_search_assessments_taken()¶Tests if this user can perform
AssessmentTakensearches. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer search operations to unauthorized users.
Returns: falseif search methods are not authorized,trueotherwiseReturn type: boolean
Bank.use_federated_bank_view()Federates the view for methods in this session. A federated view will include assessment items in assessment banks which are children of this assessment bank in the assessment bank hierarchy.
Bank.use_isolated_bank_view()Isolates the view for methods in this session. An isolated view restricts lookups to this assessment bank only.
Bank.assessment_taken_query¶Gets an assessment taken query.
Returns: the assessment taken query Return type: osid.assessment.AssessmentTakenQuery
Bank.get_assessments_taken_by_query(assessment_taken_query)¶Gets a list of
AssessmentTakenelements matching the given assessment taken query.
Parameters: assessment_taken_query ( osid.assessment.AssessmentTakenQuery) – the assessment taken queryReturns: the returned AssessmentTakenListReturn type: osid.assessment.AssessmentTakenListRaise: NullArgument–assessment_taken_queryisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_taken_queryis not of this service
Assessment Taken Admin Methods¶
Bank.can_create_assessments_taken()¶Tests if this user can create
AssessmentTakenobjects. A return of true does not guarantee successful authoriization. A return of false indicates that it is known creating anAssessmentTakenwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
Returns: falseifAssessmentTakencreation is not authorized,trueotherwiseReturn type: boolean
Bank.can_create_assessment_taken_with_record_types(assessment_taken_record_types)¶Tests if this user can create a single
AssessmentTakenusing the desired record types. WhileAssessmentManager.getAssessmentTakenRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificAssessmentTaken. Providing an empty array tests if anAssessmentTakencan be created with no records.
Parameters: assessment_taken_record_types ( osid.type.Type[]) – array of assessment taken record typesReturns: trueifAssessmentTakencreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–assessment_taken_record_typesisnull
Bank.get_assessment_taken_form_for_create(assessment_offered_id, assessment_taken_record_types)¶Gets the assessment taken form for creating new assessments taken. A new form should be requested for each create transaction.
Parameters:
- assessment_offered_id (
osid.id.Id) – theIdof the relatedAssessmentOffered- assessment_taken_record_types (
osid.type.Type[]) – array of assessment taken record types to be included in the create operation or an empty list if noneReturns: the assessment taken form
Return type:
osid.assessment.AssessmentTakenFormRaise:
NotFound–assessment_offered_idis not foundRaise:
NullArgument–assessment_offered_idorassessment_taken_record_typesisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurredRaise:
Unsupported– unable to get form for requested record types
Bank.create_assessment_taken(assessment_taken_form)¶Creates a new
AssessmentTaken.
Parameters: assessment_taken_form ( osid.assessment.AssessmentTakenForm) – the form for thisAssessmentTakenReturns: the new AssessmentTakenReturn type: osid.assessment.AssessmentTakenRaise: IllegalState–assessment_taken_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–assessment_taken_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_offered_formdid not originate fromget_assessment_taken_form_for_create()
Bank.can_update_assessments_taken()¶Tests if this user can update
AssessmentTakenobjects. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anAssessmentTakenwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
Returns: falseifAssessmentTakenmodification is not authorized,trueotherwiseReturn type: boolean
Bank.get_assessment_taken_form_for_update(assessment_taken_id)¶Gets the assessment taken form for updating an existing assessment taken. A new assessment taken form should be requested for each update transaction.
Parameters: assessment_taken_id ( osid.id.Id) – theIdof theAssessmentTakenReturns: the assessment taken form Return type: osid.assessment.AssessmentTakenFormRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.update_assessment_taken(assessment_taken_form)¶Updates an existing assessment taken.
Parameters: assessment_taken_form ( osid.assessment.AssessmentTakenForm) – the form containing the elements to be updatedRaise: IllegalState–assessment_taken_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–assessment_taken_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_offered_formdid not originate fromget_assessment_taken_form_for_update()
Bank.can_delete_assessments_taken()¶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 anAssessmentTakenwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer a delete operations to unauthorized users.
Returns: falseifAssessmentTakendeletion is not authorized,trueotherwiseReturn type: boolean
Bank.delete_assessment_taken(assessment_taken_id)¶Deletes an
AssessmentTaken.
Parameters: assessment_taken_id ( osid.id.Id) – theIdof theAssessmentTakento removeRaise: NotFound–assessment_taken_idnot foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.can_manage_assessment_taken_aliases()¶Tests if this user can manage
Idaliases forAssessmentsTaken. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
Returns: falseifAssessmentTakenaliasing is not authorized,trueotherwiseReturn type: boolean
Bank.alias_assessment_taken(assessment_taken_id, alias_id)¶Adds an
Idto anAssessmentTakenfor the purpose of creating compatibility. The primaryIdof theAssessmentTakenis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another assessment taken, it is reassigned to the given assessment takenId.
Parameters:
- assessment_taken_id (
osid.id.Id) – theIdof anAssessmentTaken- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis in use as a primaryIdRaise:
NotFound–assessment_taken_idnot foundRaise:
NullArgument–assessment_taken_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred