Matching questions...

Re: Matching questions...

by Joseph Rézeau -
Number of replies: 14
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
>Joseph's example misled me into misinterpreting what the = did and I had to redo 42 questions as a result.
Sorry about that. blush

I quite agree that a thorough explanation of the cloze-type question syntax is much needed. But where should it be made available? On this forum? In the online help in a forthcoming version of Moodle?

Here is a brief explanation of the syntax, taking up again the example of US cities. First of all, although the example I gave in my previous message works, the way the answers are arranged makes it all too easy to guess that the first item in each list is always the correct answer. So I've modified it below.

match the following cities with the correct state
San Francisco: {1:MULTICHOICE:=California#OK~Arizona#Wrong}
Tucson: {1:MULTICHOICE:California#Wrong~%100%Arizona#OK}
Los Angeles: {1:MULTICHOICE:=California#OK~Arizona#Wrong}
Phoenix: {1:MULTICHOICE:%0%California#Wrong~=Arizona#OK}

The capital of France is {1:SHORTANSWER:=Paris#Congratulations!~%50%Marseille#No, that is the second largest city in France (after Paris).~.*#Wrong answer. The capital of France is Paris, of course.}

I am not providing an example of the NUMERICAL type, because I have no use for them.
  1. all question items within a cloze-type question are coded inside curled braces { }
  2. the number which appears between the opening brace and the colon {1: is the weighting of that item; if it is set at 1 for all the items, it needs not be specified, so you can have {:
  3. after the colon we have the item type: MULTICHOICE, SHORTANSWER, NUMERICAL
  4. the syntax for MULTICHOICE and SHORTANSWER is the same; the only difference is in the displaying of the item to the student
  5. the order of the various answers is indifferent (except if you want a catch-all for wrong answers, see #12 below)
  6. a correct answer is preceded with the equal sign = or a percentage (usually %100%)
  7. a wrong answer is preceded with nothing or a percentage (usually %0%)
  8. you can allocate some points between 0 and 100 to some answers, if you put the appropriate percentage
  9. all answers except the first one are separated from one another by the tilde ~ sign
  10. answers can be followed by an optional feedback message, preceded with the # sign; if there is no feedback message, the # sign can be present or absent, it does not matter
  11. note that the feedback message is displayed in a small popup window (if and when feedback has been declared accessible to the students in the Quiz settings) upon mouse hovering
  12. in the SHORTANSWER type you may want to put a catch-all (wrong) answer in order to send a "wrong, try again" feedback; you can do this by inserting .* as a wrong answer; this does not work in Moodle 1.5, 1.5.3 and 1.6; it works in version 1.5.2 only; see my post here
  13. unfortunately in MULTICHOICE MODE it is not possible to get the answers to be scrambled
  14. unfortunately in SHORTANSWER mode it is not possible to make the answers case-sensitive (except by using a workaround which I will make explain in a further post in this thread)
Hope that helps,
Joseph
Average of ratings: Useful (5)
In reply to Joseph Rézeau

Re: Matching questions...

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

SHORTANSWER items in a cloze-type question in a quiz. Recipe for making them case-sensitive. You need to have access to the database, as admin.

Example given with mySQL, tables prefixed with mdl_

  1. Go to the mdl_quiz_questions table
  2. Browse to identify your cloze question and make a note of its id number (e.g. 251)
  3. Then go to the mdl_quiz_shortanswer table, browse to the question ID number you just noted (e.g. 251); for question ID 251 you find:
    ID question answers usecase
    20 251 1471,1472,1474 0
  4. Edit this record and replace the 0 value in usecase with 1

et voila!

Example

The capital of France is {1:SHORTANSWER:=Paris#Congratulations!~%50%paris#Sorry, you should write it with a capital letter.~.*#Wrong answer. The capital of France is Paris, of course.}

This will give the student full marks for answering Paris and 50% for answering paris.

Hope that helps,

Joseph

Average of ratings: Useful (2)
In reply to Joseph Rézeau

Re: Matching questions...

by . madea -

Thanks, Joseph!  Most concrete information I've seen on describing the syntax and components of Cloze anywhere!  Goes a long way in understanding how it works!  Thanks again!

(I have to mention that I'm having a problem with item 11 in your list referring to feedback message.  I DO get the feedback message in a small pop-up when I preview the question, BUT it is hidden behind the text of the question!  The pop-up moves with mouse pointer over the answer area but it won't come forward to reveal the message content.  Is that a browser configuration issue, OS issue, anyone know?)

madea
madea@mmsi.com
In reply to Joseph Rézeau

Re: Matching questions...

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

"I quite agree that a thorough explanation of the cloze-type question syntax is much needed. But where should it be made available?"

Joseph, how about contributing your explanation to MoodleDocs? Here... MoodleDocs Cloze. smile

In reply to Joseph Rézeau

Re: Matching questions...

by . madea -

I had no problem importing and trying out the following questions in a sample Quiz (I used the import question option with File Format: Embedded Answers (Cloze) selected:

match the following cities with the correct state
San Francisco: {1:MULTICHOICE:=California#OK~Arizona#Wrong}
Tucson: {1:MULTICHOICE:=Arizona#OK~California#Wrong}
Los Angeles: {1:MULTICHOICE:=California#OK~Arizona#Wrong}
Phoenix: {1:MULTICHOICE:=Arizona#OK~California#Wrong}

Match the following components to the embedded- or central-side
adp: {2:MULTICHOICE:=embedded-side#Exactly!~central-side#Sorry...}
dbmsd: {2:MULTICHOICE:=central-side#Exactly!~embedded-side#Sorry...}
OMSbridge: {2:MULTICHOICE:=central-side#Exactly!~embedded-side#Sorry...}
disp: {2:MULTICHOICE:=embedded-side#Exactly!~central-side#Sorry...}
SonicMQ: {2:MULTICHOICE:=central-side#Exactly!~embedded-side#Sorry...}

However, when I try to import the following, I receive errors:

Match the definition with the name:
Can be acquired at will and represent certain physical data: {:MULTICHOICE:=parameters#Exactly! This is correct!~events#Sorry...  This is not correct.~data abstracts#Sorry... This is not correct.}
Are not acquired at will, but are received from the device as certain conditions occur.{:MULTICHOICE:~parameters#Sorry...  This is not correct=events#Exactly! This is correct!.~data abstracts#Sorry... This is not correct.}

Match each example with its data type:
high oil pressure alarm: {:MULTICHOICE:~parameter#Sorry...  This is not correct.=event#Exactly! This is correct!~data principle#Sorry... This is not correct.}
battery voltage: {:MULTICHOICE:=parameter#Exactly! This is correct!~event#Sorry...  This is not correct.~data principle#Sorry... This is not correct.}
engine speed: {:MULTICHOICE:=parameter#Exactly! This is correct!~event#Sorry...  This is not correct.~data principle#Sorry... This is not correct.}
oil pressure: {:MULTICHOICE:=parameter#Exactly! This is correct!~event#Sorry...  This is not correct.~data principle#Sorry... This is not correct.}
engine overspeed alarm: {:MULTICHOICE:~parameter#Sorry...  This is not correct.=event#Exactly! This is correct!~data principle#Sorry... This is not correct.}

For each of these, when I use the import question option / File Format: Embedded Answers (Cloze), , I receive an error when I import (see attachment).

If I click no, everything "seems" normal, however when I try to preview the question, I get an error that states: Error!! Missing Question Options.

Can anyone determine what I am doing wrong with the syntax of the questions?

According to Jospeh Rezeau's post, these two examples above seem to comply with all the steps he outlined, particularly items 1, 2, 3, 5, 6, 7, 9, and 10:
  1. all question items within a cloze-type question are coded inside curled braces { }
  2. the number which appears between the opening brace and the colon {1: is the weighting of that item; if it is set at 1 for all the items, it needs not be specified, so you can have {:
  3. after the colon we have the item type: MULTICHOICE, SHORTANSWER, NUMERICAL
  4. the syntax for MULTICHOICE and SHORTANSWER is the same; the only difference is in the displaying of the item to the student
  5. the order of the various answers is indifferent (except if you want a catch-all for wrong answers, see #12 below)
  6. a correct answer is preceded with the equal sign = or a percentage (usually %100%)
  7. a wrong answer is preceded with nothing or a percentage (usually %0%)
  8. you can allocate some points between 0 and 100 to some answers, if you put the appropriate percentage
  9. all answers except the first one are separated from one another by the tilde ~ sign
  10. answers can be followed by an optional feedback message, preceded with the # sign; if there is no feedback message, the # sign can be present or absent, it does not matter
Thanks for any imput you can send my way...

madea
madea@mmsi.com







Attachment ClozeError.jpg
In reply to . madea

Re: Matching questions...

by Daniel Mikšík -
Picture of Core developers Picture of Translators
Sorry if this has been already answered... I've just come across this thread when searching for help on cloze. ;)
I think some of the posted questions do not comply with the rule no. 9: all answers except the first one are separated from one another by the tilde ~ sign.
Therefore, I think (not tested it myself), your problem could be solved by removing the red tildes, and adding the blue tildes in the questions below.
Dan

------------------
Match the definition with the name:
Are not acquired at will, but are received from the device as certain conditions occur.{:MULTICHOICE:~parameters#Sorry... This is not correct~=events#Exactly! This is correct!.~data abstracts#Sorry... This is not correct.}

Match each example with its data type:
high oil pressure alarm: {:MULTICHOICE:~parameter#Sorry... This is not correct.~=event#Exactly! This is correct!~data principle#Sorry... This is not correct.}
engine overspeed alarm: {:MULTICHOICE:~parameter#Sorry... This is not correct.~=event#Exactly! This is correct!~data principle#Sorry... This is not correct.}
------------------
In reply to Daniel Mikšík

Re: Matching questions...

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Daniel,
All answers must be separated from one another by the ~ sign (tilde). However, for the very first answer, the tilde sign is optional.
So both of these will work:
high oil pressure alarm: {:MULTICHOICE:parameter#Sorry... This is not correct.~=event#Exactly! This is correct!~data principle#Sorry... This is not correct.}
high oil pressure alarm: {:MULTICHOICE:~parameter#Sorry... This is not correct.~=event#Exactly! This is correct!~data principle#Sorry... This is not correct.}
Joseph
PS Why not test coding before posting?
In reply to Joseph Rézeau

Re: Matching questions...

by Daniel Mikšík -
Picture of Core developers Picture of Translators
Hi Joseph,
thank you for the explication on the opening tilde.
I have seen the error message posted by madea before, so I was sure about the omission of tilde within the answers. As for the opening tilde, there I relied on the documentation. ;)
Dan
In reply to Daniel Mikšík

Re: Matching questions...

by Nathan Hammond -
I got this same error message.

I believe this error message is because we are trying to import more than one Embedded Answer at once.

Is this limitation on somebody's fix-it list for a future upgrade?

Nathan
In reply to . madea

SHORTANSWER

by Joel Brondos -
Is it possible to have move than one accepted response to a SHORTANSWER cloze question? I've tried "%100%bippie~%100%bippi" but that doesn't seem to do the trick.
In reply to Joel Brondos

Re: SHORTANSWER

by Joachim Schäfer -
Capital-Letters

Hi there, {1:SHORTANSWER:=Das#gut!~%50%das} doesn't really work. When checking the answer (sorry in German) is

{1:SHORTANSWER:=Das#gut!~%50%das}
Bewertung
1
das
Bewertung
0.5
However, when getting the pupil's result, the system says "partly true", but gives 1 point für "das".
Moreover, now I have the possibility to see the questions and answers in detail. There it is written: Capital / Small letters not activated.
I think that this is the reason, why a wrong answer gets 1 instead of 0.5 point.
Is there any help available?
Regards
Joachim
In reply to Joachim Schäfer

Re: SHORTANSWER

by Hira Thapa -

As shown in the screenshot below, students can easily guess the correct option in the blank spaces without understanding the meaning because of the number of the characters that goes in the blanks. For example, for longer words, the blank space given is longer and for shorter words the space shorter. I guess there must be a proper way to set up for this cloze type of quizzes but I have no idea how to do it. Any idea, please?


Attachment embedded (cloze).png
In reply to Joel Brondos

Re: SHORTANSWER

by Alan Kmiecik -

Joel, did you ever get a answer on how to do multiple, 100% correct short answers?