Note: You are currently viewing documentation for Moodle 3.0. Up-to-date documentation for the latest stable version of Moodle may be available here: Numerical question type.

Numerical question type: Difference between revisions

From MoodleDocs
(content moved from Question types)
(content moved from Numerical, needs tidying up please)
Line 16: Line 16:
#Type the equation or numerical question for your students to solve. Moodle has a various text filters that allow you to type an equation and have it properly typeset when displayed. The Algebra filter is very good for writing common matematical expressions in a simple way. More complicated expressions may be written using the [[TeX filter]]. [[Filters (administrator)]] contains information for administrators on how to enable these filters.
#Type the equation or numerical question for your students to solve. Moodle has a various text filters that allow you to type an equation and have it properly typeset when displayed. The Algebra filter is very good for writing common matematical expressions in a simple way. More complicated expressions may be written using the [[TeX filter]]. [[Filters (administrator)]] contains information for administrators on how to enable these filters.
#Select an image to display if you want to add a picture to the question.
#Select an image to display if you want to add a picture to the question.
#Enter the correct answer. 23.4 23,4 and 2.34E+1 would all work. (Prior to Moodle 1.7, you can only add one correct answer in the user interface. If you import the question with a GIFT format file you can specifiy multiple answer(intervals) with accompanying feedback and point-percentage. This is done similar to the CLOZE [[Numerical]] format. There is no units support in the Cloze type.) It is possible, though not simple, to get support for  several answer intervals '''and''' unit support if you create the question in the numerical interface and export it in Moodle XML format. Than you can duplicate the <answer> segment and put in another answer interval and the feedback and grading factor you want for that interval. Than import it again. You will not be able to edit the question in the normal numerical interface though.
#Enter the correct answer. 23.4 23,4 and 2.34E+1 would all work. (Prior to Moodle 1.7, you can only add one correct answer in the user interface. If you import the question with a GIFT format file you can specifiy multiple answer(intervals) with accompanying feedback and point-percentage. This is done in a similar way to the CLOZE Numerical format. There is no units support in the Cloze type.) It is possible, though not simple, to get support for  several answer intervals '''and''' unit support if you create the question in the numerical interface and export it in Moodle XML format. Than you can duplicate the <answer> segment and put in another answer interval and the feedback and grading factor you want for that interval. Than import it again. You will not be able to edit the question in the normal numerical interface though.
#Enter the accepted error, the range above or below the correct answer. For example, if the correct answer is 5, but you will accept 4 or 6 as answers, your accepted error is 1.
#Enter the accepted error, the range above or below the correct answer. For example, if the correct answer is 5, but you will accept 4 or 6 as answers, your accepted error is 1.
#Enter feedback for the question. It is possible to use all kinds of HTML formating for the feedback but it must be written by hand. Unfortunately (in 1.5.3 anyhow) it is right justified and has no identifying formatting.  
#Enter feedback for the question. It is possible to use all kinds of HTML formating for the feedback but it must be written by hand. Unfortunately (in 1.5.3 anyhow) it is right justified and has no identifying formatting.  
Line 22: Line 22:
#Moodle 1.7 only: If you want some feedback shown to wrong answers, type a feedback comment with a blank answer.
#Moodle 1.7 only: If you want some feedback shown to wrong answers, type a feedback comment with a blank answer.
#Click Save Changes to add the question to the category
#Click Save Changes to add the question to the category
==Numerical CLOZE questions==
From the student perspective, a numerical CLOZE question looks just like a short-answer [[Embedded Answers (Cloze) question type|Cloze]] question. (CLOZE can also be called ''embedded'' or ''fill in the blanks''.)
The difference is that numerical answers are allowed to have an accepted error. This allows a continuous range of answers to be set. You can also express your answer in some different numerical formats.  23.4 23,4 (some countries use , as a decimal separator) and 2.34E+1 (meaning 2.34*10^1) would be interpretted as the same.
More examples:
  0.5 accepts .5 0.5 ,5 0,5 0.500 5e-1 5E-1 but not 1/2 50%
  50% accepts 50% 50.0% 5E1% 50/100 even 50/1000 50 but not 500/1000 0.5
  1/2 accepts 1/2 1/3 1twenty but not 2/4 0.5 0,5 3/6 50% ½
  ½ accepts ½
  HALF doesn't even accept HALF (maybe 0?)
