Quiz shortcodes

For creating and editing quizzes, we recommend the Qwizcards Wizard In the new “Block Editor” (Gutenberg), open a “Classic” paragraph or block, and click the icon.  (In either the “Block Editor” or the “Classic Editor” you may have to click the “Toolbar Toggle” icon — the Q icon is in the second row.)

The Qwizcards Wizard is also available here.

The Qwizcards Wizard creates “shortcodes” – keywords enclosed in square brackets – on your page or post.  This page shows you how the shortcodes for quizzes work.

Lightening quickstart

To create a quiz, first enclose your quiz in [qwiz] … [/qwiz] pairs:

[qwiz]

(quiz questions and answers go here)

[/qwiz]


The example shown below provides more detail.  Each question begins with a [q] shortcode.  Answer choices each begin with a [c]. The correct answer is marked with an asterisk: [c*].  In the example, the images was added with the WordPress editor “Add Media” button.

[qwiz]

[q] In the diagram, which number refers to a primary consumnumbered_food_chainer?

[c] 1

[c*] 2

[c] 3

[c] 4

[/qwiz]


Note that you can use the WordPress editor to format the text – bold, color, etc.  Here’s what this one-question quiz looks like when you view your page.  Note that by default the Qwizcards plugin creates feedback for correct and incorrect answers (such as “Excellent!” or “Sorry, that’s not correct”).

[qwiz]

[q] In the diagram, which number refers to a primary consumer?

[c]IDE=[Qq]

[c]ID I=[Qq]

[c]IDM=[Qq]

[c]IDQ=[Qq]

[/qwiz]

(Thanks to Glenn Wolkenfeld at learn-biology.com)

Options

You can:

Create custom feedback for choices
Select “Learn mode” or “Test mode”
Add questions
Add labeled-diagram questions
Add hangman-input questions
Add free-form-input questions
Add instant-multiple-choice questions
Add information-only questions
Add a header
Add an introduction
Add “exit text”
Add a “Take the quiz again” button
Assign “topics” to each question – the quiz-taker’s performance will be summarized by topic at the end of the quiz
Change the alignment and style of the quiz box – size, borders, background, font, etc.
Randomize the order of the questions
Add “comment text” that users will not see

Create custom feedback for choices

You can create specific feedback for selected choices, or for all choices.  Your specific entry will be used instead of the default feedback (such as “Excellent!”).  Custom feedback is entered with an [f] shortcode following each choice.

You can use a single [fx] shortcode to specify the feedback shown for all incorrect choices (that you have not otherwise specified with an [f] shortcode — that is, the [fx] feedback will be used for any incorrect choice for which you did not provide [f] feedback).

As an alternative to entering feedback for a choice immediately after the choice, the feedback for all choices may be grouped together following all of the choices.  In this case feedback must be entered for each choice — that is, the number of feedback shortcodes [f] for a question must be the same as the number of choice shortcodes [c] or [c*] for that question.  Here is an example (use the small scrollbar on the right to see all of the feedback entries):

[qwiz]

[q] In the diagram, which number refers to a primary consumer?numbered_food_chain

[c] 1

[c*] 2

[c] 3

[c] 4

[f] No. The organisms on the bottom of a food chain are always producers.

[f] Nice job: the organisms shown at “2” are eating the producers, which makes them primary consumers

[f] No. The organisms shown at “3” are secondary consumers, or carnivores.

[f] No. The organisms shown at “4” are third level, or tertiary consumers.

[/qwiz]

 

Select “Learn mode” or “Test mode”

There are two ways that questions can be presented to the quiz-taker.  In “Learn mode” (the default) incorrectly-answered questions are repeated at the end (after the quiz-taker has attempted all questions in the quiz), and continue to be repeated until all questions have been answered correctly.  (Quizzes with only a single question are an exception: these are a “quick check for understanding” – only the feedback for the quiz-taker’s answer is provided.  Multiple-question quizzes provide a summary at the end of the quiz of the quiz-taker’s performance.)

In “Test mode” questions are not repeated.  A simple summary of the number of correct and incorrect answers is provided after the quiz-taker has answered all questions in the quiz.

”Test mode” can be selected by including a “‘repeat_incorrect’ attribute” to the [qwiz] shortcode:

[qwiz repeat_incorrect=”false”]

Add questions

You can continue adding questions to your quiz by adding [q], [c], and [f] shortcodes (again, for “question,” “choice,” and “feedback”). Remember that one choice should be marked “correct” [c*].  Feedback [f] is optional.  See the example below, where an additional question appears before the question in the first quiz, above.

Add labeled-diagram questions

A question may consist of a diagram accompanied by a list of labels that the user should drag-and-drop to the correct place on the diagram.  See the Labeled-diagrams Quickstart page.

Note that you can control the placement of the list of labels by adding “labels=” to the [q] shortcode:

[q labels=”top”]

You may specify “top”, “bottom”, “left”, or “right”.  The default is “right”.

