## Question types: STACK

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
simplify(student_answer-teacher_answer) = 0
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:
- Textual comments for the student.
- A numerical mark.
- 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.

Can you try again with Debugging set to DEVELOPER level, and send us the full error message, including the stack trace.

I hope you don't mind that STACK is now listed in http://docs.moodle.org/25/en/Question_types#Third-party_question_types

and there is a Moodle Docs page at http://docs.moodle.org/25/en/STACK_question_type , whish is also translated into spanish.

The STACK plugin English language strings are 90% translated into spanish and the translation should be finished in a month.

If you are not sure whether something is a bug or not, or if you just want advice, then the Moodle Maths forum (linked to as 'Discussion' above) is the best place to ask.

Thanks in advance!

Kevin

I'm using STACK 2014032800 (installed via git). None of my plots are showing grid lines; they do show zero lines. ("The grid has been changed by adding the gnuplot commands set zeroaxis, set grid. This adds more grid lines than Maxima's default...") I am using Gnuplot 4.2.6 and Maxima 5.32.1 (I compiled Maxima on my OSX Lion machine, but not gnuplot):

STACK_SETUP(ex):=block(

MAXIMA_VERSION_NUM:31.3,

TMP_IMAGE_DIR:"/Library/WebServer/moodledata/stack/tmp/",

IMAGE_DIR:"/Library/WebServer/moodledata/stack/plots/",

PLOT_TERMINAL:"png",

PLOT_TERM_OPT:"large transparent size 450,300",

DEL_CMD:"rm",

GNUPLOT_CMD:"/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot",

MAXIMA_VERSION:"5.31.3",

URL_BASE:"!ploturl!",

true)$

/* We are using an optimised lisp image with maxima and the stack libraries

pre-loaded. That is why you don't see the familiar load("stackmaxima.mac")$ here. */

Any insight as to why grid lines are not showing up? In case it's relevant, changing [nticks] has no effect, either.

Thanks again,

Kevin.

* $plugin->requires change that value to 2013051400

* (qbehaviours only) $plugin->dependencies change all the version numbers there to 2013050100.

then STACK v3.3.3 will work with Moodle 2.5. However, we don't recomment that you use an un-supported version of Moodle. There are security risks. You should upgrade your version of Moodle instead. But, if you can't you may still be able to run the latest STACK.

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.

Any advice?

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.