public class QuizApp extends Object implements fr.paris.lutece.portal.web.xpages.XPageApplication
| Constructor and Description |
|---|
QuizApp() |
| Modifier and Type | Method and Description |
|---|---|
static void |
doDownloadQuizImage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Do download a quiz image
|
protected fr.paris.lutece.portal.web.xpages.XPage |
getErrorPage(int nIdQuiz,
String strError,
int nStepToRedirect,
Locale locale)
Returns an error page
|
fr.paris.lutece.portal.web.xpages.XPage |
getPage(javax.servlet.http.HttpServletRequest request,
int nMode,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the Quiz XPage content depending on the request parameters and
the current mode.
|
protected fr.paris.lutece.portal.web.xpages.XPage |
getQuizList(Locale locale)
Get the quiz list
|
protected fr.paris.lutece.portal.web.xpages.XPage |
getQuizNextStep(Quiz quiz,
int nOldStepId,
javax.servlet.http.HttpServletRequest request)
Get the next step of the quiz
|
protected fr.paris.lutece.portal.web.xpages.XPage |
getQuizPage(int nQuizId,
Locale locale)
Gets the quiz page
|
protected fr.paris.lutece.portal.web.xpages.XPage |
getQuizResults(Quiz quiz,
Locale locale,
Map<String,String[]> mapParameters,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return The Answers list
|
protected fr.paris.lutece.portal.web.xpages.XPage |
getQuizStepResults(Quiz quiz,
int nIdStep,
Locale locale,
Map<String,String[]> mapResponsesCurrentStep,
javax.servlet.http.HttpSession session,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return The Answers list for the given step
|
public static void doDownloadQuizImage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
request - The requestresponse - The responsepublic fr.paris.lutece.portal.web.xpages.XPage getPage(javax.servlet.http.HttpServletRequest request,
int nMode,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
throws fr.paris.lutece.portal.service.message.SiteMessageException
getPage in interface fr.paris.lutece.portal.web.xpages.XPageApplicationrequest - The HTTP request.nMode - The current mode.plugin - The Pluginfr.paris.lutece.portal.service.message.SiteMessageException - Message displayed if an exception occuresprotected fr.paris.lutece.portal.web.xpages.XPage getQuizList(Locale locale)
locale - The localeprotected fr.paris.lutece.portal.web.xpages.XPage getQuizPage(int nQuizId,
Locale locale)
nQuizId - The quiz Idlocale - The current localeprotected fr.paris.lutece.portal.web.xpages.XPage getQuizNextStep(Quiz quiz, int nOldStepId, javax.servlet.http.HttpServletRequest request)
quiz - The quiz to displaynOldStepId - The id of the last displayed step of the quiz, or 0 if
no step was displayedrequest - The requestprotected fr.paris.lutece.portal.web.xpages.XPage getQuizResults(Quiz quiz, Locale locale, Map<String,String[]> mapParameters, fr.paris.lutece.portal.service.plugin.Plugin plugin)
quiz - The quizlocale - The current localemapParameters - request parameters as a mapplugin - the pluginprotected fr.paris.lutece.portal.web.xpages.XPage getQuizStepResults(Quiz quiz, int nIdStep, Locale locale, Map<String,String[]> mapResponsesCurrentStep, javax.servlet.http.HttpSession session, fr.paris.lutece.portal.service.plugin.Plugin plugin)
quiz - The quiznIdStep - The id of the submitted steplocale - The current localemapResponsesCurrentStep - Responses of the current stepsession - The sessionplugin - the pluginprotected fr.paris.lutece.portal.web.xpages.XPage getErrorPage(int nIdQuiz,
String strError,
int nStepToRedirect,
Locale locale)
nIdQuiz - The id of the quizstrError - The error messagenStepToRedirect - The id of the step to redirect the user to, or 0
to redirect the user to the start of the quizlocale - The current localeCopyright © 2015 City of Paris. All rights reserved.