Add hangman-input questions

In hangman-format questions, an input text box shows blanks for each letter of a target word or phrase, and users guess letters as in the popular “hangman” game.  Correct guesses cause the blanks to be filled in; incorrect guesses are added to an “incorrect” list.  The question will be considered to be answered correctly if users can fill in the word while making no more than three incorrect letter guesses.

A hangman input text box is specified with the shortcode [hangman].  Multiple hangman input text boxes can be specified for each question.  [c] shortcodes (one for each [hangman] shortcode) provide the target word for each input text box.  Here’s an example:

[qwiz]

[q] In a eukaryotic cell, the genetic material is normally in the [hangman].

The genetic material consists of [hangman], which is short for [hangman].

[c] nucleus

[c] DNA

[c] deoxyribonucleic acid

[/qwiz]

 

And here is the quiz:

[qwiz]

[q] In a eukaryotic cell, the genetic material is normally in the [hangman].

The genetic material consists of [hangman], which is short for [hangman].

[c]IG51Y2xldXM=[Qq]

[c]IEROQQ==[Qq]

[c]IGRlb3h5cmlib251Y2xlaWMgYWNpZA==[Qq]

[/qwiz]

Add free-form-input questions

In addition to multiple-choice questions and labeled-diagram questions, you can also specify questions with free-form input. Open-ended questions have been found to increase learning and retention; apparently the greater cognitive effort better “exercises” the brain’s recall circuits (see Make it Stick: the Science of Successful Learning, Peter Brown, Henry Roediger, and Mark McDaniel, Belknap Press, 2014).

Qwizcards’ free-form-input questions offer word-match suggestions. Users select potential answers from suggestions provided once the user has typed a few letters into the input text box. A “loose-matching” algorithm shows suggestions based on word sounds in addition to word spellings, so that success is not hindered by minor spelling mistakes.

In free-form-word-match questions, word suggestions are based on

(a)  a dictionary of English words;
(b)  a “default list” of about 500 biology-related terms; and
(c)  the correct-answer words that you specify (as shown below).

On any question you can specify whether the dictionary words and/or the term-list words are included (see “Free-format-word-match options,” below).  You can also provide an alternate list of terms for any quiz, and you can add terms to the default list or to the quiz-specific list.  See Free-form-word-match terms.  Finally, it is also possible to specify that no suggestions be provided at all.  In this case the user must accurately type the correct-answer word (specified with shortcode [c*] – see below) to get the question right.

Here is an example of a free-form-word-match question. You create a free-form-word-match text box with the shortcode [textentry]. You provide a correct-answer word with the correct-choice shortcode [c*].

[qwiz]

[q] In a eukaryotic cell, the genetic material is normally in the [textentry].

[c*] nucleus

[q] The energy factories of the cell are called [hangman].

[c*] mitochondria

[/qwiz]

 

That’s all that’s required. Here’s the resulting two-question quiz:

[qwiz]

[q]

In a eukaryotic cell, the genetic material is

normally in the [textentry].

[c]IG51Y2 xldXM=[Qq]

[q] The energy factories of the cell are called [hangman].

[c]IG1pdG9jaG 9uZHJpYQ==[Qq]

[/qwiz]

In this case the Qwizcards plugin provides default positive feedback (such as “Good!”) as well as negative feedback (such as “Sorry, that’s not correct”).

As the next example shows, with word-match suggestion questions you can specify additional correct words and specific feedback for each word with [c*]-[f] shortcode pairs (for “correct choice” and “feedback”). You can also provide specific feedback for specific incorrect words with [c]-[f] shortcode pairs. (These options are ignored for hangman-format questions.)  The feedback given with an [f] shortcode can apply to multiple words — enter words separated by semicolons following either the [c*] or [c] shortcode.

Finally, you can provide specific feedback for any other selection (that is, any suggestion word that has not been specified with a [c*] or [c] shortcode).  You enter feedback for “other” by using a “wildcard choice” code — a [c] followed by an asterisk — to indicate “other choice”, and then following that with an [f] shortcode.  This example includes such a choice (which you can see if you scroll down with the small scrollbar at the right):

[qwiz]

[q] In the diagram, what is the number 3 pointing to?

04_simple-numbered-membrane

[textentry]

[c*] protein channel

[f] Yes, excellent — this channel forms a pore that allows molecules to cross the membrane

[c*] ion channel; ion pump; ion transporter

[f] Yes, very good; this could be a protein that forms an active transport channel, or it could form a passive channel.

[c*] pore; membrane pore

[f] Yes, this is a protein that forms a channel through the membrane

[c*] channel; membrane channel

[f] Yes, this is a protein that allows molecules to cross the membrane

[c] transmembrane protein

[f] While this is a transmembrane protein, what purpose does it serve?

[c] protein

[f] While this is a protein, it is a particular kind that allows molecules to cross the membrane

[c] *

[f] No, this is a kind of membrane protein that allows molecules to cross the membrane

