Interface AssessmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session is used to take an assessment. The assessment associated
with this session represents the "assessment taken" by an Agent .
This session may be created using an AssessmentOffered Id
retrieved from an assessment bank, and instantiating this session
represents the transaction of taking an assessment. Resuming an
assessment, if permitted, is performed through instantiating this session
with the AssessmentTaken Id .
Assessment Items are accessed via the Question interface.
A Question Id is the same as the Item Id.
This session manages the flow of control for the assessment taking process. It allows for two types of processes:
- synchronous response: Each consecutive question is only available after the previous item was submitted or skipped.
- asynchronous response: Questions may be accessed independently of response submission.
It may be the case that it is allowed to suspend and resume an
assessment. canSuspend() indicates the availability of this
feature. finished() indicates the assessment is complete.
This session is used in the context of an AssessmentSection .
An assessment with no sections defined is assumed to have a single default
section that maps to the entire assessment.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can take this assessment section.voidclearResponse(Id assessmentSectionId, Id itemId) Clears the response to an item The item appears as unanswered.voidfinishAssessment(Id assessmentTakenId) Indicates the entire assessment is complete.voidfinishAssessmentSection(Id assessmentSectionId) Indicates an assessment section is complete.voidfinishedAssessment(Id assessmentTakenId) Indicates the entire assessment is complete.voidfinishedAssessmentSection(Id assessmentSectionId) Indicates an assessment section is complete.getAnswers(Id assessmentSectionId, Id itemId) Gets the acceptable answers to the associated item.getAssessmentSection(Id assessmentSectionId) Gets an assessemnts section byId.getAssessmentSections(Id assessmentTakenId) Gets the assessment sections of this assessment.getBank()Gets theBankassociated with this session.Gets theBankIdassociated with this session.getFirstAssessmentSection(Id assessmentTakenId) Gets the first assessment section in this assesment.getFirstQuestion(Id assessmentSectionId) Gets the first question in this assesment section.getFirstUnansweredQuestion(Id assessmentSectionId) Gets the first unanswered question in this assesment section.getIncompleteAssessmentSections(Id assessmentTakenId) Gets the incomplete assessment sections of this assessment.getNextAssessmentSection(Id assessmentSectionId) Gets the next assessemnt section following the given assesment section.getNextQuestion(Id assessmentSectionId, Id itemId) Gets the next question in this assesment section.getNextUnansweredQuestion(Id assessmentSectionId, Id itemId) Gets the next unanswered question in this assesment section.getPreviousAssessmentSection(Id assessmentSectionId) Gets the next assessemnt section following the given assesment section.getPreviousQuestion(Id assessmentSectionId, Id itemId) Gets the previous question in this assesment section.getPreviousUnansweredQuestion(Id assessmentSectionId, Id itemId) Gets the previous unanswered question in this assesment section.getQuestion(Id assessmentSectionId, Id itemId) Gets theQuestionspecified by itsId.getQuestions(Id assessmentSectionId) Gets the questions of this assessment section.getResponse(Id assessmentSectionId, Id itemId) Gets the submitted response to the associated item.getResponseForm(Id assessmentSectionId, Id itemId) Gets the response form for submitting an answer.getResponses(Id assessmentSectionId) Gets all submitted responses.getUnansweredQuestions(Id assessmentSectionId) Gets the unanswered questions of this assessment section.booleanhasAssessmentBegun(Id assessmentTakenId) Tests if this assessment has started.booleanhasAssessmentSectionBegun(Id assessmentSectionId) Tests if this assessment section has started.booleanhasNextAssessmentSection(Id assessmentSectionId) Tests if there is a next assessment section in the assessment following the given assessment sectionId.booleanhasNextQuestion(Id assessmentSectionId, Id itemId) Tests if there is a next question following the given questionId.booleanhasNextUnansweredQuestion(Id assessmentSectionId, Id itemId) Tests if there is a next unanswered question following the given questionId.booleanhasPreviousAssessmentSection(Id assessmentSectionId) Tests if there is a previous assessment section in the assessment following the given assessment sectionId.booleanhasPreviousQuestion(Id assessmentSectionId, Id itemId) Tests if there is a previous question preceeding the given questionId.booleanhasPreviousUnansweredQuestion(Id assessmentSectionId, Id itemId) Tests if there is a previous unanswered question preceeding the given questionId.booleanhasUnansweredQuestions(Id assessmentSectionId) Tests if there are unanswered questions in this assessment section.booleanisAnswerAvailable(Id assessmentSectionId, Id itemId) Tests if an answer is available for the given item.booleanisAssessmentOver(Id assessmentTakenId) Tests if this assessment is over.booleanisAssessmentSectionComplete(Id assessmentSectionId) Tests if the all responses have been submitted to this assessment section.booleanisAssessmentSectionOver(Id assessmentSectionId) Tests if this assessment section is over.booleanisQuestionAnswered(Id assessmentSectionId, Id itemId) Tests if the given item has a response.booleanrequiresSynchronousResponses(Id assessmentSectionId) Tests if synchronous responses are required in this assessment section.booleanrequiresSynchronousSections(Id assessmentTakenId) Tests if synchronous sections are required.voidSkips an item.voidsubmitResponse(Id assessmentSectionId, Id itemId, AnswerForm answerForm) Submits an answer to an item.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getBankId
Id getBankId()Gets theBankIdassociated with this session.- Returns:
- the
Bank Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getBank
Gets theBankassociated with this session.- Returns:
- the
Bankassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canTakeAssessments
boolean canTakeAssessments()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 aPERMISSION_DENIED. 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,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
hasAssessmentBegun
boolean hasAssessmentBegun(Id assessmentTakenId) throws NotFoundException, OperationFailedException, PermissionDeniedException 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 isfalse.- Parameters:
assessmentTakenId-Idof theAssessmentTaken- Returns:
trueif this assessment has begun,falseotherwise- Throws:
NotFoundException-assessmentTakenIdis not foundNullArgumentException-assessmentTakenIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
isAssessmentOver
boolean isAssessmentOver(Id assessmentTakenId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if this assessment is over. An assessment is over iffinishedAssessment()is invoked or the designated finish time has expired.- Parameters:
assessmentTakenId-Idof theAssessmentTaken- Returns:
trueif this assessment is over,falseotherwise- Throws:
NotFoundException-assessmentTakenIdis not foundNullArgumentException-assessmentTakenIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
finishedAssessment
void finishedAssessment(Id assessmentTakenId) throws NotFoundException, OperationFailedException, PermissionDeniedException Indicates the entire assessment is complete.- Parameters:
assessmentTakenId-Idof theAssessmentTaken- Throws:
IllegalStateException-hasBegun()isfalseorisOver()istrueNotFoundException-assessmentTakenIdis not foundNullArgumentException-assessmentTakenIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
requiresSynchronousSections
boolean requiresSynchronousSections(Id assessmentTakenId) throws NotFoundException, OperationFailedException, PermissionDeniedException 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-inhasNextSection()andgetNextSection()methods. In synchronous mode,hasNextSection()is false until the current section is completed. In asynchronous mode,hasNextSection()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:
assessmentTakenId-Idof theAssessmentTaken- Returns:
trueif this synchronous sections are required,falseotherwise- Throws:
NotFoundException-assessmentTakenIdis not foundNullArgumentException-assessmentTakenIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getFirstAssessmentSection
AssessmentSection getFirstAssessmentSection(Id assessmentTakenId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the first assessment section in this assesment. All assessments have at least oneAssessmentSection.- Parameters:
assessmentTakenId-Idof theAssessmentTaken- Returns:
- the first assessment section
- Throws:
IllegalStateException-hasAssessmentBegun()isfalseNotFoundException-assessmentTakenIdis not foundNullArgumentException-assessmentTakenIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
hasNextAssessmentSection
boolean hasNextAssessmentSection(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if there is a next assessment section in the assessment following the given assessment sectionId.- Parameters:
assessmentSectionId-Idof theAssessmentSection- Returns:
trueif there is a next section,falseotherwise- Throws:
IllegalStateException-hasAssessmentBegun()isfalseNotFoundException-assessmentTakenIdis not foundNullArgumentException-assessmentTakenIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getNextAssessmentSection
AssessmentSection getNextAssessmentSection(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the next assessemnt section following the given assesment section.- Parameters:
assessmentSectionId-Idof theAssessmentSection- Returns:
- the next section
- Throws:
IllegalStateException-hasNextAssessmentSection()isfalseNotFoundException-assessmentSectionIdis not foundNullArgumentException-assessmentSectionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
hasPreviousAssessmentSection
boolean hasPreviousAssessmentSection(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if there is a previous assessment section in the assessment following the given assessment sectionId.- Parameters:
assessmentSectionId-Idof theAssessmentSection- Returns:
trueif there is a previous assessment section,falseotherwise- Throws:
IllegalStateException-hasAssessmentBegun()isfalseNotFoundException-assessmentSectionIdis not foundNullArgumentException-assessmentSectionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getPreviousAssessmentSection
AssessmentSection getPreviousAssessmentSection(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the next assessemnt section following the given assesment section.- Parameters:
assessmentSectionId-Idof theAssessmentSection- Returns:
- the previous assessment section
- Throws:
IllegalStateException-hasNextAssessmentSection()isfalseNotFoundException-assessmentSectionIdis not foundNullArgumentException-assessmentSectionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getAssessmentSection
AssessmentSection getAssessmentSection(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets an assessemnts section byId.- Parameters:
assessmentSectionId-Idof theAssessmentSection- Returns:
- the assessment section
- Throws:
IllegalStateException-hasAssessmentBegun()isfalseNotFoundException-assessmentSectionIdis not foundNullArgumentException-assessmentSectionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getAssessmentSections
AssessmentSectionList getAssessmentSections(Id assessmentTakenId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the assessment sections of this assessment.- Parameters:
assessmentTakenId-Idof theAssessmentTaken- Returns:
- the list of assessment sections
- Throws:
IllegalStateException-hasAssessmentBegun()isfalseNotFoundException-assessmentTakenIdis not foundNullArgumentException-assessmentTakenIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
isAssessmentSectionComplete
boolean isAssessmentSectionComplete(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if the all responses have been submitted to this assessment section. IfisAssessmentSectionComplete()is false, thengetUnansweredQuestions()may return a list of questions that can be submitted.- Parameters:
assessmentSectionId-Idof theAssessmentSection- Returns:
trueif this assessment section is complete,falseotherwise- Throws:
IllegalStateException-isAssessmentOver()istrueNotFoundException-assessmentSectionIdis not foundNullArgumentException-assessmentSectionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getIncompleteAssessmentSections
AssessmentSectionList getIncompleteAssessmentSections(Id assessmentTakenId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the incomplete assessment sections of this assessment.- Parameters:
assessmentTakenId-Idof theAssessmentTaken- Returns:
- the list of incomplete assessment sections
- Throws:
IllegalStateException-hasAssessmentBegun()isfalseNotFoundException-assessmentTakenIdis not foundNullArgumentException-assessmentTakenIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
hasAssessmentSectionBegun
boolean hasAssessmentSectionBegun(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException 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 isfalse.- Parameters:
assessmentSectionId-Idof theAssessmentSection- Returns:
trueif this assessment section has begun,falseotherwise- Throws:
IllegalStateException-hasAssessmentBegun()isfalse or isAssessmentOver()istrueNotFoundException-assessmentSectionIdis not foundNullArgumentException-assessmentSectionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isAssessmentSectionOver
boolean isAssessmentSectionOver(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException 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:
assessmentSectionId-Idof theAssessmentSection- Returns:
trueif this assessment is over,falseotherwise- Throws:
IllegalStateException-hasAssessmentSectionBegun()isfalse or isAssessmentSectionOver()istrueNotFoundException-assessmentSectionIdis not foundNullArgumentException-assessmentSectionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
finishedAssessmentSection
void finishedAssessmentSection(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Indicates an assessment section is complete.- Parameters:
assessmentSectionId-Idof theAssessmentSection- Throws:
IllegalStateException-hasAssessmentSectionBegun()isfalseorisAssessmentSectionOver()istrueNotFoundException-assessmentSectionIdis not foundNullArgumentException-assessmentSectionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
requiresSynchronousResponses
boolean requiresSynchronousResponses(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException 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-inhasNextQuestion()andgetNextQuestion()methods. In synchronous mode,hasNextQuestion()isfalseuntil the response for the current question is submitted. In asynchronous mode,hasNextQuestion()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:
assessmentSectionId-Idof theAssessmentSection- Returns:
trueif this synchronous responses are required,falseotherwise- Throws:
IllegalStateException-hasAssessmentBegun()isfalse or isAssessmentOver()istrueNotFoundException-assessmentSectionIdis not foundNullArgumentException-assessmentSectionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getFirstQuestion
Question getFirstQuestion(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the first question in this assesment section.- Parameters:
assessmentSectionId-Idof theAssessmentSection- Returns:
- the first question
- Throws:
IllegalStateException-hasAssessmentSectionBegun() is false or isAssessmentSectionOver() is trueNotFoundException-assessmentSectionIdis not foundNullArgumentException-assessmentSectionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
hasNextQuestion
boolean hasNextQuestion(Id assessmentSectionId, Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if there is a next question following the given questionId.- Parameters:
assessmentSectionId-Idof theAssessmentSectionitemId-Idof theItem- Returns:
trueif there is a next question,falseotherwise- Throws:
IllegalStateException-hasAssessmentSectionBegun() is false or isAssessmentSectionOver() is trueNotFoundException-assessmentSectionIdoritemIdis not found, oritemIdnot part ofassessmentSectionIdNullArgumentException-assessmentSectionIdoritemIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getNextQuestion
Question getNextQuestion(Id assessmentSectionId, Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the next question in this assesment section.- Parameters:
assessmentSectionId-Idof theAssessmentSectionitemId-Idof theItem- Returns:
- the next question
- Throws:
IllegalStateException-hasNextQuestion()isfalseNotFoundException-assessmentSectionIdoritemIdis not found, oritemIdnot part ofassessmentSectionIdNullArgumentException-assessmentSectionIdoritemIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
hasPreviousQuestion
boolean hasPreviousQuestion(Id assessmentSectionId, Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if there is a previous question preceeding the given questionId.- Parameters:
assessmentSectionId-Idof theAssessmentSectionitemId-Idof theItem- Returns:
trueif there is a previous question,falseotherwise- Throws:
IllegalStateException-hasAssessmentSectionBegun() is false or isAssessmentSectionOver() is trueNotFoundException-assessmentSectionIdoritemIdis not found, oritemIdnot part ofassessmentSectionIdNullArgumentException-assessmentSectionIdoritemIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getPreviousQuestion
Question getPreviousQuestion(Id assessmentSectionId, Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the previous question in this assesment section.- Parameters:
assessmentSectionId-Idof theAssessmentSectionitemId-Idof theItem- Returns:
- the previous question
- Throws:
IllegalStateException-hasPreviousQuestion()isfalseNotFoundException-assessmentSectionIdoritemIdis not found, oritemIdnot part ofassessmentSectionIdNullArgumentException-assessmentSectionIdoritemIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getQuestion
Question getQuestion(Id assessmentSectionId, Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theQuestionspecified by itsId.- Parameters:
assessmentSectionId-Idof theAssessmentSectionitemId-Idof theItem- Returns:
- the returned
Question - Throws:
IllegalStateException-hasAssessmentSectionBegun() is false or isAssessmentSectionOver() is trueNotFoundException-assessmentSectionIdoritemIdis not found, oritemIdnot part ofassessmentSectionIdNullArgumentException-assessmentSectionIdoritemIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getQuestions
QuestionList getQuestions(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the questions of this assessment section.- Parameters:
assessmentSectionId-Idof theAssessmentSection- Returns:
- the list of assessment questions
- Throws:
IllegalStateException-hasAssessmentSectionBegun() is false or isAssessmentSectionOver() is trueNotFoundException-assessmentSectionIdis not foundNullArgumentException-assessmentSectionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getResponseForm
AnswerForm getResponseForm(Id assessmentSectionId, Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the response form for submitting an answer.- Parameters:
assessmentSectionId-Idof theAssessmentSectionitemId-Idof theItem- Returns:
- an answer form
- Throws:
IllegalStateException-hasAssessmentSectionBegun()isfalse or isAssessmentSectionOver()istrueNotFoundException-assessmentSectionIdoritemIdis not found, oritemIdnot part ofassessmentSectionIdNullArgumentException-assessmentSectionIdoritemIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
submitResponse
void submitResponse(Id assessmentSectionId, Id itemId, AnswerForm answerForm) throws NotFoundException, OperationFailedException, PermissionDeniedException Submits an answer to an item.- Parameters:
assessmentSectionId-Idof theAssessmentSectionitemId-Idof theItemanswerForm- the response- Throws:
IllegalStateException-hasAssessmentSectionBegun()isfalse or isAssessmentSectionOver()istrue, oranswerFormwas already used in a submit transactionInvalidArgumentException- one or more of the elements in the form is invalidNotFoundException-assessmentSectionIdoritemIdis not found, oritemIdnot part ofassessmentSectionIdNullArgumentException-assessmentSectionId, itemId, oranswerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-answerFormis not of this service- Compliance:
mandatory- This method must be implemented.
-
skipItem
void skipItem(Id assessmentSectionId, Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Skips an item.- Parameters:
assessmentSectionId-Idof theAssessmentSectionitemId-Idof theItem- Throws:
IllegalStateException-hasAssessmentSectionBegun()isfalse or isAssessmentSectionOver()istrueNotFoundException-assessmentSectionIdoritemIdis not found, oritemIdnot part ofassessmentSectionIdNullArgumentException-assessmentSectionIdoritemIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isQuestionAnswered
boolean isQuestionAnswered(Id assessmentSectionId, Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if the given item has a response.- Parameters:
assessmentSectionId-Idof theAssessmentSectionitemId-Idof theItem- Returns:
trueif this item has a response,falseotherwise- Throws:
IllegalStateException-hasAssessmentSectionBegun()isfalse or isAssessmentSectionOver()istrueNotFoundException-assessmentSectionId or itemId is not found, or itemId not part of assessmentSectionIdNullArgumentException-assessmentSectionId or itemId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getUnansweredQuestions
QuestionList getUnansweredQuestions(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the unanswered questions of this assessment section.- Parameters:
assessmentSectionId-Idof theAssessmentSection- Returns:
- the list of questions with no rsponses
- Throws:
IllegalStateException-hasAssessmentSectionBegun() is false or isAssessmentSectionOver() is trueNotFoundException-assessmentSectionIdis not foundNullArgumentException-assessmentSectionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
hasUnansweredQuestions
boolean hasUnansweredQuestions(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if there are unanswered questions in this assessment section.- Parameters:
assessmentSectionId-Idof theAssessmentSection- Returns:
trueif there are unanswered questions,falseotherwise- Throws:
IllegalStateException-hasAssessmentSectionBegun() is false or isAssessmentSectionOver() is trueNotFoundException-assessmentSectionIdis not foundNullArgumentException-assessmentSectionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getFirstUnansweredQuestion
Question getFirstUnansweredQuestion(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the first unanswered question in this assesment section.- Parameters:
assessmentSectionId-Idof theAssessmentSection- Returns:
- the first unanswered question
- Throws:
IllegalStateException-hasUnansweredQuestions()isfalseNotFoundException-assessmentSectionIdis not foundNullArgumentException-assessmentSectionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
hasNextUnansweredQuestion
boolean hasNextUnansweredQuestion(Id assessmentSectionId, Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if there is a next unanswered question following the given questionId.- Parameters:
assessmentSectionId-Idof theAssessmentSectionitemId-Idof theItem- Returns:
trueif there is a next unanswered question,falseotherwise- Throws:
IllegalStateException-hasAssessmentSectionBegun() is false or isAssessmentSectionOver() is trueNotFoundException-assessmentSectionId or itemId is not found, or itemId not part of assessmentSectionIdNullArgumentException-assessmentSectionId or itemId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getNextUnansweredQuestion
Question getNextUnansweredQuestion(Id assessmentSectionId, Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the next unanswered question in this assesment section.- Parameters:
assessmentSectionId-Idof theAssessmentSectionitemId-Idof theItem- Returns:
- the next unanswered question
- Throws:
IllegalStateException-hasNextUnansweredQuestion()isfalseNotFoundException-assessmentSectionId or itemId is not found, or itemId not part of assessmentSectionIdNullArgumentException-assessmentSectionId or itemId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
hasPreviousUnansweredQuestion
boolean hasPreviousUnansweredQuestion(Id assessmentSectionId, Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if there is a previous unanswered question preceeding the given questionId.- Parameters:
assessmentSectionId-Idof theAssessmentSectionitemId-Idof theItem- Returns:
trueif there is a previous unanswered question,falseotherwise- Throws:
IllegalStateException-hasAssessmentSectionBegun() is false or isAssessmentSectionOver() is trueNotFoundException-assessmentSectionId or itemId is not found, or itemId not part of assessmentSectionIdNullArgumentException-assessmentSectionId or itemId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getPreviousUnansweredQuestion
Question getPreviousUnansweredQuestion(Id assessmentSectionId, Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the previous unanswered question in this assesment section.- Parameters:
assessmentSectionId-Idof theAssessmentSectionitemId-Idof theItem- Returns:
- the previous unanswered question
- Throws:
IllegalStateException-hasPreviousUnansweredQuestion()isfalseNotFoundException-assessmentSectionId or itemId is not found, or itemId not part of assessmentSectionIdNullArgumentException-assessmentSectionId or itemId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getResponse
Response getResponse(Id assessmentSectionId, Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the submitted response to the associated item.- Parameters:
assessmentSectionId-Idof theAssessmentSectionitemId-Idof theItem- Returns:
- the response
- Throws:
IllegalStateException-hasAssessmentSectionBegun()isfalse or isAssessmentSectionOver()istrueNotFoundException-assessmentSectionId or itemId is not found, or itemId not part of assessmentSectionIdNullArgumentException-assessmentSectionId or itemId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResponses
ResponseList getResponses(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets all submitted responses.- Parameters:
assessmentSectionId-Idof theAssessmentSection- Returns:
- the list of responses
- Throws:
IllegalStateException-hasAssessmentSectionBegun()isfalse or isAssessmentSectionOver()istrueNotFoundException-assessmentSectionIdis not foundNullArgumentException-assessmentSectionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
clearResponse
void clearResponse(Id assessmentSectionId, Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Clears the response to an item The item appears as unanswered. If no response exists, the method simply returns.- Parameters:
assessmentSectionId-Idof theAssessmentSectionitemId-Idof theItem- Throws:
IllegalStateException-hasAssessmentSectionBegun() is false or isAssessmentSectionOver() is trueNotFoundException-assessmentSectionId or itemId is not found, or itemId not part of assessmentSectionIdNullArgumentException-assessmentSectionId or itemId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
finishAssessmentSection
void finishAssessmentSection(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Indicates an assessment section is complete. Finished sections may or may not allow new or updated responses.- Parameters:
assessmentSectionId-Idof theAssessmentSection- Throws:
IllegalStateException-hasAssessmentSectionBegun()isfalse or isAssessmentSectionOver()istrueNotFoundException-assessmentSectionIdis not foundNullArgumentException-assessmentSectionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isAnswerAvailable
boolean isAnswerAvailable(Id assessmentSectionId, Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if an answer is available for the given item.- Parameters:
assessmentSectionId-Idof theAssessmentSectionitemId-Idof theItem- Returns:
trueif an answer are available,falseotherwise- Throws:
NotFoundException-assessmentSectionId or itemId is not found, or itemId not part of assessmentSectionIdNullArgumentException-assessmentSectionId or itemId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAnswers
AnswerList getAnswers(Id assessmentSectionId, Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the acceptable answers to the associated item.- Parameters:
assessmentSectionId-Idof theAssessmentSectionitemId-Idof theItem- Returns:
- the answers
- Throws:
IllegalStateException-isAnswerAvailable()isfalseNotFoundException-assessmentSectionId or itemId is not found, or itemId not part of assessmentSectionIdNullArgumentException-assessmentSectionId or itemId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
finishAssessment
void finishAssessment(Id assessmentTakenId) throws NotFoundException, OperationFailedException, PermissionDeniedException Indicates the entire assessment is complete.- Parameters:
assessmentTakenId-Idof theAssessmentTaken- Throws:
IllegalStateException-hasBegun()isfalse or isOver()istrueNotFoundException-assessmentTakenIdis not foundNullArgumentException-assessmentTakenIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-