If you want to accept several variants you can have them in the same {} but be careful!
The writing of a NUMERICAL CLOZE question is about the same as the other CLOZE questions and they can be mixed in the same question.
You write your question/incomplete text and where the student is to enter the numerical answer you write (Preferably in the source code mode, the RTF editor can insert linebreaks that make the question not function. So the linebreak is for readability in the example box below. A problem with these questions is the readability of the code! ):
{2:NUMERICAL:=23.8:0.1#Feedback for correct answer 23.8
~%50%23.8:2#Feedback for ½credit near correct answer}.
In this example
* 2: is the question point weight which would say that this question has twice the weight in the final point(s) for this question as other partial answers with weight 1 (or no declared weight you can start {: for weight 1) in the same question.
* NUMERICAL: says what kind of question it is. It must be in CAPS.
* =23.8:0.1 = or %100% means correct if the answer is 23.8 with an accepted error of 0.1, then any number between 23.7 and 23.9 will be accepted as correct. (In the GIFT numerical question one can express an interval like this 13..15 or 14:1 but in CLOZE only 14:1 works.)
* #Feedback for correct answer 23.8 is preceded by #
* ~%50%23.8:2  ~ is the separator for answer alternatives  %50% means this answer would get 50% of the score that the more precise answer had gotten. Because the tolerans here is 2, 21.8 to 25.8 would get this point and feedback
The feedback (which is seen as OverLib popup windows when the user hovers over the answer space) is formatable with HTML tags. For example if you want an exponent, surround it with superscript tags: &lt;sup&gt; &lt;/sup&gt;. You can even include pictures in the feedback popup but you must clean out all " and save while still in code mode (not RTF). This works in feedback popup:
#See this picture:&lt;br&gt;&lt;img src=Something.gif />}
but not
#See this picture:&lt;br&gt;&lt;img src="Something.gif" />}
(ALGEBRA and TEX filters don't work in the feedback popups, but they can be very useful in the question writing for math/science expressions).
If you want to give feedback for any answer that didn't fit the intervals you already have specified feedback for, add some BIG general intervals, like for positive answers (if they aren't bigger than 20000 you could add:
~%0%10000.0001:10000#Feedback for unspecified not_right answers}
This would give feedback for anything from 0.0001 to 20000.0001 (that hadn't already gotten feedback). I didn't want to include 0 since that special case as well as negative ought to have specific reactions.
~%0%0#Hey! It can't be zero
~%0%-10000.0001:10000#We just want the size here,
    so a negative value is not what we want}
Numerical questions can also have case-insensitive non-numerical answers. This is useful whenever the answer for a numerical question is something like +inf, -inf, (N/A, NaN etc though I don't know when that would be useful)


[[Category:Teacher]]
[[Category:Teacher]]
[[Category:Question]]
[[Category:Question]]
[[Category:Quiz]]
[[Category:Quiz]]

Revision as of 07:52, 12 September 2006



From the student perspective, a numerical question looks just like a short-answer question. The difference is that numerical answers are allowed to have an accepted error. This allows a continuous range of answers to be set.

For example, if the answer is 30 with an accepted error of 5, then any number between 25 and 35 will be accepted as correct.

Numerical questions can also have case-insensitive non-numerical answers. This is useful whenever the answer for a numerical question is something like N/A, +inf, -inf, NaN etc.

Template:Moodle 1.7In Moodle 1.7 text answers are no longer allowed - this is what short answer is for.

What is new in 1.7 is that you can have different answers with different levels of accuracy. That lets you as questions like: "What is a root of x^2 - 3x + 2?" or awards different levels of credit depending on how accurate the student was.

Question set-up

  1. Give the question a descriptive name (This is only seen in the question list that you see as a teacher when you are putting together a quiz)
  2. Type the equation or numerical question for your students to solve. Moodle has a various text filters that allow you to type an equation and have it properly typeset when displayed. The Algebra filter is very good for writing common matematical expressions in a simple way. More complicated expressions may be written using the TeX filter. Filters (administrator) contains information for administrators on how to enable these filters.
  3. Select an image to display if you want to add a picture to the question.
  4. Enter the correct answer. 23.4 23,4 and 2.34E+1 would all work. (Prior to Moodle 1.7, you can only add one correct answer in the user interface. If you import the question with a GIFT format file you can specifiy multiple answer(intervals) with accompanying feedback and point-percentage. This is done in a similar way to the CLOZE Numerical format. There is no units support in the Cloze type.) It is possible, though not simple, to get support for several answer intervals and unit support if you create the question in the numerical interface and export it in Moodle XML format. Than you can duplicate the <answer> segment and put in another answer interval and the feedback and grading factor you want for that interval. Than import it again. You will not be able to edit the question in the normal numerical interface though.
  5. Enter the accepted error, the range above or below the correct answer. For example, if the correct answer is 5, but you will accept 4 or 6 as answers, your accepted error is 1.
  6. Enter feedback for the question. It is possible to use all kinds of HTML formating for the feedback but it must be written by hand. Unfortunately (in 1.5.3 anyhow) it is right justified and has no identifying formatting.
  7. Units can be specified and work to a degree. Unfortunately if the student answers with the right number but no unit he can get full points. And if he thinks of another unit and has the right number and no unit, he gets no differentiated feedback, just wrong. You must also give the conversion factor . So if your main answer was 5500 with unit W and you wanted to allow the unit kW you would have to specify the factor 0.001. If you wanted to allow Watt you would use the factor 1.
  8. Moodle 1.7 only: If you want some feedback shown to wrong answers, type a feedback comment with a blank answer.
  9. Click Save Changes to add the question to the category

Numerical CLOZE questions

From the student perspective, a numerical CLOZE question looks just like a short-answer Cloze question. (CLOZE can also be called embedded or fill in the blanks.)

The difference is that numerical answers are allowed to have an accepted error. This allows a continuous range of answers to be set. You can also express your answer in some different numerical formats. 23.4 23,4 (some countries use , as a decimal separator) and 2.34E+1 (meaning 2.34*10^1) would be interpretted as the same.

More examples:
 0.5 accepts .5 0.5 ,5 0,5 0.500 5e-1 5E-1 but not 1/2 50% 
 50% accepts 50% 50.0% 5E1% 50/100 even 50/1000 50 but not 500/1000 0.5
 1/2 accepts 1/2 1/3 1twenty but not 2/4 0.5 0,5 3/6 50% ½
 ½ accepts ½
 HALF doesn't even accept HALF (maybe 0?)
If you want to accept several variants you can have them in the same {} but be careful!

The writing of a NUMERICAL CLOZE question is about the same as the other CLOZE questions and they can be mixed in the same question.

You write your question/incomplete text and where the student is to enter the numerical answer you write (Preferably in the source code mode, the RTF editor can insert linebreaks that make the question not function. So the linebreak is for readability in the example box below. A problem with these questions is the readability of the code! ):

{2:NUMERICAL:=23.8:0.1#Feedback for correct answer 23.8
~%50%23.8:2#Feedback for ½credit near correct answer}. 

In this example

  • 2: is the question point weight which would say that this question has twice the weight in the final point(s) for this question as other partial answers with weight 1 (or no declared weight you can start {: for weight 1) in the same question.
  • NUMERICAL: says what kind of question it is. It must be in CAPS.
  • =23.8:0.1 = or %100% means correct if the answer is 23.8 with an accepted error of 0.1, then any number between 23.7 and 23.9 will be accepted as correct. (In the GIFT numerical question one can express an interval like this 13..15 or 14:1 but in CLOZE only 14:1 works.)
  • #Feedback for correct answer 23.8 is preceded by #
  • ~%50%23.8:2 ~ is the separator for answer alternatives %50% means this answer would get 50% of the score that the more precise answer had gotten. Because the tolerans here is 2, 21.8 to 25.8 would get this point and feedback

The feedback (which is seen as OverLib popup windows when the user hovers over the answer space) is formatable with HTML tags. For example if you want an exponent, surround it with superscript tags: <sup> </sup>. You can even include pictures in the feedback popup but you must clean out all " and save while still in code mode (not RTF). This works in feedback popup:

#See this picture:<br><img src=Something.gif />}

but not

#See this picture:<br><img src="Something.gif" />}

(ALGEBRA and TEX filters don't work in the feedback popups, but they can be very useful in the question writing for math/science expressions).

If you want to give feedback for any answer that didn't fit the intervals you already have specified feedback for, add some BIG general intervals, like for positive answers (if they aren't bigger than 20000 you could add:

~%0%10000.0001:10000#Feedback for unspecified not_right answers}

This would give feedback for anything from 0.0001 to 20000.0001 (that hadn't already gotten feedback). I didn't want to include 0 since that special case as well as negative ought to have specific reactions.

~%0%0#Hey! It can't be zero
~%0%-10000.0001:10000#We just want the size here,
   so a negative value is not what we want}

Numerical questions can also have case-insensitive non-numerical answers. This is useful whenever the answer for a numerical question is something like +inf, -inf, (N/A, NaN etc though I don't know when that would be useful)