org.olat.ims.qti.container
Class AssessmentContext

java.lang.Object
  extended by org.olat.ims.qti.container.AssessmentContext
All Implemented Interfaces:
java.io.Serializable

public class AssessmentContext
extends java.lang.Object
implements java.io.Serializable

contains the sections of the assignment. assumption: each toplevel-section of an assignment means one screen

Author:
Felix Jost
See Also:
Serialized Form

Constructor Summary
AssessmentContext()
          default constructor needed for persistence
 
Method Summary
 void eval()
           
 SectionContext getCurrentSectionContext()
           
 int getCurrentSectionContextPos()
          Returns the currentSectionContextPos.
 float getCutvalue()
           
 long getDuration()
          Return the time to completion for this assessment
 long getDurationLimit()
           
 java.lang.String getIdent()
          Method getIdent.
 int getItemContextCount()
          Return the total items in all sections of the assessment.
 int getItemPosWithinAssessment()
          Get the position of the current item within the assessment.
 int getItemsAttemptedCount()
           
 int getItemsPresentedCount()
           
 float getMaxScore()
          Get the maximum score for this assessment.
 Objectives getObjectives()
           
 Output getOutput()
           
 float getScore()
           
 SectionContext getSectionContext(int pos)
           
 int getSectionContextCount()
          Method getSectionContextCount.
 Switches getSwitches()
           
 long getTimeOfStart()
           
 long getTimeOfStop()
           
 java.lang.String getTitle()
           
 void init()
           
 boolean isFeedbackavailable()
           
 boolean isOpen()
          checks whether the user may still submit answers
 boolean isPassed()
           
 boolean isStarted()
           
 void setCurrentSectionContextPos(int i)
          Method setCurrentSectionContextPos.
 void setCurrentSectionPos(int currentSectionPos)
          Sets the currentSectionPos.
 void setFeedbackavailable(boolean b)
           
 void setSwitches(Switches switches)
           
 void setUp(AssessmentInstance assessInstance)
          Method setUp.
 void start()
          start assessment
 void stop()
          stop assessment
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssessmentContext

public AssessmentContext()
default constructor needed for persistence

Method Detail

init

public void init()

setUp

public void setUp(AssessmentInstance assessInstance)
Method setUp.

Parameters:
assessInstance -

start

public void start()
start assessment


stop

public void stop()
stop assessment


eval

public void eval()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getIdent

public java.lang.String getIdent()
Method getIdent.

Returns:
String

getTitle

public java.lang.String getTitle()
Returns:

getCurrentSectionContext

public SectionContext getCurrentSectionContext()
Returns:

setCurrentSectionPos

public void setCurrentSectionPos(int currentSectionPos)
Sets the currentSectionPos.

Parameters:
currentSectionPos - The currentSectionPos to set

getSectionContextCount

public int getSectionContextCount()
Method getSectionContextCount.

Returns:
int

getItemContextCount

public int getItemContextCount()
Return the total items in all sections of the assessment.

Returns:
Total number of items

getItemPosWithinAssessment

public int getItemPosWithinAssessment()
Get the position of the current item within the assessment.

Returns:
position of the current item within the assessment.

setCurrentSectionContextPos

public void setCurrentSectionContextPos(int i)
Method setCurrentSectionContextPos.

Parameters:
i -

getCurrentSectionContextPos

public int getCurrentSectionContextPos()
Returns the currentSectionContextPos.

Returns:
int

isOpen

public boolean isOpen()
checks whether the user may still submit answers

Returns:

isStarted

public boolean isStarted()
Returns:

getSectionContext

public SectionContext getSectionContext(int pos)
Parameters:
pos -
Returns:

getDurationLimit

public long getDurationLimit()
Returns:
long

getDuration

public long getDuration()
Return the time to completion for this assessment

Returns:
long Millis to completion

getMaxScore

public float getMaxScore()
Get the maximum score for this assessment. (Sum of maxscore of all items)

Returns:

getScore

public float getScore()
Returns:

isPassed

public boolean isPassed()
Returns:

getItemsPresentedCount

public int getItemsPresentedCount()
Returns:

getItemsAttemptedCount

public int getItemsAttemptedCount()
Returns:

getOutput

public Output getOutput()
Returns:
Output

getSwitches

public Switches getSwitches()
Returns:

setSwitches

public void setSwitches(Switches switches)
Parameters:
switches -

isFeedbackavailable

public boolean isFeedbackavailable()
Returns:

setFeedbackavailable

public void setFeedbackavailable(boolean b)
Parameters:
b -

getCutvalue

public float getCutvalue()
Returns:
float

getTimeOfStart

public long getTimeOfStart()
Returns:

getTimeOfStop

public long getTimeOfStop()
Returns:

getObjectives

public Objectives getObjectives()