[/qwiz]

Here’s how the quiz appears:

[qwiz]

[q] In the diagram, what is the number 3 pointing to?

[textentry]

[c]IHByb3RlaW4g Y2hhbm5lbA==[Qq]

[f]IFllcywgZXhjZWxsZW50ICYjODIxMjsgdGhpcyBjaGFubmVsIGZvcm1zIGEgcG9yZSB0aGF0IGFsbG93cyBtb2xlY3VsZXMgdG8gY3Jvc3MgdGhlIG1lbWJyYW5l[Qq]

[c]IGlvbiBjaGFubmVsOyBpb24gcH VtcDsgaW9uIHRyYW5zcG9ydGVy[Qq]

[f]IFllcywgdmVyeSBnb29kOyB0aGlzIGNvdWxkIGJlIGEgcHJvdGVpbiB0aGF0IGZvcm1zIGFuIGFjdGl2ZSB0cmFuc3BvcnQgY2hhbm5lbCwgb3IgaXQgY291bGQgZm9ybSBhIHBhc3NpdmUgY2hhbm5lbC4=[Qq]

[c]IHBvcmU7IG1lbW JyYW5lIHBvcmU=[Qq]

[f]IFllcywgdGhpcyBpcyBhIHByb3RlaW4gdGhhdCBmb3JtcyBhIGNoYW5uZWwgdGhyb3VnaCB0aGUgbWVtYnJhbmU=[Qq]

[c]IGNoYW5uZWw7IG1lbW JyYW5lIGNoYW5uZWw7[Qq]

[f]IFllcywgdGhpcyBpcyBhIHByb3RlaW4gdGhhdCBhbGxvd3MgbW9sZWN1bGVzIHRvIGNyb3NzIHRoZSBtZW1icmFuZQ==[Qq]

[c]IHRyYW5zbWVtYnJhbmUgcHJvdGVpbg==[Qq]

[f]IFdoaWxlIHRoaXMgaXMgYSB0cmFuc21lbWJyYW5lIHByb3RlaW4sIHdoYXQgcHVycG9zZSBkb2VzIGl0IHNlcnZlPw==[Qq]

[c]IHByb3RlaW4=[Qq]

[f]IFdoaWxlIHRoaXMgaXMgYSBwcm90ZWluLCBpdCBpcyBhIHBhcnRpY3VsYXIga2luZCB0aGF0IGFsbG93cyBtb2xlY3VsZXMgdG8gY3Jvc3MgdGhlIG1lbWJyYW5l[Qq]

[c]ICo=[Qq]

[f]IE5vLCB0aGlzIGlzIGEga2luZCBvZiBtZW1icmFuZSBwcm90ZWluIHRoYXQgYWxsb3dzIG1vbGVjdWxlcyB0byBjcm9zcyB0aGUgbWVtYnJhbmU=[Qq]

[/qwiz]

Free-format-word-match options

Do not use dictionary for suggestion words.  You can specify that the English-word dictionary not be used for suggestions for this question by adding the attribute “use_dict” to the [textentry] shortcode, like this:

[textentry use_dict=”false”]

In this case suggestion words will be taken from the default list of terms or from the substitute list of terms you provide (see Free-form-word-match terms) and from the correct-answer words you provide (with [c*]).

Do not use terms lists for suggestion words. You can specify that the default or substitute terms lists for a quiz not be used for suggestions for this question by adding the attribute “use_terms” to the [textentry] shortcode, like this:

[textentry use_terms=”false”]

In this case suggestion words will be taken from the English-word dictionary and from the correct-answer words you provide (with [c*]).

Plurals. You can specify that plural forms of the words in the default terms list be shown as suggestions to the user. This will be useful if your question may be most naturally posed as having a plural answer. For example, alternative answers to the question, “What is the primary component of cell membranes?” should be in plural form (such as “phospholipids”).  Add “plural” to the shortcode, like this:

[textentry plural=”true”]

Quiz-specific terms. As mentioned above, you may enter or specify your own list of default terms, or add terms to the default list. This can be done separately, with distinct lists, for each quiz, if you like. See Free-form-word-match terms.

Single-character entry – “instant multiple-choice.”  You can specify that the answer is only a single character with the “single_char” attribute, like this:

[textentry single_char=”true”]

In this case suggestions will not be shown.  As soon as the user types a character in the input box, Qwizcards will check whether the character matches the correct answer or one of the other choices ([c*], [c], and [c] *, as above) and provide feedback.  This is handy for a diagram with numbered features, for example: “The pancreas is at number [textentry single_char=”true”] in this diagram.”

No suggestions at all.  Fill-in-the-blank input can also be required without providing any suggestions to the user.  In this case the user must enter the correct word (or one of the correct words, if multiple correct answers are provided), spelled correctly, to get the question right.  Add “suggest” to the shortcode, like this:

[textentry suggest=”false”]

Add instant-multiple-choice questions

