Quiz

Mathematical questions

 
Picture of Richard Griffin
Mathematical questions
 
Hello,
I would like to import or create questions that have mathematical expressions (exponential, fractal, etc.) within the answer choices. Apparently there is no formatting for the answer choices or the ability to use choices like 24 or ½ or am I missing something? TIA
 
Average of ratings: -
Picture of colin melville
Re: Mathematical questions
 

You may wish to look at the optional 3rd party AiM module or WebWork module. These allow fairly complex displays I think using TeX.

Colin

 
Average of ratings: -
C. Berisso (April 2007)
Re: Mathematical questions
 

Hello Richard,

Do you mean something like this?


 
Average of ratings: -
C. Berisso (April 2007)
Re: Mathematical questions
 

For what I know there is no "easy" way in Moodle. It would be great if some of the experts could add at least an option to import an image in the answers. So far what I have been doing is creating images with the math expressions, saving them in a folder among the Moodle files, and then typing the HTML image tag with the appropriate location within moodle where the image is found. For example:

<img src="http://www.myschool.edu/moodle/file.php/2/quiz01/eq_47a816.gif">

As you see it is a lot of work and in Math, Physics or Chem questions this could be very time consuming. It would be extremely helpful if a php writer could include a feature that allows at least to browse and insert an image in the multiple choice answer box (which right now only accepts text). Any generous volunteer?

 
Average of ratings: -
Me
Re: Mathematical questions
 
If the administrator enables the Algebra and TeX filters (which are included in the basic Moodle package) on the Moodle site you can "easily" make complicated math expressions with e.g.@@@(x-1)/(x^2-1)@@@ which gives @@(x-1)/(x^2-1)@@. (TeX has a more complicated syntax but can do about anything!)

That works even in questions.

½ should be able to be used directly

For superscripts one can use HTML tags like:
x<sup>2</sup> makes a x2
index (subscript):
x<sub>2</sub> makes a x2
 
Average of ratings: -
Picture of Richard Griffin
Re: Mathematical questions
 
Okay, I am the site administrator. I do not remeber any settings for Algebra and TEX filters. Where would I check to see if they are enabled or how would I go about enabling them?
 
Average of ratings: -
Me
Re: Mathematical questions
 
I'm using 1.6

Go in
Adminstration > Filters
and choose:
Algebra Notation
TeX Notation

The heaven and hell of Moodle is that there are so many choices! The first time you come in as administrator it is quite overwhelming, but just accepting the defaults works for the most part. (But algebra isn't default chosen)
 
Average of ratings: -
Picture of Bill Click
Re: Mathematical questions
 
There are still those of us who have never gotten Algrabic filter to work properly.  It has to be a problem on our setup/server.  Whenever I attempt to use the @@ (algrebra) coding the computer seems to go to gaga-land.  Just sits there doing nothing.  I can use the $$ (Tex), but it seems that there are things that I can not figure out how to do in Tex whereas in Algebra it is rather straight-forward.  Need to resolve the server issue.  Is there something about permissions or something else that we need?   We are running 1.5.4.  We won't upgrade while school is going so next summer we will probably upgrade to a stable 1.7.
 
Average of ratings: -
Picture of Richard Griffin
Re: Mathematical questions
 
I appreciate the feedback, it has been very helpful! The filters were off so I enabled them. Do you know where I can find a reference guide that would be useful to help me translate my formulas into the correct syntax for posting? The examples you gave work fine but I need to know where you got the information to convert your examples into the correct mathematical expression.
 
Average of ratings: -
C. Berisso (April 2007)
Re: Mathematical questions
 

Hi Richard,

There are tons of documentation on how to use Algebra syntax scattered in the Moodle Forums. Go for example to:

Moodle>>UsingMoodle>>Forums>> Mathematics Tools>>Documentation of Algebra Syntax

or to:

Moodle>>UsingMoodle>>Forums>> Mathematics Tools>>Examples of algebra syntax

There are also links on the postings to really neat documentation

 
Average of ratings: -
C. Berisso (April 2007)
Re: Mathematical questions
 

Sorry, I forgot to give you also a great link that Jeff Forssell shows in one of his postings and that have served me quite a bit:

http://imp.usd465.com/moodle/mod/glossary/view.php?id=5213&mode=letter&hook=ALL&sortkey=CREATION&sortorder=asc&fullsearch=0&page=-1

Have fun!

 
Average of ratings: -
Ravi Vare
Re: Mathematical questions
 
Average of ratings: -
Pierre Pichet
Re: Inserting images in multichoice type question
Core developersTestersTranslators

Hi Cristina

Although this is not clearly documented, you can put image either in the choice or in the feedback. This give you a question like this one

questtion

a feedback like this

feedback

TO get this you first put your image in your question text question

You put the editor in html mode

editing2

 You copy the text like

<img src="http://132.208.141.198/moodle/file.php/16/SystmesPi/image002a.gif" alt="image002" border="0" />
</p>(  this link was real at the time of writing but...)

 either in the CHOICES or Feedback elements.

So this new question type already exists.

Actually the limit is one HTML editor in a page because of the complexity to put more than one and there seems to be problems when there is more than one HTML editor on a page but this could change with the new 1.8 interface and this could be implemented more completely(using pop-up windows ).

For your maths questions you could use the LateX for the questions and do similarly for the CHOICES also (but I have not tested it for CHOICES).

Pierre

 
Average of ratings: -
Picture of Joseph Rézeau
Re: Inserting images in multichoice type question
Core developersParticularly helpful MoodlersPlugin developersTestersTranslators
Pierre > Actually the limit is one HTML editor in a page because of the complexity to put more than one and there seems to be problems when there is more than one HTML editor on a page

Well, in Lesson edit mode I frequently have as many as 12 HTML editors on the same page, and I have never had any problems. I don't understand why this facility is available to the Lesson module and has never been available to the Quiz module.wide eyes

In fact, in Lesson edit mode only one HTML editor is enabled (Page Contents). If you really need more, you just tick the relevant box(es) and redisplay the page. I think the idea is to prevent problems happening due to too many editors open at the same time (on a slow machine maybe?).

Joseph

 
Average of ratings: -
C. Berisso (April 2007)
Re: Inserting images in multichoice type question
 

Thank you for the detailed answer! I had not thought about inserting images in the feedback for the student; great!

What is not very intuitive for the user is what is the URL for the image (which resides in a Moodle folder) he/she wants to insert in the answers or in the feedback. It took me a while to find what was the actual path to the images I have stored in a Moodle folder. So I was wondering if it could be possible for some of the php experts in this forum to include a tool that allows the instructor to browse inside the Moodle files and select the image with a click, so the appropriate URL is grabbed by Moodle itself, instead of having the user 1) discover what the appropriate URL is and 2) type it without errors! in the text box.

