tags:

views:

66

answers:

2

Hi,

I am trying to create quizzes which are kind of like the ones found here : http://theoatmeal.com/quizzes on my drupal site. I am trying to use drupal's quiz module ( http://drupal.org/project/quiz )

Basically everyone answer, in every question, in a quiz will have some particular weightage. Say answer 1 will have 2 marks, ans two will have 3 marks, answer 3 will have 4 marks.. and so on. Eventually all these get added up and the result is shown according to the final tally of marks.

Can anyone show me the steps as to how to make such quizzes using the quiz module or some other module/method..

+1  A: 

There is some heavy customization of Quiz display needed yo achieve something similar to the Oatmeal's quizzes.

Here are some notes on Quiz theming:

  • The different state of playing a quiz are all handled by the same page. This page is the view page of a quiz node. As for all nodes pages, the node.tpl.php template is used. Drupal allows you to theme nodes by content-type using suggestions, this allow you to create a node-quiz.tpl.php file in your theme folder to be used when rendering quiz node (the content-type for quizzes is quiz).
  • All Drupal pages also use the page.tpl.php. When viewing a node, the $variables array passed as argument to template_preprocess_page will contains a 'node' entry with the viewed node. If required, it can also be used to further customize quiz pages. The following sample code will allow you to use a page-quiz.tpl.php file in your theme folder as page template for all quiz pages. function THEME_preprocess_page(&$variables) { $node = $variables['node']; if($node && $node->type == quiz) { $variables['template_files'][] = 'page-quiz'; } }
  • Each question type use its own rendering. Sadly, for multichoice question, a theme function is not directly available to customize the question. The question rendered through the Form API (multichoice_render_question_form()) and can be customized using hook_form_multichoice_render_question_form_alter(), but only in a module, not in a theme.
  • To customize the feedback displayed at the end of a quiz (ie. quiz result), the following theme functions can be overrided:
mongolito404
A: 

Actually, the theoatmeal.com website cannot support make and embed quiz on your drupal site. Howvere, there are many free online quiz creators can help you do this work. You can choose the proper one from thess 12 free online quiz makers (quiz-creator.com/blog/2009/09/free-online-quiz-creator-tools-create-online-quizzes). If you want to some free desktop ones, here are many free test makers for teachers, you can use these to make quizzes for your site.

related questions