QUIZ EXAMPLE TEMPLATE

You need jQuery for this example. This example uses the extension t3jquery. The jQuery code and design of this example is from here: http://net.tutsplus.com/demos/test_poll/ http://net.tutsplus.com/tutorials/javascript-ajax/creating-a-dynamic-poll-with-jquery-and-php/ Test it with this TypoScript (without the first 3 lines if you always integrate jQuery):

includeLibs.t3jquery = EXT:t3jquery/class.tx_t3jquery.php
page.11 = USER
page.11.userFunc = tx_t3jquery->addJqJS
plugin.tx_myquizpoll_pi1 {
  isPoll = 1
  templateFile = EXT:myquizpoll/examples/template_rating_jquery.html
  tableAnswers = tx_myquizpoll_voting
}
plugin.tx_myquizpoll_pi1.myVars.answers {
  input_id = 1
  input_label = 1
}
plugin.tx_myquizpoll_pi1.rating {
	extKey = tx_ttnews
	parameter = tt_news
}
Or with:
plugin.tx_myquizpoll_pi1.rating {
	extKey =
	parameter = id
}
Or with:
plugin.tx_myquizpoll_pi1.rating {
	extKey =
	parameter =
}

Note: no breaks allowed in the question. Breaks: JavaScript-Errors...

Templates for whole sites

Questions page:
1. Empty or reference to TEMPLATE_CAPTCHA_NOT_OK.
2. Reference to TEMPLATE_QUIZ_TIME_LIMIT. REF_QUIZ_LIMIT will be empty if "quizTimeMinutes = 0".
3. Reference to TEMPLATE_PAGE_TIME_LIMIT. REF_PAGE_LIMIT will be empty if "pageTimeSeconds = 0".
4. Multiple reference to TEMPLATE_QUESTION.
5. Reference to TEMPLATE_QUIZ_USER_TO_SUBMIT (dontShowUserData = 0), to TEMPLATE_SUBMIT (dontShowUserData = 1) or to TEMPLATE_NO_SUBMIT (if no rights)
6. Dont delete the marker HIDDENFIELDS !!!!!!!

###REF_ERRORS### ###REF_QUIZ_LIMIT### ###REF_PAGE_LIMIT###
###REF_QUESTIONS### ###REF_SUBMIT_FIELDS### ###HIDDENFIELDS###
###POLLRESULT###
###REF_QUESTION_IMAGE_BEGIN###
###VAR_QUESTION_TITLE###
###VAR_QUESTION_NAME### ###P1######VAR_ANSWER_POINTS######P2###
###VAR_QUESTION_ANSWER###
###REF_QUESTION_IMAGE_END### ###REF_DELIMITER###
###VAR_QUESTION_IMAGE###  


...

###NO_SUBMIT###

###DOUBLE_ENTRY###

###NOT_LOGGEDIN###

###CHEATING###

... ... ...