## Question types: STACK

qtype_stack
Maintained by Christopher Sangwin, Tim Hunt
The STACK question type adds a sophisticated assessment in mathematics and related disciplines, with emphasis on formative assessment underpinned by computer algebra.
852 sites
41 fans
Moodle 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4

The STACK system is a computer aided assessment package for mathematics, which provides a question type for the Moodle quiz. In computer aided assessment (CAA), there are two classes of question types.

• Selected response questions
In these questions, a student makes a selection from, or interacts with, potential answers which the teacher has selected. Examples include multiple choice, multiple response and so on.
In these questions the student's answer contains the content. It is not a selection. Examples of these are numeric questions.

STACK concentrates on student-provided answers which are mathematical expressions. For example, a student might respond to a question with a polynomial or matrix. Essentially STACK asks for mathematical expressions and evaluates these using computer algebra. The prototype test is the following pseudo-code.

if
then
mark = 1,
else
mark = 0.


STACK uses a computer algebra system (CAS) to implement these mathematical functions. A CAS provides a library of functions with which to manipulate students' answers and generate outcomes such as providing feedback. Establishing algebraic equivalence with a correct answer is only one kind of manipulation which is possible.

Using CAS can also help generate random yet structured problems, and corresponding worked solutions.

In STACK a lot of attention has been paid to allowing teachers to author and manage their own questions. The following are the key features.

• Question versions are randomly generated within structured templates.
• There are many different kinds of inputs. These are, for example, where the student enters a mathematical expression, or makes a true/false selection.
• Mathematical properties of students' answers are established using answer tests within the CAS Maxima.
• Feedback is assigned on the basis of these properties using a potential response tree. This feedback includes:
1. Textual comments for the student.
2. A numerical mark.
3. Answer notes from which statistics for the teacher are compiled.

These broadly correspond to formative, summative and evaluative functions of assessment. Which of these outcomes is available to the student, and when, is under the control of the teacher.

• Multi-part mathematical questions are possible: each question may have any number of inputs and any number of potential response trees. There need not be a one-to-one correspondence between these.
• Partial credit is possible when an expression only satisfies some of the required properties.
• Plots can be dynamically generated and included within any part of the question, including feedback in the form of a plot of the student's expression.

### Sets

This plugin is part of set STACK.

### Awards

• Wed, 2 Aug 2017, 4:36 PM
Thanks for the question Phan Chon,
I'm in the process of final testing for STACK 3.6 and STACK 4.0 (both will be released within days of each other. STACK 4.0 is an irreversible upgrade). They will both work with Moodle 3.3.

Chris
• Thu, 14 Sep 2017, 3:09 PM
Hey guys,
If someone else has maxima version 5.38.0 on CentOS 7 installed from the EPEL repo, the STACK optimisation doesn't currently work. Rebuilding 5.38.1 from source, seems to solve the problem.
Cheers, Joël
• Fri, 29 Sep 2017, 1:46 PM
I ma running STACK 4.0 latest on 3.1 and I've been experimenting with trying to get it to recognise boolean algebra questions. It has some quirks which have me stuck currently:
1. Is there a way of using an equation editor, other than dragmath (which seems to be dying because of browser based Java dying) for a student to enter the answers?
2. In the validation panel, when my student types in an answer (long hand), it will convert some operations to the correct symbols, but not others. So if they type in not(A) or not(B) the "not" operators get converted, but not the "or" operator. Is this a bug? any ideas where please?
3.When it comes to checking the correctness of the answer in preview I can only see the correct or incorrect user type message I have to go the status variable further down in the technical small print. This seems to affect all stack questions currently and the show whether correct option seems to have no effect.
4. Which answer test would you recommend?
5. With AlgEquiv and CasEquiv Sometimes the answer gives status:correct, but mostly it gives status:giveup.
• Fri, 29 Sep 2017, 4:01 PM
Stephen,
Why don't you email me (C.J.Sangwin@ed.ac.uk) with a couple of question on paper and we can work together to develop some examplars? I'm keen to get this right, and there are lots of options in the interface.

The short answer to 1 is "not currently". I let Dragmath slide after the Java browser security issues, and a general lack of time. A good Javascript maths editor would be a great project generally.