Cristina

 
Average of ratings: -
Pierre Pichet
Re: Inserting images in multichoice type question
Core developersTestersTranslators

Hi Christina

When you insert an image using the html editor and searching an image in your course data, the link will be created correctly and you just have to copy the <img ....> html field.

Note that the link implied the file.php file which redirects to the dataroot.

You have access if you are logged correcly.

Your moodle course data is private.

As for Joseph, the recent decision of Tim was to allow only one HTML in a quizz having Essay question if I remember well.

And we could imagine was will be an editing multichoice question having three HTML editors for each of the 10 choices...

Pierre

 
Average of ratings: -
Pierre Pichet
Re: Inserting images in multichoice type question
Core developersTestersTranslators
Here is an email ,
Hello,
My name is Miguel .... from Portugal.(....personal data) my job right now is to add quizzes, training and other materials.
I read the instructions about how to put an image in Moodle Quizzes (Multiple Choice) you posted in moodle.org (http://moodle.org/mod/forum/discuss.php?d=58615). I tried that technique, copying the HTML image tag and pasting it into the answer textfield, but an error occurred: the answer disappeared; it wasn't processed and I couldn't continue: "This type of question requires at least 2 answers" (I had 4 answers with HTML tags). I copied the tags as:
Answer 1: <img alt="l" src="http://c.........../P01Q05img01.JPG" /><br />
Answer 2: <img alt="l" src="http://................/P01Q05img02.JPG" /><br />
(...)
Am I doing something wrong? Can this be from my Moodle (version 1.8)?

Finally and mostly, I would like to thank you for your help in moodle.org and I will appreciate your reply. : )
The best regards,
Miguel ......

Here is my aswer
So Miguel I think you should use the forum to ask those questions so that it can be usefull to other people.
I try it on Moodle 1.8 STABLE and it works correctly
You can see for yourself at
http://132.208.141.198/moodle_18/question/edit.php?courseid=2
loging as user : moodle pw:moodle

Pierre
 
Average of ratings: -
Picture of Richard Griffin
Re: Mathematical questions
 
Yes! How did you do it?
 
Average of ratings: -
Picture of David Herman
Re: Mathematical questions
 

I had a similar issue with special characters used in programming not displaying properly in answer stems.  I used this simple workaround.  Within the editor window, use the html tools to create your A/B/C/D/etc stems.  Then for your answer choices, refer to the letter in the question window.

Example: 

Which of the following is not a logical condition resulting in a true or false result?

A.  (x == y);
B.  (x = y);
C.  (x >= y && x <= z);

Then your stems can simply be:

1.  A
2.  B
3.  C

That avoids putting special characters in the stem fields.

 
Average of ratings: -
Picture of Richard Griffin
Re: Mathematical questions
 

A hearty THANK YOU to everyone who responded! I now have the resources needed to solve my problem. The Moodle community proved once again that there are a lot of good and sincere folks willing to help! I hope as my knowledge increases I can some day return the favor.

Richard

 
Average of ratings: -