Class QuizAttempt
java.lang.Object
fr.paris.lutece.plugins.wiki.modules.quiz.business.QuizAttempt
- All Implemented Interfaces:
Serializable
Quiz attempt entity representing a user's attempt to take a quiz.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the timestamp when the attempt completed.intgetId()Gets the attempt ID.intGets the associated quiz ID.Gets whether the attempt passed.Gets the list of responses for this attempt.getScore()Gets the score achieved.Gets the timestamp when the attempt started.Gets the user GUID.booleanChecks if this attempt has been completed.voidsetCompletedAt(Timestamp dateCompletedAt) Sets the timestamp when the attempt completed.voidsetId(int nId) Sets the attempt ID.voidsetIdQuiz(int nIdQuiz) Sets the associated quiz ID.voidSets whether the attempt passed.voidsetResponses(List<QuizResponse> listResponses) Sets the list of responses for this attempt.voidSets the score achieved.voidsetStartedAt(Timestamp dateStartedAt) Sets the timestamp when the attempt started.voidsetUserGuid(String strUserGuid) Sets the user GUID.
-
Constructor Details
-
QuizAttempt
public QuizAttempt()Default constructor.
-
-
Method Details
-
getId
public int getId()Gets the attempt ID.- Returns:
- The attempt ID
-
setId
public void setId(int nId) Sets the attempt ID.- Parameters:
nId- The attempt ID
-
getIdQuiz
public int getIdQuiz()Gets the associated quiz ID.- Returns:
- The quiz ID
-
setIdQuiz
public void setIdQuiz(int nIdQuiz) Sets the associated quiz ID.- Parameters:
nIdQuiz- The quiz ID
-
getUserGuid
Gets the user GUID.- Returns:
- The user GUID
-
setUserGuid
Sets the user GUID.- Parameters:
strUserGuid- The user GUID
-
getScore
Gets the score achieved.- Returns:
- The score, or null if not yet scored
-
setScore
Sets the score achieved.- Parameters:
nScore- The score
-
getPassed
Gets whether the attempt passed.- Returns:
- True if passed, false if failed, null if not yet evaluated
-
setPassed
Sets whether the attempt passed.- Parameters:
bPassed- True if passed, false otherwise
-
getStartedAt
Gets the timestamp when the attempt started.- Returns:
- The start timestamp
-
setStartedAt
Sets the timestamp when the attempt started.- Parameters:
dateStartedAt- The start timestamp
-
getCompletedAt
Gets the timestamp when the attempt completed.- Returns:
- The completion timestamp, or null if not yet completed
-
setCompletedAt
Sets the timestamp when the attempt completed.- Parameters:
dateCompletedAt- The completion timestamp
-
isCompleted
public boolean isCompleted()Checks if this attempt has been completed.- Returns:
- True if completed, false otherwise
-
getResponses
Gets the list of responses for this attempt.- Returns:
- The list of responses
-
setResponses
Sets the list of responses for this attempt.- Parameters:
listResponses- The list of responses
-