|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.quiz.service.QuizService
public class QuizService
Quiz Service
| Field Summary | |
|---|---|
static String |
BEAN_QUIZ_SERVICE
Name of the bean of QuizService |
static String |
KEY_ERROR
Error key |
static String |
KEY_QUIZ
Quiz key |
static String |
PARAMETER_ACTION
Action parameter |
static String |
PLUGIN_NAME
Name of the quiz plugin |
static String |
PROPERTY_INPUT_PREFIX
Input prefix property |
| Constructor Summary | |
|---|---|
QuizService()
|
|
| Method Summary | |
|---|---|
Map<String,Object> |
calculateQuizProfile(int nIdQuiz,
Map<String,String[]> parameterMap,
Locale locale)
Compute the profile of a user from his answers |
Map<String,Object> |
calculateQuizStepProfile(Quiz quiz,
int nIdCurrentStep,
Map<String,String[]> mapResponsesCurrentStep,
Locale locale,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Compute the profile of a user from his answers |
Quiz |
findQuizById(int nQuizId)
Find a quiz by its primary key |
Map<String,Object> |
getQuiz(int nId)
Gets a quiz as a model map |
Map<String,Object> |
getQuizList()
Gets the list of quiz |
Map<String,Object> |
getQuizNextStep(Quiz quiz,
int nOldStepId)
Gets a quiz step as a model map |
Map<String,Object> |
getResults(int nIdQuiz,
Map<String,String[]> parameterMap,
Locale locale)
Get results |
Map<String,Object> |
getStepResults(Quiz quiz,
int nIdCurrentStep,
Map<String,String[]> mapResponsesCurrentStep,
Locale locale,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get results for the current step |
Map<String,String[]> |
getUserAnswersForGroup(int nIdQuiz,
int nIdOldStep,
Map<String,String[]> parameterMap,
Locale locale,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the answers of a user to questions of a quiz |
void |
processEndOfQuiz(Quiz quiz,
String strScore,
Map<String,String[]> userAnswers)
Process the end of the quiz |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String BEAN_QUIZ_SERVICE
public static final String KEY_QUIZ
public static final String KEY_ERROR
public static final String PLUGIN_NAME
public static final String PARAMETER_ACTION
public static final String PROPERTY_INPUT_PREFIX
| Constructor Detail |
|---|
public QuizService()
| Method Detail |
|---|
public Map<String,Object> getQuizList()
public Quiz findQuizById(int nQuizId)
nQuizId - The id of the quiz
public Map<String,Object> getQuiz(int nId)
nId - The quiz Id
public Map<String,Object> getQuizNextStep(Quiz quiz,
int nOldStepId)
quiz - The quiznOldStepId - The id of the last displayed step, or 0 to display the
first step
public Map<String,String[]> getUserAnswersForGroup(int nIdQuiz,
int nIdOldStep,
Map<String,String[]> parameterMap,
Locale locale,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
nIdQuiz - The id of the quiz to get answers ofnIdOldStep - The last validated stepparameterMap - The map of HTTP parameterslocale - The locale to use to display error messagesplugin - The plugin
public Map<String,Object> getResults(int nIdQuiz,
Map<String,String[]> parameterMap,
Locale locale)
nIdQuiz - The quiz IdparameterMap - The parameters maplocale - The current locale
public Map<String,Object> getStepResults(Quiz quiz,
int nIdCurrentStep,
Map<String,String[]> mapResponsesCurrentStep,
Locale locale,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
quiz - The quiznIdCurrentStep - The id of the stepmapResponsesCurrentStep - The parameters maplocale - The current localeplugin - The plugin
public Map<String,Object> calculateQuizProfile(int nIdQuiz,
Map<String,String[]> parameterMap,
Locale locale)
nIdQuiz - The id of the answered quizparameterMap - The map containing answerslocale - The locale
public Map<String,Object> calculateQuizStepProfile(Quiz quiz,
int nIdCurrentStep,
Map<String,String[]> mapResponsesCurrentStep,
Locale locale,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
quiz - The quiznIdCurrentStep - The id of the current stepmapResponsesCurrentStep - The map containing answerslocale - The localeplugin - The plugin
public void processEndOfQuiz(Quiz quiz,
String strScore,
Map<String,String[]> userAnswers)
quiz - The quiznScore - the scoreuserAnswers - The answers made by the use
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||