Documentation:How to Use the Question template

From UBC Wiki

This documentation will show you how to use the question template The question template is used in various pages including DIY Media.

The template will help you create an accordion-style question box. When users click on the question box, they will be able to reveal the content. This is useful when you are adding an open assessment style quiz to the wiki (i.e. Students can check the answer to the quiz by clicking on the "show answer" tab) or making the content easier to read for users.

How the Question template works

To use this template, insert the following code to the page:

{{{Question_Template|box1|title=title here|collapsed=yes}} 

In order to use the Question template, you will first need to create a subpage. In this subpage, you will be adding the content. For example, you are using the question template on the Documentation:DIYScreencast page. I will be creating a subpage called Documentation:DIYScreencast/Plan, and add the answer to the quiz on this subpage.

  • box1 = Is where you will be inserting the title of the subpage. For example, if you created a subpage called DocumentationDIYScreencast/Plan, then the your name of the subpage is Plan.
  • title= title here - is the text that it will be displayed on the question template. For example, Step1:Create a Screencast
The diagram depicts how the question template works.

Follow the step below to use the MER Template.

Video


Step1: Create a page

  1. Create a page and add a content.
  2. Add the following question template code to the page {{Question_Template|box1|title=title here|collapsed=yes}}
    1. In the code where it says, title =title add the title of the question template here. For example: title=Q1 What are the 3 key elements of a good focus group? This title will be displayed on the Question Template itself.
    2. The part that says box1 is the name of the subpage which is going to be displayed as as a “hidden content” in the Question Template. You can change the name of the subpage to any name, such as “plan” or “question1”
  3. After you enter add the code, the question template will show up on your page.
    this is how the question template will look once you add the code

Step2: Create a subpage

  1. When you click on "Show" on the question template, hidden content will appear. You can see that the content is linked to the subpage.
  2. Click on the edit button to edit the subpage.
    click on the edit button to edit the subpage
  3. Editing screen will pop up. After you edited the page, click on Save Page .
    Questiontemp4.png
  4. Go back to the page where you have added the question template
    you can go back to the previous page by clicking on the link under the title

Step3: Test the page

Test and see how the page works.When you click on the show tab, the tab will collapse and the content of the subpage will appear.

Questiontemp2.png