Class QuizAnswerHome
java.lang.Object
fr.paris.lutece.plugins.wiki.modules.quiz.business.QuizAnswerHome
Home class for QuizAnswer providing static service methods.
-
Method Summary
Modifier and TypeMethodDescriptionstatic QuizAnswercreate(QuizAnswer answer) Creates a new quiz answer in the database.static List<QuizAnswer>getAnswersByQuestion(int nIdQuestion) Retrieves all answers for a specific question.static voidremoveByQuestion(int nIdQuestion) Removes all answers for a specific question.
-
Method Details
-
create
Creates a new quiz answer in the database.- Parameters:
answer- The quiz answer to create- Returns:
- The created quiz answer with its ID set
-
removeByQuestion
public static void removeByQuestion(int nIdQuestion) Removes all answers for a specific question.- Parameters:
nIdQuestion- The question ID
-
getAnswersByQuestion
Retrieves all answers for a specific question.- Parameters:
nIdQuestion- The question ID- Returns:
- A list of quiz answers for the question
-