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

public class Quiz extends Object implements Serializable
Quiz entity representing a quiz within a book.
See Also:
  • Constructor Details

    • Quiz

      public Quiz()
      Default constructor.
  • Method Details

    • getId

      public int getId()
      Gets the quiz ID.
      Returns:
      The quiz ID
    • setId

      public void setId(int nId)
      Sets the quiz ID.
      Parameters:
      nId - The quiz ID
    • getIdBook

      public int getIdBook()
      Gets the associated book ID.
      Returns:
      The book ID
    • setIdBook

      public void setIdBook(int nIdBook)
      Sets the associated book ID.
      Parameters:
      nIdBook - The book ID
    • getTitle

      public String getTitle()
      Gets the quiz title.
      Returns:
      The quiz title
    • setTitle

      public void setTitle(String strTitle)
      Sets the quiz title.
      Parameters:
      strTitle - The quiz title
    • getDescription

      public String getDescription()
      Gets the quiz description.
      Returns:
      The quiz description
    • setDescription

      public void setDescription(String strDescription)
      Sets the quiz description.
      Parameters:
      strDescription - The quiz description
    • getTimeLimitMinutes

      public Integer getTimeLimitMinutes()
      Gets the time limit in minutes.
      Returns:
      The time limit in minutes, or null if no limit
    • setTimeLimitMinutes

      public void setTimeLimitMinutes(Integer nTimeLimitMinutes)
      Sets the time limit in minutes.
      Parameters:
      nTimeLimitMinutes - The time limit in minutes
    • getMaxAttempts

      public Integer getMaxAttempts()
      Gets the maximum number of attempts.
      Returns:
      The maximum attempts, or null if unlimited
    • setMaxAttempts

      public void setMaxAttempts(Integer nMaxAttempts)
      Sets the maximum number of attempts.
      Parameters:
      nMaxAttempts - The maximum attempts
    • getPassingScore

      public int getPassingScore()
      Gets the passing score percentage.
      Returns:
      The passing score
    • setPassingScore

      public void setPassingScore(int nPassingScore)
      Sets the passing score percentage.
      Parameters:
      nPassingScore - The passing score
    • getRandomQuestions

      public boolean getRandomQuestions()
      Gets whether questions should be randomized.
      Returns:
      True if questions should be randomized
    • setRandomQuestions

      public void setRandomQuestions(boolean bRandomQuestions)
      Sets whether questions should be randomized.
      Parameters:
      bRandomQuestions - True if questions should be randomized
    • isPublished

      public boolean isPublished()
      Gets whether the quiz is published.
      Returns:
      True if the quiz is published
    • setIsPublished

      public void setIsPublished(boolean bIsPublished)
      Sets whether the quiz is published.
      Parameters:
      bIsPublished - True if the quiz is published
    • getDisplayOrder

      public int getDisplayOrder()
      Gets the display order of the quiz.
      Returns:
      The display order
    • setDisplayOrder

      public void setDisplayOrder(int nDisplayOrder)
      Sets the display order of the quiz.
      Parameters:
      nDisplayOrder - The display order
    • getQuestions

      public List<QuizQuestion> getQuestions()
      Gets the list of quiz questions.
      Returns:
      The list of questions
    • setQuestions

      public void setQuestions(List<QuizQuestion> listQuestions)
      Sets the list of quiz questions.
      Parameters:
      listQuestions - The list of questions
    • hasMaxAttempts

      public boolean hasMaxAttempts()
      Checks if this quiz has a maximum attempt limit.
      Returns:
      True if a maximum attempt limit is set and greater than zero