4 min read

As good as the Moodle quiz module is at recognizing the correctness of our students’ answers, we quickly run into problems when we need Moodle to recognize, for example, that 3a+2b is exactly the same as 2b+3a . To accomplish this, we’re going to need a Computer Algebra System (CAS). The Maxima system (more on this later) has been successfully integrated into Moodle, thanks to the work carried out by Chris Sangwin and Alex Billingsley at the University of Birmingham in the UK. In this article, we will also learn how to perform these tasks:

  • Install and integrate STACK into Moodle
  • Create questions that can be automatically marked using STACK

Let’s start by adding numeric questions into the course question bank.

Creating quizzes

Creating a quiz in Moodle is a two-stage process. First, we add our questions to the question bank (each course has its own question bank). Once we’ve added questions to the question bank, we can add a quiz activity to the course and then choose questions to add to it from the question bank. What are the advantages of having a two-stage process? I worked in much the same way creating quizzes before I started with Moodle. My bookshelf of math books was my question bank, and I would take questions from there to add into my quizzes. Here are just a few of the advantages:

  • If there is a particular point you want to reinforce, then it’s easy to include the same question in different quizzes throughout your course.
  • It’s easy to share your questions with other Moodle courses. For example, questions on the Pythagorean Theorem are relevant to pure math, mechanics, engineering, and physics.
  • Questions can be exported from and imported into the question bank. This means converting questions over to Moodle is a job that can be shared between colleagues.

Here’s a basic Pythagorean Theorem question I converted over to Moodle:

Moodle 1.9 Math

Question types

However, I don’t want to convert just this single question over to Moodle; I also want to have questions similar to this one but with different numbers. I want those numbers chosen randomly by Moodle, so I don’t have to keep thinking up different numbers each time I set the quiz.

The question type I need is Calculated, which we’ll learn about in the next section.

Calculated question type

Let’s learn how to add a calculated question to the course question bank now:

  1. Return to your course’s front page, and click on Questions in the course Administration block:

    Moodle 1.9 Math

  2. The course Question bank is displayed. From the Create new question drop-down menu, choose Calculated:

    Moodle 1.9 Math

  3. Give the question a name. Make sure it’s a name that you (and, potentially, your colleagues) can recognize when it’s in the question bank. Don’t call it ‘1’, ‘i’, or ‘a)’ because you don’t know where it will appear in the quiz. Now, supply the question text:

    Moodle 1.9 Math

  4. Notice that I have used placeholders in the text, {a} and {b}. We will be configuring Moodle to replace those with numbers shortly.
  5. Scroll down to the Answer box. We need to enter the correct calculation into the Correct Answer Formula edit box (don’t include a ‘=’ in your answer):

    Moodle 1.9 Math

  6. The students need to give the correct answer (exactly), but don’t worry about the Tolerance setting: leave it set to 0.01. Set the Grade to 100%.
  7. I want the students to give their answers to three significant figures, and to that end I needed to click on the Correct answer shows drop-down menu, set that to 3, and change the Format to significant figures:

    Moodle 1.9 Math

  8. Scroll down to the bottom of the page, and click on the Next Page button. You are now taken to the Choose dataset properties page.
  9. The numbers for the variables {a} and {b} will be chosen from a dataset. I want to use my own datasets for each variable. Select will use a new shared dataset for both drop-downs:

    Moodle 1.9 Math

  10. Click on the Next Page button. You are taken to the Edit the datasets page. Now, we can specify the range of values for {a} and {b}:

    Moodle 1.9 Math

  11. We need to add numbers to this dataset. I want to add 20 possible pairs of numbers for {a} and {b}. Scroll down to the Add box, select 20 items from the item(s) drop-down menu and click on the Add button:

    Moodle 1.9 Math

  12. Twenty pairs of numbers are now added to the dataset. Moodle will choose pairs of numbers in this dataset when the student is presented with the question. If you want to alter any of the numbers Moodle has automatically generated for us, you can do so in the second-half of the page. Scroll down to the very bottom of the page, and click on the Save changes button.
  13. Our new calculated question is now added to the question bank:

    Moodle 1.9 Math

To recap, we have seen that creating a calculated question is a two-step process. First, we need to specify the question text. The question text contains variables that Moodle will then replace with random values when the quiz is taken. Then, we need to specify datasets for each of the variables, from which Moodle will choose the values when the quiz is taken. We can have Moodle choose the numbers for us, or we can select our own.

LEAVE A REPLY

Please enter your comment!
Please enter your name here