## 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.
661 sites
13 fans
Moodle 2.6, 2.7, 2.8, 2.9

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.
• Student-provided answer question
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.

### Contributors

Christopher Sangwin (Lead maintainer)
Please login to view contributors details and/or to contact them

### Awards

• Wed, 25 Mar 2015, 9:52 PM
Hi, i'm getting an error "CAS failed to return any evaluated expressions. Please check your connection with the CAS". Anyone can help with this?
• Wed, 29 Apr 2015, 4:14 AM
Hello Chris and Time!

I just can't wait to get Stack working on my local Moodle install. It looks great!

However, I too am getting a "CAS failed to return any evaluated expressions. Please check your connection with the CAS" error.

Here's the debug information I'm getting...
---------------------------------
Platform: win
Maxima shell command: C:\moodle\server\moodledata/stack/maxima.bat
Maxima initial command: load("C:/moodle/server/moodledata/stack/maximalocal.mac");

Maxima timeout: 15
Maxima command
cab:block([],print("[TimeStamp= [ 0 ], Locals= [ 0=[ error= ["), cte("CASresult",errcatch(diff(x^n,x))), print("1=[ error= ["), cte("CASversion",errcatch(stackmaximaversion)), print("2=[ error= ["), cte("CAStime",errcatch(CAStime:"2015-04-29 03:44:06")), print("] ]"), return(true));
Command line
"C:\moodle\server\moodledata/stack/maxima.bat"
------------------------------
I found the mix of forward and backslashes somewhat odd but maybe your code deals with that later in the process???

I tried to execute C:\moodle\server\moodledata\stack\maxima.bat directly at the command line and I got a popup window saying sbcl.exe had stopped working.

• Wed, 29 Apr 2015, 6:06 PM
Getting maxima.bat working from the command-line first is certainly the right way to start.

Since it is a .bat file, you should be able to open it in a text editor, and see what it is trying to do, find the failing bit, and work backwards from there.
• Thu, 30 Apr 2015, 6:57 AM
Ok. Thanks Tim!
• Thu, 17 Sep 2015, 4:54 PM
I'm trying to build some Stack quizzes for A level students. Is it possible to style a plot with 'traditional' axes? I've tried [box,false] - this gives the two axes, but drawn with dotted lines and no numbers labelled. I tried xtics option but that's not supported. Any advice welcome, thanks.

Stuart
• Fri, 18 Sep 2015, 2:24 AM
Stuart,

There is no good reason for us not to support these options. By default, we switch things off and only allow them once they have been checked. These are new options, which I've added in this commit: https://github.com/maths/moodle-qtype_stack/commit/02b11c198a987a9fcda7968327b17938e7daca51

If you'd like this code you can pull this from master. Otherwise we will tag a new release in due course.

Chris
• Fri, 18 Sep 2015, 6:42 PM
Thanks for that response, Chris - it will be really useful. Our Moodle is hosted so we will have to wait for the official release, but it's good to know they're coming.

Stuart
• Mon, 7 Dec 2015, 5:16 PM
Hi all, thanks for a great plugin. Do you know if STACK is compatible with moodle 3.0?

Thanks. Andrew
• Mon, 7 Dec 2015, 6:09 PM
It almost certiainly runs fine. However, I have not found time to formally test it and update the compatibility information here.
• Fri, 12 Feb 2016, 11:07 PM
Any chance of having support for Moodle 3.0?
• Fri, 12 Feb 2016, 11:22 PM
Kevin,
I've been testing this myself and I can't find any serious problems yet. Is this a blocker for you, i.e. do you need us to officially tag support for Moodle 3.0? We are going to support this for Moodle 3.0!
• Fri, 12 Feb 2016, 11:41 PM
Hi Cristopher!
As it wasn't tagged for Moodle 3.0, I assumed that there was some incompatibility with it. But after reading your comment, I've dared to install it again anyway, and as you say, all seems to be going well so far.
Thanks!
• Sat, 13 Feb 2016, 12:04 AM
Ok Kevin,
Any problems at all let me know and I'll help track them down.
• Fri, 9 Sep 2016, 9:53 PM
Can Stack connect to a Maxima that is running on a different server than the moodle? Or has maxima to be installed on the same server?
• Fri, 9 Sep 2016, 11:19 PM
Yes Andreas,
See https://github.com/maths/stack_util_maximapool
The larger sites using STACK find this very convenient.