Class Quiz
java.lang.Object
fr.paris.lutece.plugins.wiki.modules.quiz.business.Quiz
- All Implemented Interfaces:
Serializable
Quiz entity representing a quiz within a book.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the quiz description.intGets the display order of the quiz.intgetId()Gets the quiz ID.intGets the associated book ID.Gets the maximum number of attempts.intGets the passing score percentage.Gets the list of quiz questions.booleanGets whether questions should be randomized.Gets the time limit in minutes.getTitle()Gets the quiz title.booleanChecks if this quiz has a maximum attempt limit.booleanGets whether the quiz is published.voidsetDescription(String strDescription) Sets the quiz description.voidsetDisplayOrder(int nDisplayOrder) Sets the display order of the quiz.voidsetId(int nId) Sets the quiz ID.voidsetIdBook(int nIdBook) Sets the associated book ID.voidsetIsPublished(boolean bIsPublished) Sets whether the quiz is published.voidsetMaxAttempts(Integer nMaxAttempts) Sets the maximum number of attempts.voidsetPassingScore(int nPassingScore) Sets the passing score percentage.voidsetQuestions(List<QuizQuestion> listQuestions) Sets the list of quiz questions.voidsetRandomQuestions(boolean bRandomQuestions) Sets whether questions should be randomized.voidsetTimeLimitMinutes(Integer nTimeLimitMinutes) Sets the time limit in minutes.voidSets the quiz title.
-
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
Gets the quiz title.- Returns:
- The quiz title
-
setTitle
Sets the quiz title.- Parameters:
strTitle- The quiz title
-
getDescription
Gets the quiz description.- Returns:
- The quiz description
-
setDescription
Sets the quiz description.- Parameters:
strDescription- The quiz description
-
getTimeLimitMinutes
Gets the time limit in minutes.- Returns:
- The time limit in minutes, or null if no limit
-
setTimeLimitMinutes
Sets the time limit in minutes.- Parameters:
nTimeLimitMinutes- The time limit in minutes
-
getMaxAttempts
Gets the maximum number of attempts.- Returns:
- The maximum attempts, or null if unlimited
-
setMaxAttempts
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
Gets the list of quiz questions.- Returns:
- The list of questions
-
setQuestions
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
-