Chris
• Fri, 6 Oct 2017, 1:16 PM
Hi Chris,
How do I get STACK to allow text entry of a string? We have String, StringSloppy and RegExp tests, but I keep getting unknown function errors because it's trying to interpret the answer as algebra.
• Fri, 6 Oct 2017, 4:13 PM
Stephen,

The fundamental design of STACK is that *every* answer should be a Maxima expression.

The answer tests String, StringSloppy and RegExp are provided so that string matches can be done on the internal Maxima string representation of a mathematical expression. They were not, originally, designed to assess strings as student's answers.

I recently added the "notes" input. This input is not assessed automatically by STACK, and students can use it to record working, or comments for the teacher. It would be possible to add in a "string" input type, which wraps the student's answer in string quotes to create a valid maxima object.

Can I ask why you need to do this? Sometimes, the underlying need can be done with another method.

I'm happy to talk about adding support for strings if there is a genuine need.
Chris

• Fri, 6 Oct 2017, 4:23 PM
Stephen,
Sorry, I forgot to mention that students can type in a Maxima string e.g. "Hello world". They need to use the quotes to make it a Maxima expression. This, of course, is not really a sensible input mechanism!
Chris
• Fri, 6 Oct 2017, 5:59 PM
It so that my student can directly enter base 16 or base 2 without it being incorrectly interpreted. Even for the character entry field, it seems to try and interpret the text as an expression.
• Thu, 9 Nov 2017, 4:29 PM
Some of our lecturers would like to use Stack in their courses. I am not sure whether to put everything on the Moodle server or to set up a separate server for Maxima (with pool). I would like to know how much (additional) load Stack/Maxima create create on a Moodle server. We have a single Moodle server at the moment but are changing to a load-balanced setup in summer 2018.
Wolf
• Thu, 9 Nov 2017, 6:18 PM
It is OK to put evertyhing on the same server. Using a separate pool server gives slighly faster performance, and more security and scalability, but it is another thing to set up.
• Sun, 17 Dec 2017, 7:46 PM
Chris: The link to http://stack.bham.ac.uk is broken (at least today it is). Have Birmingham taken your site down since you left? Should it now be a Newcastle URL?
• Sun, 17 Dec 2017, 8:18 PM
Thanks Stuart, I've updated this to https://stack.maths.ed.ac.uk/demo/
• Sat, 2 Jun 2018, 9:50 AM
This is an incredible plugin for all science courses involving computation and especially for mathematics. A well designed quiz with the STACK question type together with good multi-media course material can do a fantastic job for helping students self-learn. The contributions of the developers of this plugin are great indeed. A great benefit of this STACK question type is exquisite control of the incredibly complex interactive nature of self-learning. I cannot recommend this plugin highly enough to the Math and Science teachers.
I am using it for Moodle 3.5 and barring for some minor errors, still works. I am eagerly awaiting the official version for Moodle 3.5.
• Sat, 3 Nov 2018, 2:56 PM
Hi, I am relatively new in using stack in moodle. In the meantime, I've read a lot about what I found mostly about Google.
Yesterday I read that Geogebra can also be loaded as a plugin in Moodle and then acted with stack. Maxima can accomplish a lot, but especially for graphics you are a bit limited, because the package "draw" is not yet supported. My question is, if you can use Maxima and Geogebra together in Stack with Moodle? that would have to load the administrator, right?
I'm also looking for a way to query students for the domain of a function. Often the answer is "\ mathbb {R} \ backslash \ {x_1, x_2, \ dots \}", but I can not query that because each answer should be a maxima expression. Can anybody help me further?
Regine
• Sat, 3 Nov 2018, 6:08 PM
Regine,
I'm a huge fan of Geogebra and hand used it a lot in my teaching, (and for generating LaTeX output for traditional paper-based handouts). As far as STACK integration is concerned, GeoGebra is not GPL, and has a "non-commercial" licence. It is also difficult to avoid cross-site scripts (I think, but it has been a while since I checked this technical question). STACK has a lot of commercial partners, and users, and for this reason I put my effort into supporting graphics which have an open source codebase. Currently we have the Maxima "plot" commands. We also have JSXGraph support, but really need more examples and better STACK-JSXGraph documentation. I'm very happy to support GeoGebra as it is excellent, and this is in no way a criticism of their work. I'm very happy to include examples etc, and to support users who make use of GeoGebra. I just want to keep the core functionality (and develop new core functionality) which is less restricted.
Chris

Commenting temporarily disabled