As mentioned just above, single-character free-form input provides an option for “instant multiple-choice.” If, for example, the user should select the correct letter or number indicating a feature on a diagram, it is handy to have the user simply enter the character in the input box rather than providing a set of “radio buttons” that present each character as a choice.

You can specify single-character entry like this:

[textentry single_char=”true”]

[c*] A

[f] Yes, “A” is correct.

Here is an example quiz:

[qwiz]

[q] In this cell diagram, the cell membrane is at number [textentry single_char=”true”]

[c]ID E=[Qq]

[f]IFllcywgdGhlIG1lbWJyYW5lIGlzIHRoZSBvdXRlciBlbnZlbG9wZSBvZiB0aGUgY2VsbC4=[Qq]

[c]ICo=[Qq]

[f]IE5vLCB0aGF0JiM4MjE3O3Mgbm90IGNvcnJlY3QuwqAgVGhlIG1lbWJyYW5lIGlzIHRoZSBvdXRlciBlbnZlbG9wZSBvZiB0aGUgY2VsbC4=[Qq]

[/qwiz]

Add information-only questions

An “information-only question” just presents its content inside the quiz box on the page. Such a “question” doesn’t actually ask a question or require any user input — rather it is a “placeholder” or “intermission” in a quiz. The user can click a “Next question” button to proceed.

You specify an information-only question by entering a question shortcode [q] followed by text, but not by [c*] or [c] or any other such shortcodes.

The next example, below, includes such an information-only question.

Add a header

If you start your quiz with an [h] shortcode, the text after the [h] will be placed in a header at the top of the quiz. See the example, below.

Add an introduction

Use an [i] shortcode to enter an introduction. The [i] shortcode and text go after the header [h], if present, and before the first question [q]. The introduction will appear as a separate introductory “page” with a “Start quiz” button.

If your quiz only has one question, then your introductory text will appear in the quiz box along with your first question.

Here is a sample quiz that includes a header, an introduction, and an information-only question:

[qwiz]

[h] Checking Understanding: Food chains

[i] Just to make sure you’ve mastered all of the terms above, take this short quiz.  It’s three questions, all based on the diagram above.

If you haven’t taken a sciencemusicvideos quiz before, here’s how it works: Each question is multiple choice, but the entire quiz is like a series of flashcards. If you get the question right, it comes off the deck. If you get the question wrong, it goes to the bottom of the deck.

Click “start” to begin.

[q topic=”Food chains; Producers”] In the diagram, which number refers to producers?

[c*] 1

[f] Excellent. Level 1 consists of producers.

[c] 2

[f] No. Producers are always at the bottom of a food chain. Level 2 consists of primary consumers.

[c] 3

[f] No. Producers are always at the bottom of a food chain. Level 3 consists of secondary consumers.

[c] 4

[f] No. Producers are always at the bottom of a food chain. Level 4 consists of third level, or tertiary consumers.

[q topic=”info”]

Now we are going to switch from “producers” to “primary consumers.” Remember, “primary” means “first.”

[q topic=”Food chains; Primary consumers”] In the diagram, which number refers to a primary consumer?

[c] 1

[f] No. The organisms on the bottom of a food chain are always producers.

[c*] 2

[f] Nice job: the organisms shown at “2″ are eating the producers, which makes them primary consumers

[c] 3

[f] No. The organisms shown at “3″ are secondary consumers, or carnivores.

[c] 4

[f] No. The organisms shown at “4″ are third level, or tertiary consumers.

[x]
You can learn more about food chains at sciencemusicvideos.com

[restart]

[/qwiz]


Here’s how the complete quiz appears when you view the page:

[qwiz]

[h] Checking Understanding: Food chains

[i] Just to make sure you’ve mastered all of the terms above, take this short quiz.  It’s three questions, all based on the diagram above.

If you haven’t taken a sciencemusicvideos quiz before, here’s how it works: Each question is multiple choice, but the entire quiz is like a series of flashcards. If you get the question right, it comes off the deck. If you get the question wrong, it goes to the bottom of the deck.

Click “start” to begin.

[q topic=”Food chains; Producers”] In the diagram, which number refers to producers?

[c]ID E=[Qq]

[f]IEV4Y2VsbGVudC4gTGV2ZWwgMSBjb25zaXN0cyBvZiBwcm9kdWNlcnMu[Qq]

[c]IDI=[Qq]

[f]IE5vLiBQcm9kdWNlcnMgYXJlIGFsd2F5cyBhdCB0aGUgYm90dG9tIG9mIGEgZm9vZCBjaGFpbi4gTGV2ZWwgMiBjb25zaXN0cyBvZiBwcmltYXJ5IGNvbnN1bWVycy4=[Qq]

[c]IDM=[Qq]

[f]IE5vLiBQcm9kdWNlcnMgYXJlIGFsd2F5cyBhdCB0aGUgYm90dG9tIG9mIGEgZm9vZCBjaGFpbi4gTGV2ZWwgMyBjb25zaXN0cyBvZiBzZWNvbmRhcnkgY29uc3VtZXJzLg==[Qq]

