You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This refers to Moodle 3.8 from September 2020 onward


NOTE: Knowledge of Maxima CAS is required to create questions.

Overview of STACK

STACK is a powerful question type that is integrated into Moodle quizzes. It uses a specially configured version of Maxima and features of the Maxima Computer Algebra System (CAS) to support the creation of mathematical questions and analyse students’ responses. Essentially it can achieve the following:

  • Allow students to enter algebraic expressions rather than a value 
  • Accept multiple responses based on intermediate steps. Evaluate these responses including latter steps even if initial ones were incorrect.
  • Provide high quality algorithmically determined feedback based on the students' responses.

There are three main parts to creating a STACK question: Constructing the questions, creating the answer validation, and building the Potential response tree. 


Choose the STACK question type


Constructing a question

  • Enter the "Question name". This is a mandatory field and good practice is to make the name unique and meaningful.
  • Enter the "Question variables". These are optional but good practice. Note: A variable name should have at least 2 characters, finish with a semi colon and use a colon rather than the equals sign. e.g. var1: 6; Variables can also be random. e.g. var2: rand (6)


  • Optional: Random group is optional if you want different questions to use the same random seeds.
  • Enter "Question text". Type in the question text that is presented to the students. It accepts input in both standard text and Maxima CAS. To insert variables into the question requires use of {@...@} notation. e.g. What is {@var1@} + {@var2@}? Note: In the question text box, there are variables which are automatically generated. Input refers to the response box and assigns the student input to the variable ans1. This will be used later in the form. The validation variable is a mathematical interpretation of ans1. These should be left as is unless you want to use a different variable than ans1. If you require a question with multiple inputs then additional input and validation variables are needed. 

  • Optional: "Specific feedback". By default it shows the feedback from the response tree. This is a more advanced feature.
  • Enter the "Default mark" for the question. 
  • Optional: Add "General feedback". Depending of quiz settings, this is shown to all students after they have finished. You can put a fully worked out response here.
  • Optional. Add an "ID number". This allows you to assign your own ID system to your questions.
  • Enter "Question note". This is compulsory if you use random variables. It has two arguments: questions = answer and is used for checking versions of random questions. it is recommended you first define your question and answer as variables in the "Question variable" field and then enter the Question note in the form \[ {@questionvariable@} = {@answervariable@}. \]. As long as something is entered the question will work but unless you enter a valid formula you will not be able to check the different variants.



Validating the answer

  • Chose the "Input type". Algebraic input is a good general type and accepts algebraic as well as numeric input. The other Input types are advanced features.
  • Type in your "Model answer". This can be an expression or good practice suggests defining the correct answer as a Question variable and you can enter the Question variable as the model answer.
  • Optional: Chose the settings you require for the answer settings.



    NOTE: Currently the "Check the type of the response" is causing an error if changed to Yes. Leave on No.


Potential response tree

The potential response three is where you build the automated feedback to the students


  • No labels