java.lang.Object
fr.paris.lutece.plugins.wiki.modules.quiz.business.QuizAttempt
All Implemented Interfaces:
Serializable

public class QuizAttempt extends Object implements Serializable
Quiz attempt entity representing a user's attempt to take a quiz.
See Also:
  • 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

      public String getUserGuid()
      Gets the user GUID.
      Returns:
      The user GUID
    • setUserGuid

      public void setUserGuid(String strUserGuid)
      Sets the user GUID.
      Parameters:
      strUserGuid - The user GUID
    • getScore

      public Integer getScore()
      Gets the score achieved.
      Returns:
      The score, or null if not yet scored
    • setScore

      public void setScore(Integer nScore)
      Sets the score achieved.
      Parameters:
      nScore - The score
    • getPassed

      public Boolean getPassed()
      Gets whether the attempt passed.
      Returns:
      True if passed, false if failed, null if not yet evaluated
    • setPassed

      public void setPassed(Boolean bPassed)
      Sets whether the attempt passed.
      Parameters:
      bPassed - True if passed, false otherwise
    • getStartedAt

      public Timestamp getStartedAt()
      Gets the timestamp when the attempt started.
      Returns:
      The start timestamp
    • setStartedAt

      public void setStartedAt(Timestamp dateStartedAt)
      Sets the timestamp when the attempt started.
      Parameters:
      dateStartedAt - The start timestamp
    • getCompletedAt

      public Timestamp getCompletedAt()
      Gets the timestamp when the attempt completed.
      Returns:
      The completion timestamp, or null if not yet completed
    • setCompletedAt

      public void setCompletedAt(Timestamp dateCompletedAt)
      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

      public List<QuizResponse> getResponses()
      Gets the list of responses for this attempt.
      Returns:
      The list of responses
    • setResponses

      public void setResponses(List<QuizResponse> listResponses)
      Sets the list of responses for this attempt.
      Parameters:
      listResponses - The list of responses