[c]IDQ=[Qq]

[f]IE5vLiBQcm9kdWNlcnMgYXJlIGFsd2F5cyBhdCB0aGUgYm90dG9tIG9mIGEgZm9vZCBjaGFpbi4gTGV2ZWwgNCBjb25zaXN0cyBvZiB0aGlyZCBsZXZlbCwgb3IgdGVydGlhcnkgY29uc3VtZXJzLg==[Qq]

[q topic=”info”]

Now we are going to switch from “producers” to “primary consumers.” Remember, “primary” means “first.”

[q topic=”Food chains; Primary consumers”] In the diagram, which number refers to a primary consumer?

[c]IDE=[Qq]


[f]IE5vLiBUaGUgb3JnYW5pc21zIG9uIHRoZSBib3R0b20gb2YgYSBmb29kIGNoYWluIGFyZSBhbHdheXMgcHJvZHVjZXJzLg==[Qq]

[c]ID I=[Qq]

[f]IE5pY2Ugam9iOiB0aGUgb3JnYW5pc21zIHNob3duIGF0IOKAnDLigLMgYXJlIGVhdGluZyB0aGUgcHJvZHVjZXJzLCB3aGljaCBtYWtlcyB0aGVtIHByaW1hcnkgY29uc3VtZXJz[Qq]

[c]IDM=[Qq]

[f]IE5vLiBUaGUgb3JnYW5pc21zIHNob3duIGF0IOKAnDPigLMgYXJlIHNlY29uZGFyeSBjb25zdW1lcnMsIG9yIGNhcm5pdm9yZXMu[Qq]

[c]IDQ=[Qq]

[f]IE5vLiBUaGUgb3JnYW5pc21zIHNob3duIGF0IOKAnDTigLMgYXJlIHRoaXJkIGxldmVsLCBvciB0ZXJ0aWFyeSBjb25zdW1lcnMu[Qq]

[x]
You can learn more about food chains at sciencemusicvideos.com

[restart]

[/qwiz]

Add “exit text”

You can add text to the “summary report” that appears at the end of a quiz. Enter such text after an [x] shortcode.

Note: for a one-question quiz there is no summary report (and the exit text will not be shown!).  The two-question quiz, above, includes exit text.

Add a “Take the quiz again” button

Add the shortcode [restart] to your exit text.

Assign “topics” to questions – the quiz-taker’s performance will be summarized by topic at the end of the quiz

You can specify a topic for a question by adding to the [q] shortcode:

[q topic=”Food chains”]

The double-quote marks are required.

A question may have more than one topic assigned to it.  Separate the topics with a semicolon:

[q topic=”Food chains; Producers”]

The two-question sample quiz above includes a topic for each question.

Change the alignment and style of the quiz box – size, borders, background, font, etc.

You can change the horizontal alignment of a quiz on your page.  By default, quizzes are left-aligned with other text.  You can specify center alignment or right alignment by adding the “align” attribute to the [qwiz] shortcode.  For example:

[qwiz align=”center”]

You can change the style of the quiz by adding a “style attribute” to the [qwiz] shortcode.

[qwiz style=”width: 400px; min-height: 0px; border: 4px solid green;”]


The style settings use the standard web syntax (called “CSS,” for Cascading Style Sheets).  Here the style for the quiz box has been set so that the overall width is 400 pixels (compared to the default 500 pixels), there is no minimum height (compared to the default 300 pixels), and the border is 4 pixels wide, colored green (compared to the default 2 pixels wide, colored black).

To make the header consistent with the border, the “Text” mode of the WordPress editor can be used to change the format of the header paragraph.  A style attribute for the text background color can be added like this:

<p style=”background: green;”><strong>[h] Check your understanding</strong>

Here’s the resulting quiz:

[qwiz style=”width: 400px; min-height: 0px; border: 4px solid green;”]

[h] Check your understanding

[q] Which type of cells have a nucleus?

[c]IFByb2thcnlvdGUgwqAg[Qq][c]IEV1a2FyeW 90ZcKgwqAg[Qq][c]IEJvdGjCoMKgIA==[Qq][c]IE5laXRoZXI=

Cg==[Qq]

[f]IE5vLiBPbmx5IEV1a2FyeW90ZSBjZWxscyBoYXZlIGEgbnVjbGV1cy4=[Qq]

[f]IENvcnJlY3Qh[Qq]

[f]IE5vLiBPbmx5IEV1a2FyeW90ZSBjZWxscyBoYXZlIGEgbnVjbGV1cy4=[Qq]

[f]IE5vLiBFdWthcnlvdGUgY2VsbHMgaGF2ZSBhIG51Y2xldXMu[Qq]

[/qwiz]

“Show the answer” pop-up – a “no-question quiz”

