public interface AssessmentSession extends 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:
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.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canTakeAssessments()
Tests if this user can take this assessment section.
|
void |
clearResponse(Id itemId)
Clears the response to an item The item appears as unanswered.
|
void |
finish()
Indicates the assessment section is complete.
|
void |
finishedAssessment(Id assessmentTakenId)
Indicates the entire assessment is complete.
|
void |
finishedAssessmentSection(Id assessmentSectionId)
Indicates an assessment section is complete.
|
AssessmentList |
getAnswers(Id itemId)
Gets the acceptable answers to the associated item.
|
AssessmentSection |
getAssessmentSection(Id assessmentSectionId)
Gets an assessemnts section by
Id. |
AssessmentSectionList |
getAssessmentSections(Id assessmentTakenId)
Gets the assessment sections of this assessment.
|
Bank |
getBank()
Gets the
Bank associated with this session. |
Id |
getBankId()
Gets the
Bank Id associated with this
session. |
AssessmentSection |
getFirstAssessmentSection(Id assessmentTakenId)
Gets the first assessment section in this assesment.
|
Question |
getFirstQuestion()
Gets the first question in this assesment section.
|
Question |
getFirstUnansweredQuestion()
Gets the first unanswered question in this assesment section.
|
AssessmentSectionList |
getIncompleteAssessmentSections()
Gets the incomplete assessment sections of this assessment.
|
AssessmentSection |
getNextAssessmentSection(Id assessmentSectionId)
Gets the next assessemnt section following the given assesment
section.
|
Question |
getNextQuestion(Id itemId)
Gets the next question in this assesment section.
|
Question |
getNextUnansweredQuestion(Id itemId)
Gets the next unanswered question in this assesment section.
|
AssessmentSection |
getPreviousAssessmentSection(Id assessmentSectionId)
Gets the next assessemnt section following the given assesment
section.
|
Question |
getPreviousQuestion(Id itemId)
Gets the previous question in this assesment section.
|
Question |
getPreviousUnansweredQuestion(Id itemId)
Gets the previous unanswered question in this assesment section.
|
Question |
getQuestion(Id itemId)
Gets the
Question specified by its Id. |
QuestionList |
getQuestions()
Gets the questions of this assessment section.
|
Response |
getResponse(Id itemId)
Gets the submitted response to the associated item.
|
AnswerForm |
getResponseForm(Id itemId)
Gets the response form for submitting an answer.
|
ResponseList |
getResponses()
Gets all submitted responses.
|
QuestionList |
getUnansweredQuestions()
Gets the unanswered questions of this assessment section.
|
boolean |
hasAssessmentBegun(Id assessmentTakenId)
Tests if this assessment has started.
|
boolean |
hasAssessmentSectionBegun(Id assessmentSectionId)
Tests if this assessment section has started.
|
boolean |
hasNextAssessmentSection(Id assessmentSectionId)
Tests if there is a next assessment section in the assessment
following the given assessment section
Id. |
boolean |
hasNextQuestion(Id itemId)
Tests if there is a next question following the given question
Id. |
boolean |
hasNextUnansweredQuestion(Id itemId)
Tests if there is a next unanswered question following the given
question
Id. |
boolean |
hasPreviousAssessmentSection(Id assessmentSectionId)
Tests if there is a previous assessment section in the assessment
following the given assessment section
Id. |
boolean |
hasPreviousQuestion(Id itemId)
Tests if there is a previous question preceeding the given question
Id. |
boolean |
hasPreviousUnansweredQuestion(Id itemId)
Tests if there is a previous unanswered question preceeding the given
question
Id. |
boolean |
hasUnansweredQuestions()
Tests if there are unanswered questions in this assessment section.
|
boolean |
isAnswerAvailable(Id itemId)
Tests if an answer is available for the given item.
|
boolean |
isAssessmentOver(Id assessmentTakenId)
Tests if this assessment is over.
|
boolean |
isAssessmentSectionComplete(Id assessmentSectionId)
Tests if the given assessment section is complete.
|
boolean |
isAssessmentSectionOver(Id assessmentSectionId)
Tests if this assessment section is over.
|
boolean |
isQuestionAnswered(Id itemId)
Tests if the given item has a response.
|
boolean |
requiresSynchronousResponses(Id assessmentSectionId)
Tests if synchronous responses are required in this assessment
section.
|
boolean |
requiresSynchronousSections()
Tests if synchronous sections are required.
|
Response |
skipItem(Id itemId)
Skips an item.
|
void |
submitResponse(Id itemId,
AnswerForm answer)
Submits an answer to an item.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getBankId()
Bank Id associated with this
session. Bank Id associated with this sessionmandatory - This method must be implemented. Bank getBank() throws OperationFailedException, PermissionDeniedException
Bank associated with this session. Bank associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canTakeAssessments()
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer assessment operations to
unauthorized users. false if assessment methods are not authorized,
true otherwisemandatory - This method must be implemented. boolean hasAssessmentBegun(Id assessmentTakenId) throws NotFoundException, OperationFailedException, PermissionDeniedException
false.
assessmentTakenId - Id of the
AssessmentTaken true if this assessment has begun, false
otherwiseNotFoundException - assessmentTakenId is
not foundNullArgumentException - assessmentTakenId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. boolean isAssessmentOver(Id assessmentTakenId) throws NotFoundException, OperationFailedException, PermissionDeniedException
finishedAssessment() is invoked or the designated finish time
has expired.assessmentTakenId - Id of the
AssessmentTaken true if this assessment is over, false
otherwiseNotFoundException - assessmentTakenId is
not foundNullArgumentException - assessmentTakenId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. void finishedAssessment(Id assessmentTakenId) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentTakenId - Id of the
AssessmentTaken IllegalStateException - hasBegun() is
false or isOver() is true NotFoundException - assessmentTakenId is
not foundNullArgumentException - assessmentTakenId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean requiresSynchronousSections()
hasNextSection()
returns true until the end of the assessment.
AssessmentSections may also be accessed via an
AssessmentSectionList. If syncronous sections are required,
AssessmentSectionList.available() == 0 and
AssessmentSectionList.getNextQuestion() blocks until the
section is complete. AssessmentSectionList.hasNext() is
always true until the end of the assessment is reached. true if this synchronous sections are required,
false otherwisemandatory - This method must be implemented. AssessmentSection getFirstAssessmentSection(Id assessmentTakenId) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentTakenId - Id of the
AssessmentTaken IllegalStateException - hasAssessmentBegun()
is false NotFoundException - assessmentTakenId is
not foundNullArgumentException - assessmentTakenId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. boolean hasNextAssessmentSection(Id assessmentSectionId)
Id. assessmentSectionId - Id of the
AssessmentSection true if there is a next section, false
otherwiseIllegalStateException - hasAssessmentBegun()
is false NullArgumentException - sectionId is
null mandatory - This method must be implemented. AssessmentSection getNextAssessmentSection(Id assessmentSectionId) throws OperationFailedException, NotFoundException, PermissionDeniedException
assessmentSectionId - Id of the
AssessmentSection IllegalStateException -
hasNextAssessmentSection() is false OperationFailedException - unable to complete requestNotFoundException - assessmentSectionId
is not foundNullArgumentException - assessmentSectionId
is null PermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. boolean hasPreviousAssessmentSection(Id assessmentSectionId)
Id. assessmentSectionId - Id of the
AssessmentSection true if there is a previous assessment section,
false otherwiseIllegalStateException - hasAssessmentBegun()
is false NullArgumentException - sectionId is
null mandatory - This method must be implemented. AssessmentSection getPreviousAssessmentSection(Id assessmentSectionId) throws OperationFailedException, NotFoundException, PermissionDeniedException
assessmentSectionId - Id of the
AssessmentSection IllegalStateException -
hasNextAssessmentSection() is false OperationFailedException - unable to complete requestNotFoundException - assessmentSectionId
is not foundNullArgumentException - assessmentSectionId
is null PermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. AssessmentSection getAssessmentSection(Id assessmentSectionId) throws OperationFailedException, NotFoundException, PermissionDeniedException
Id. assessmentSectionId - Id of the
AssessmentSection IllegalStateException - hasAssessmentBegun()
is false OperationFailedException - unable to complete requestNotFoundException - assessmentSectionId
is not foundNullArgumentException - assessmentSectionId
is null PermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. AssessmentSectionList getAssessmentSections(Id assessmentTakenId) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentTakenId - Id of the
AssessmentTaken IllegalStateException - hasAssessmentBegun()
is false NotFoundException - assessmentTakenId is
not foundNullArgumentException - assessmentTakenId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. boolean isAssessmentSectionComplete(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentSectionId - Id of the
AssessmentSection true if this assessment section is complete,
false otherwiseIllegalStateException - isAssessmentOver()
is true NotFoundException - assessmentSectionId
is not foundNullArgumentException - assessmentSectionId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AssessmentSectionList getIncompleteAssessmentSections() throws OperationFailedException, PermissionDeniedException
IllegalStateException - hasAssessmentBegun()
is false OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. boolean hasAssessmentSectionBegun(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
false. assessmentSectionId - Id of the
AssessmentSection true if this assessment section has begun,
false otherwiseIllegalStateException - hasAssessmentBegun()
is false or isAssessmentOver() is
true NotFoundException - assessmentSectionId
is not foundNullArgumentException - assessmentSectionId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isAssessmentSectionOver(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
finishedAssessmentSection() is invoked or the
designated finish time has expired.assessmentSectionId - Id of the
AssessmentSection true if this assessment is over, false
otherwiseIllegalStateException -
hasAssessmenSectiontBegun() is false or
isAssessmentSectionOver() is true NotFoundException - assessmentSectionId
is not foundNullArgumentException - assessmentSectionId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void finishedAssessmentSection(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentSectionId - Id of the
AssessmentSection IllegalStateException -
hasAssessmentSectionBegun() is false or
isAssessmentSectionOver() is true NotFoundException - assessmentSectionId
is not foundNullArgumentException - assessmentSectionId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean requiresSynchronousResponses(Id assessmentSectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
hasNextQuestion() and getNextQuestion()
methods. In synchronous mode, hasNextQuestion()
is false until the response for the current question is
submitted. In asynchronous mode, hasNextQuestion()
returns true until the end of the assessment.
Questions may also be accessed via a
QuestionList. If syncronous responses are required,
QuestionList.available() == 0 and
QuestionList.getNextQuestion() blocks until the response is
submitted. QuestionList.hasNext() is always true until
the end of the assessment is reached.assessmentSectionId - Id of the
AssessmentSection true if this synchronous responses are
required, false otherwiseIllegalStateException - hasAssessmentBegun()
is false or isAssessmentOver() is
true NotFoundException - assessmentSectionId
is not foundNullArgumentException - assessmentSectionId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. Question getFirstQuestion() throws OperationFailedException, PermissionDeniedException
IllegalStateException -
hasAssessmentSectionBegun() is false OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. boolean hasNextQuestion(Id itemId)
Id. itemId - Id of the Item true if there is a next question, false
otherwiseIllegalStateException -
hasAssessmentSectionBegun() is false NullArgumentException - itemId is
null mandatory - This method must be implemented. Question getNextQuestion(Id itemId) throws OperationFailedException, NotFoundException, PermissionDeniedException
itemId - Id of the Item IllegalStateException -
hasAssessmentSectionBegun() or
hasNextQuestion() is false OperationFailedException - unable to complete requestNotFoundException - itemId is not foundNullArgumentException - itemId is
null PermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. boolean hasPreviousQuestion(Id itemId)
Id. itemId - Id of the Item true if there is a previous question,
false otherwiseIllegalStateException -
hasAssessmentSectionBegun() is false NullArgumentException - itemId is
null mandatory - This method must be implemented. Question getPreviousQuestion(Id itemId) throws OperationFailedException, NotFoundException, PermissionDeniedException
itemId - Id of the Item IllegalStateException - hasBegun() or
hasPreviousQuestion() is false OperationFailedException - unable to complete requestNotFoundException - itemId is not foundNullArgumentException - itemId is
null PermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. Question getQuestion(Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Question specified by its Id. itemId - the Id of the Question to
retrieve Question IllegalStateException -
hasAssessmentSectionBegun() is false NotFoundException - no Question found
with the given Id in this sectionNullArgumentException - itemId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. QuestionList getQuestions() throws OperationFailedException, PermissionDeniedException
IllegalStateException -
hasAssessmentSectionBegun() is false OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. AnswerForm getResponseForm(Id itemId) throws NotFoundException
itemId - Id of the Item IllegalStateException -
hasAssessmentSectionBegun() is false or
isAssessmentSectionOver() is true NotFoundException - itemId is not foundNullArgumentException - itemId is
null mandatory - This method must be implemented. void submitResponse(Id itemId, AnswerForm answer) throws NotFoundException, OperationFailedException, PermissionDeniedException
itemId - Id of the Item answer - the responseIllegalStateException -
hasAssessmentSectionBegun() is false or
isAssessmentSectionOver() is true InvalidArgumentException - one or more of the elements
in the form is invalidNotFoundException - itemId is not foundNullArgumentException - itemId or
response is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - answerForm is not
of this servicemandatory - This method must be implemented. Response skipItem(Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
itemId - Id of the Item IllegalStateException -
hasAssessmentSectionBegun() is false or
isAssessmentSectionOver() is true NotFoundException - itemId is not foundNullArgumentException - itemId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isQuestionAnswered(Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
itemId - Id of the Item true if this item has a response, false
otherwiseIllegalStateException -
hasAssessmentSectionBegun() is false or
isAssessmentSectionOver() is true NotFoundException - itemId is not foundNullArgumentException - itemId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. QuestionList getUnansweredQuestions() throws OperationFailedException, PermissionDeniedException
IllegalStateException -
hasAssessmentSectionBegun() is false OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. boolean hasUnansweredQuestions()
true if there are unanswered questions,
false otherwiseIllegalStateException - hasBegun() is
false mandatory - This method must be implemented. Question getFirstUnansweredQuestion() throws OperationFailedException, PermissionDeniedException
IllegalStateException -
hasAssessmentSectionBegun() or
hasUnansweredQuestions() is false OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. boolean hasNextUnansweredQuestion(Id itemId)
Id. itemId - Id of the Item true if there is a next unanswered question,
false otherwiseIllegalStateException -
hasAssessmentSectionBegun() is false NullArgumentException - itemId is
null mandatory - This method must be implemented. Question getNextUnansweredQuestion(Id itemId) throws OperationFailedException, NotFoundException, PermissionDeniedException
itemId - Id of the Item IllegalStateException -
hasAssessmentSectionBegun() or
hasNextUnansweredQuestion() is false OperationFailedException - unable to complete requestNotFoundException - itemId is not foundNullArgumentException - itemId is
null PermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. boolean hasPreviousUnansweredQuestion(Id itemId)
Id. itemId - Id of the Item true if there is a previous unanswered
question, false otherwiseIllegalStateException -
hasAssessmentSectionBegun() is false NullArgumentException - itemId is
null mandatory - This method must be implemented. Question getPreviousUnansweredQuestion(Id itemId) throws OperationFailedException, NotFoundException, PermissionDeniedException
itemId - Id of the Item IllegalStateException -
hasAssessmnetSectionBegun() or
hasPreviousUnansweredQuestion() is false
OperationFailedException - unable to complete requestNotFoundException - itemId is not foundNullArgumentException - itemId is
null PermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. Response getResponse(Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
itemId - Id of the Item IllegalStateException -
hasAssessmentSectionBegun() is false or
isAssessmentSectionOver() is true NotFoundException - itemId is not foundNullArgumentException - itemId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. ResponseList getResponses() throws OperationFailedException, PermissionDeniedException
IllegalStateException -
hasAssessmentSectionBegun() is false or
isAssessmentSectionOver() is true OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void clearResponse(Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
itemId - Id of the Item IllegalStateException -
hasAssessmentSectionBegun() is false or
isAssessmentSectionOver() is true NotFoundException - itemId is not foundNullArgumentException - itemId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void finish()
throws OperationFailedException,
PermissionDeniedException
IllegalStateException -
hasAssessmentSectionBegun() is false or
isAssessmentSectionOver() is true OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isAnswerAvailable(Id itemId)
itemId - Id of the Item true if an answer are available, false
otherwiseNullArgumentException - itemId is
null mandatory - This method must be implemented. AssessmentList getAnswers(Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
itemId - Id of the Item IllegalStateException - isAnswerAvailable()
is false NotFoundException - itemId is not foundNullArgumentException - itemId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.