Skip to main content
Removed signature
Source Link
Clive
  • 167.9k
  • 19
  • 303
  • 337

There are different templates that you could use to theme the quiz.

  1. page--node--take.tpl.php this would take care of the basic page level template for all the nodes with the url of the form node/nid/take

  2. node--quiz.tpl.php this would be used for the quiz page.

  3. quiz-single-question-node.tpl as you guessed this is the one for the single page quiz node. there is one variable in that $question_node

    content['body']);?>

that would render the quiz form on each of the quiz node. so this could be used to add additional things to the quiz node like a footer with instruction or things like that.

  1. theme_quiz_question_navigation_form function is the place were the navigation buttons are rendered so you could either over ride it in your theme or create a template file. the variable would be $form.

  2. multichoice-answering-form.tpl.php this tpl contains the part of the form other than the buttons in the multichoice question type. this has got a variable called $form. you can make the required changes and then render the same in the tpl with something like print drupal_render($form);

Or the above can also be done using the form_alter function with in a module or theme. the form ID to use would be quiz_question_answering_form

There are many other template and theme functions with in the quiz module to change the look and feel of quiz for example to change the design of the result page you have quiz-report-form.tpl.php

If you go through the files and functions of the quiz module you would see many other templates and theme functions.

Hope this helps.

Best Regards
Shameem

There are different templates that you could use to theme the quiz.

  1. page--node--take.tpl.php this would take care of the basic page level template for all the nodes with the url of the form node/nid/take

  2. node--quiz.tpl.php this would be used for the quiz page.

  3. quiz-single-question-node.tpl as you guessed this is the one for the single page quiz node. there is one variable in that $question_node

    content['body']);?>

that would render the quiz form on each of the quiz node. so this could be used to add additional things to the quiz node like a footer with instruction or things like that.

  1. theme_quiz_question_navigation_form function is the place were the navigation buttons are rendered so you could either over ride it in your theme or create a template file. the variable would be $form.

  2. multichoice-answering-form.tpl.php this tpl contains the part of the form other than the buttons in the multichoice question type. this has got a variable called $form. you can make the required changes and then render the same in the tpl with something like print drupal_render($form);

Or the above can also be done using the form_alter function with in a module or theme. the form ID to use would be quiz_question_answering_form

There are many other template and theme functions with in the quiz module to change the look and feel of quiz for example to change the design of the result page you have quiz-report-form.tpl.php

If you go through the files and functions of the quiz module you would see many other templates and theme functions.

Hope this helps.

Best Regards
Shameem

There are different templates that you could use to theme the quiz.

  1. page--node--take.tpl.php this would take care of the basic page level template for all the nodes with the url of the form node/nid/take

  2. node--quiz.tpl.php this would be used for the quiz page.

  3. quiz-single-question-node.tpl as you guessed this is the one for the single page quiz node. there is one variable in that $question_node

    content['body']);?>

that would render the quiz form on each of the quiz node. so this could be used to add additional things to the quiz node like a footer with instruction or things like that.

  1. theme_quiz_question_navigation_form function is the place were the navigation buttons are rendered so you could either over ride it in your theme or create a template file. the variable would be $form.

  2. multichoice-answering-form.tpl.php this tpl contains the part of the form other than the buttons in the multichoice question type. this has got a variable called $form. you can make the required changes and then render the same in the tpl with something like print drupal_render($form);

Or the above can also be done using the form_alter function with in a module or theme. the form ID to use would be quiz_question_answering_form

There are many other template and theme functions with in the quiz module to change the look and feel of quiz for example to change the design of the result page you have quiz-report-form.tpl.php

If you go through the files and functions of the quiz module you would see many other templates and theme functions.

Source Link
Mohammed Shameem
  • 5.6k
  • 1
  • 20
  • 32

There are different templates that you could use to theme the quiz.

  1. page--node--take.tpl.php this would take care of the basic page level template for all the nodes with the url of the form node/nid/take

  2. node--quiz.tpl.php this would be used for the quiz page.

  3. quiz-single-question-node.tpl as you guessed this is the one for the single page quiz node. there is one variable in that $question_node

    content['body']);?>

that would render the quiz form on each of the quiz node. so this could be used to add additional things to the quiz node like a footer with instruction or things like that.

  1. theme_quiz_question_navigation_form function is the place were the navigation buttons are rendered so you could either over ride it in your theme or create a template file. the variable would be $form.

  2. multichoice-answering-form.tpl.php this tpl contains the part of the form other than the buttons in the multichoice question type. this has got a variable called $form. you can make the required changes and then render the same in the tpl with something like print drupal_render($form);

Or the above can also be done using the form_alter function with in a module or theme. the form ID to use would be quiz_question_answering_form

There are many other template and theme functions with in the quiz module to change the look and feel of quiz for example to change the design of the result page you have quiz-report-form.tpl.php

If you go through the files and functions of the quiz module you would see many other templates and theme functions.

Hope this helps.

Best Regards
Shameem