You can make a simple “answer pop-up” by creating a quiz with only one question, which has only one choice.  In this case, the text you enter with the [c] shortcode will become the text of a button, rather than a “radio selection”.  (It doesn’t matter if you enter it as the correct choice – [c*] – or not – [c]).  You enter the “pop-up” answer with the [f] (feedback) shortcode.  Here’s an example:

[qwiz style = “min-height:0px;”]

[q] Sodium (Na) has 11 protons, 11 neutrons, and 11 electrons. Using the Octet rule that we’ve previously learned, try to draw its structure. Then see if you got it right.

[c] Show the answer

[f] 18_sodium-11p1

[/qwiz]

 

Note that we’ve changed the “style” of the qwiz, allowing it to be less than the usual minimum height (which is 300 pixels).  Here is the resulting “pop-up”:

[qwiz style = “min-height:0px;”]

[q] Sodium (Na) has 11 protons, 11 neutrons, and 11 electrons. Using the Octet rule that we’ve previously learned, try to draw its structure. Then see if you got it right.

[c]IFNob3cgdGhlIGFuc3dlcg==[Qq]

[f]IA==[Qq]

[/qwiz]

Randomize the order of the questions

You can specify that the order of the questions will be different each time the page with that quiz is loaded (or when the browser window is refreshed) by adding the random=”true” attribute to the [qwiz] shortcode:

[qwiz random=”true”]

Add “comment text” that users will not see

Comments that you add to a quiz — text that you can see when you edit your page or post but that does not show when users take the quiz — can be helpful in organizing your work.  You can, for example, include notes, number your questions, or even temporarily exclude certain questions from the quiz.

Comments can be included in a quiz with a shortcode consisting of square brackets and one or more exclamation points; for example: [!] comment text [/!] or [!!!!] comment text [/!!!].  Both an opening shortcode and a closing shortcode (with the forward slash) are required for each comment.  Note: comments cannot be nested.

An alternative method to place comments in your quiz is to use the HTML codes for comments: <!-- begins a comment, and --> ends a comment.  In the WordPress editor, however, this can only be done in Text mode. Further, these HTML comments are only visible when you use Text mode.

