Class QuizResponse
java.lang.Object
fr.paris.lutece.plugins.wiki.modules.quiz.business.QuizResponse
- All Implemented Interfaces:
Serializable
Quiz response entity representing a user's response to a question in an attempt.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetId()Returns the response identifier.intReturns the attempt identifier.intReturns the question identifier.Returns whether the response is correct.intReturns the points earned for this response.Returns the user's answer.voidsetId(int nId) Sets the response identifier.voidsetIdAttempt(int nIdAttempt) Sets the attempt identifier.voidsetIdQuestion(int nIdQuestion) Sets the question identifier.voidsetIsCorrect(Boolean bIsCorrect) Sets whether the response is correct.voidsetPointsEarned(int nPointsEarned) Sets the points earned for this response.voidsetUserAnswer(String strUserAnswer) Sets the user's answer.
-
Constructor Details
-
QuizResponse
public QuizResponse()Default constructor.
-
-
Method Details
-
getId
public int getId()Returns the response identifier.- Returns:
- the response identifier
-
setId
public void setId(int nId) Sets the response identifier.- Parameters:
nId- the response identifier to set
-
getIdAttempt
public int getIdAttempt()Returns the attempt identifier.- Returns:
- the attempt identifier
-
setIdAttempt
public void setIdAttempt(int nIdAttempt) Sets the attempt identifier.- Parameters:
nIdAttempt- the attempt identifier to set
-
getIdQuestion
public int getIdQuestion()Returns the question identifier.- Returns:
- the question identifier
-
setIdQuestion
public void setIdQuestion(int nIdQuestion) Sets the question identifier.- Parameters:
nIdQuestion- the question identifier to set
-
getUserAnswer
Returns the user's answer.- Returns:
- the user's answer
-
setUserAnswer
Sets the user's answer.- Parameters:
strUserAnswer- the user's answer to set
-
getIsCorrect
Returns whether the response is correct.- Returns:
- true if correct, false otherwise, null if not evaluated
-
setIsCorrect
Sets whether the response is correct.- Parameters:
bIsCorrect- true if correct, false otherwise
-
getPointsEarned
public int getPointsEarned()Returns the points earned for this response.- Returns:
- the points earned
-
setPointsEarned
public void setPointsEarned(int nPointsEarned) Sets the points earned for this response.- Parameters:
nPointsEarned- the points earned to set
-