48 thoughts on “Quiz shortcodes

  1. Vincent De Boever

    Hi Dan,

    Can I add emojis in a question?
    I edited a quiz with a shortcode, but adding an emoji resulted in a chinese character.
    Thanks

    Reply

    1. Dan Kirshner Post author

      I was able to add an emoji on Windows (windows + . brings up an emoji pop-up), and it displayed properly after updating the page — in both the WordPress classic editor and Block editor. Are you using a Mac?

      Reply

  2. William Nguyen

    HI, I tried to use your quiz, but I see there is an incompatiability with the native mejs audio-player. It interfers with the CSS of the mejs classes, preventing me from controlling the widths. For example, the following CSS become ineffective:
    .mejs-controls,
    .mejs-mediaelement,
    .mejs-container {
    width: 30px !important;
    min-width: 51px !important;
    }
    … especially the .mejs-container.
    Do you have any idea if where the incompatiability is? And if there is a way I can neutralize your CSS to leave my CSS un-affected?

    Reply

    1. Dan Kirshner Post author

      Hello William. Sorry for the difficulty. This (in qwizcards.css) may be causing the problem:
      div.wp-audio-shortcode {
      min-width: 350px !important;
      }
      Perhaps you could add div.wp-audio-shortcode to your selector list? I can’t recall why we’re setting that. Let us know if it’s still a problem; maybe we can switch the selector in qwizcards.css to .mejs-container; perhaps that would have less chance of interference.
      Thanks, –Dan

      Reply

      1. William Nguyen

        Thanks for your attention. I edited `div.wp-audio-shortcode { min-width: 350px !important;} ` and that solved my problem, so it was interfering with my mejs-container. However, if you switch the selector in qwizcards.css to .mejs-container, I don’t know what the impact will be.
        I see in your code the ominous note “Set min-width – WordPress 100% won’t work if container is small. ” — but I can confirm that my wordpress site and the quizcard is working fine with div.wp-audio-shortcode { min-width: 50px !important;} set to a smaller minimum.

        Reply

        1. Dan Kirshner Post author

          OK, glad that worked. One thing to note: if you changed the qwizcards.css file, your changes will get clobbered next time the Qwizcards plugin is updated. That’s why I suggested changing your list of selectors (mejs-controls, mejs-medialement…) to include div.wp-audio-shortcode, assuming you’ve got that somewhere else, such as Dashboard > Customize > Additional CSS. Probably just adding your own version of div.wp-audio-shortcode there will work, too. Thanks for the note: I’ll recheck the need for the wp-audio-shortcode min-width specification! –Dan

          Reply

    1. Dan Kirshner

      Hello Farhan: If I understand your question, you would like users to be able to log in to your quizzes or flashcard decks so that the users’ scores can be recorded.

      I see you have set up an administrative account (at https://qwizcards.net/admin/new_account), so that’s good.

      In the WordPress editor, when you edit a page with a quiz or flashcard deck, the “Qwizcards editing menu” should appear. Click the option, “Enable progress recording for quizzes/flashcard decks”. In the new menu click the green “+” to enable progress recording.

      Reply

  3. David

    Hi Dan,
    your plugin has helped me add some great tools to my site. I cannot find the shortcode for “number of questions to show.” I have 50 flashcards but don’t want to overwhelm people. I want a given deck to contain only 10 questions. Then, if they want to take the quiz again, they can see, again, a random selection of 10 of the 50 in the question bank.
    Thank you.

    Reply

    1. Dan Kirshner

      Thanks, David. The closest thing we have to that right now is to set up your quiz as a “dataset” (on a non-public page) and then for the quiz you want to display do [qwiz use_dataset=”my_dataset_name”][/qwiz]. Users will have the option to select how many questions to do. Better yet, set it up for progress recording; if users register, then they can come back later and choose among “show me questions I haven’t done” or “show me questions I got wrong”, and more.

      Your suggestion for a simple “questions to show” option is a good one. Thanks! On the to-do list… –Dan

      Reply

        1. Barb Murphy

          I tried what you said above and it works, but it won’t let me change the number of questions. I have 5 and when I click on the box, it won’t let me change the number and the information (i) will not click. I am on a Mac in case that makes a difference.

          Reply

          1. Dan Kirshner

            OK; hopefully we’re close. It only gives so many options — you’ll get more options if there are more questions to choose from. The “i” doesn’t click, but hover should work.

            Reply

      1. Vincent

        Hello Dan,

        Just to let you know I would also be interested in a “number of questions to show” option, so my big quizzes/cards stacks are not too overwhelming to the kids :D

        Have a nice day!

        Reply

        1. Dan Kirshner Post author

          OK, thanks; sorry, this fell off my to-do list! I’ll try to get to it in the next few days. Update, July 29, 2022. Well, more than a few days (it always is!). Qwizcards version 3.72 includes options for “questions_to_show” and “cards_to_show”. The wizard provides a convenient way to set these.

          Reply

  4. Aaron Glimme

    Hey Dan,
    Not sure if this is the best forum but I’m seeing some weird placement issues on some questions when I use drag the labels. A question in the editing window looks like normal but the boxes in the actual page are not in the same position. I took some screen shots that I can show you and the issue seems to be reproducible, at least I’ve seen it in a couple of different quizzes. Have you ever seen anything like this and if so is there a fix? Currently I’m manually moving the boxes till they come out in the correct space in the actual quiz. Thanks for the great tool.

    Reply

    1. Dan Kirshner

      Not sure what’s going on. Could you send screenshots to support@qwizcards.com? Also, could you copy the editing source — switch to “Text” mode (from default “Visual”) — and send that, too, that would be great. Do you know what theme your version of WordPress is using?

      Thanks, –Dan

      Reply

  5. Aaron Glimme

    Hey Dan, Is there a way to add a free text number matching question? I teach AP Chemistry and free text number matching that had some way to specify a range would be a great addition. Thanks!

    Reply

  6. Mr. W

    Hey. Is there any way to turn off the text at the end of a quiz that says: “Congratulations, you’re done!
    In this four-question quiz, you answered every question correctly on the first try!” I know that I can add custom text after this, but is there any way to replace the congratulations message with something else?

    Reply

  7. Mr. W

    Hi Dan: I’ve found that it’s very easy to adapt the “information only” quiz to make a kind of slideshow of images. But I’d like to turn off the feedback (“Congratulations, You’re Done.”) at the end. Is there any way to do that?

    Reply

    1. Dan Kirshner

      No, not so far, but that’s a good idea! We’ll add that to the next release (should be two or three weeks). We can make it available in a beta version if you want to give that a try. We’ll add an optional attribute to the [qwiz] shortcode, like this: [qwiz summary=”false”]. Update July 2019: a summary=”false” option is available for both quizzes and flashcard decks. See http://dsl.lin.mybluehost.me/qwizcards/reference.

      Reply

  8. Zoe

    Hi again!

    I am trying to include the [restart] code to allow users to take the quiz again but instead, the text is just showing up in my last question

    I have it placed right before [/qwiz]

    Thanks!

    Reply

    1. Zoe

      one more thing – If I make a quiz on ‘Test’ mode, and don’t want questions to be repeated, they are still repeated.

      I’ve included repeat_incorrect=”false” in my code

      Thank you!

      Reply

      1. Dan Kirshner

        Just checked — it seems to be working properly. Did you include it within the the [qwiz] shortcode? Like this: [qwiz repeat_incorrect=”false”]

        If it remains mysterious, could you give me a URL for an example page? Thanks. –Dan

        Reply

    2. Dan Kirshner

      Sorry not to respond sooner (didn’t get notification for some reason). Did you include [x] (exit text) before [restart]?

      Reply

  9. Zoe

    Hi! I am trying to use the quiz with the text entry. I’m able to get the text box to show however no buttons show up to either submit the answer or go to the next questions – and nothing happens when the correct answer is typed in. I have all the external files linked to the page and was able to get the flashcards and multiple choice quiz to work.. Thank you! This is my code –
    [qwiz]

    [q] Fill in the appropriate data type:
    ___ flag = true;

    [textentry]

    [c*] boolean
    [/qwiz]

    Reply

    1. Dan Kirshner

      Here’s what it should look like:

      Then, after typing in the box and selecting from the suggestion list:

      And after clicking “Check answer”:

      Since what you’ve got so far is a one-question quiz, the “Next question” button never appears!

      We’ve seen a few intermittent cases where the correct answer is typed in and NOT selected from the list, and the “Check answer” button did not appear (although even in this case usually it does). We’re looking into it…

      Reply

      1. Zoe

        Hi Dan, Thanks for the reply. The type 3+ letters does not show up and neither does the check answer/hint buttons – am I missing something from my code? Even when I add a second question the next question butter does not appear. This is my code with the second question added and I’ve left the link to the website so you can see what comes up. Thanks for your help!
        [qwiz]

        [q] This is a [textentry]

        [c*] test

        [q] Fill in the appropriate data type:
        ___ flag = true;
        [textentry]  
        [c*] boolean

        [f] Excellent!

        [/qwiz]

        Reply

    1. Dan Kirshner

      We looked into that a bit — Google Sites doesn’t make it easy! Hopefully we’ll try again sometime.

      Reply

    2. Dan Kirshner

      We’ve found that the new Google Sites makes “embedding” easy, and it’s not too difficult with Google Sites Classic.

      We’ve added the capability to create quizzes and flashcard decks on the Qwizcards.com site (http://dsl.lin.mybluehost.me/qwizcards/wizard) and easily show them on your own pages with “embed codes”.

      Go to http://dsl.lin.mybluehost.me/qwizcards/u/mini-dk/octopus to see an example quiz. Click “Embed codes” at the top right of the page to see specific instructions.

      Reply

  10. Michel

    Hi, Thank you for this wonderful tool and for your work. I am a french teacher in South America and my students don’t speak english, how to put the buttons in French?

    Reply

    1. Dan Kirshner

      Thanks. The quick way to change button labels is in Dashboard > Settings > Qwizcards, under the “Customize button labels, etc.” section. Hopefully the instructions are clear!

      If you’re more ambitious (want more of the text in French), then you would look in the Qwizcards plugin languages directory (/wp-content/plugins/qwiz-online-quizzes-and-flashcards/languages) and copy qwiz-en_US.po to qwiz-fr_FR.po (I believe). Then you would fill in the “msgstr” fields with translations of the English “msgid” fields. There is an additional step to process this file (that we can tell you about) if you take this route.

      Reply

  11. Dan

    Outstanding plugin. However is there any way it can be made compatible with Math Latex? (
    For a reference, I use a WordPress plugin that converts text into math symbols with a [latex] [/latex] shortcode

    However it appears that it is disabled when used with this plugin if there is more than one card. (It works for the first card and then not for any remaining cards.

    Thanks in Advance!

    Reply

    1. Dan Kirshner

      Thanks. It ought to work! What’s the plugin? Can you give me a URL using the plugin (not necessarily with Qwizcards)? I assume you’re talking about flashcards. Have you tried it with a quiz?

      Reply

  12. Marie

    This is such a great tool, thank for making this available!

    Is it possible for students to select the answer by hitting a number key, e.g. if there are four answer choices they are labeled 1-2-3-4 and the student just hits the right key instead of clicking with the mouse?

    Thanks!

    Reply

    1. Dan Kirshner

      Thanks! I think “Instant multiple-choice questions” will do what you want. You could do something like this:
      [q] Are membranes are made of (1) phospholipids or (2) amino acids?
      [textentry single_char=”true”]
      [c*] 1
      [f] Yes, membranes are made of phospholipids
      [c] 2
      [f] No, membranes are made of phospholipids

      Reply

      1. Marie

        Great, thanks for the feedback! Another quick question, I’d like to use these for language learning flashcards, is there any way to include an audio clip on each card?
        Thanks!

        Reply

        1. Dan Kirshner

          According to this comment on the Flashcards Quickstart page, yes!

          Sergei
          May 11, 2015 at 10:03 am
          Hi, I tried inserting Compact WP Audio Player shortcode inside question or answer flashcard and it works well!

          Reply

  13. horlar

    Hello, can’t you develop this plugin to have an easy to use interface for people who don’t understand coding? Using the shortcode is a little bit more confusing… Thanks.

    Reply

    1. Dan Kirshner

      That’s certainly a possibility; I just don’t know if it should be a priority. Let’s see if others weigh in. In the meantime, I really hope the examples on the “Quickstart” pages are easy enough to follow and change for your needs.

      Reply

Leave a Reply to Mr. W Cancel reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.