












































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
simple LATEX, for the display of mathematics;. • the Moodle VLE, for storing the questions and assembling the quiz. The complete documentation of the STACK ...
Typology: Lecture notes
1 / 52
This page cannot be seen from the preview
Don't miss anything!













































LoughboroughUniversity 3.1 Our visual identity Logo
06
Logo The logo is the most recognisable symbol ofLoughborough University and is unique to us. As such, it’s crucial we use it correctly andconsistently across all applications.
The logo is comprised of two core elements,the shield and the full name Loughborough University. When the logo is being used the twocore elements must always appear together as a way of identifying the University. The logo is normally used in its entirety, but theremay be practical reasons why this doesn’t apply.
For example, the shield can be used as an agiledevice where it can take on a wide range of visual forms. See page 61 for examples.
For advice or approval on using theLoughborough University logo please contact [email protected]
This guide was written by
Tim Lowe, The Open University Chris Sangwin, The University of Edinburgh Ian Jones, Loughborough University
with contributions from
Grahame Erskine (The Open University), Malthe Sporring (The University of Edinburgh)
as part of a Higher Education Academy (now Advance HE) Collaborative Award for Teaching Excellence (CATE).
The CATE was made possible by funding from HEFCE, HEFCW, and DfE and supported by the Higher Education Academy (now Advance HE)
Intellectual Property Rights of this guide lie with Advance HE.
Version 0.3, July 2019 Comments and suggestions on this document are welcomed: please email [email protected]
1 What is STACK?
This guide is intended to explain how to use STACK to produce online interactive assessment questions, and to provide a reference for commonly used commands.
STACK (System for Teaching and Assessment using a Computer algebra Kernel) is a powerful system for the online assessment of mathematics and related subjects. It enables the generation of randomised questions, permits entry of algebraic expressions as answers and supports immediate feedback to students based on the mathematical properties of their answers.
STACK is available as a question type for the Moodle Virtual Learning Environment (VLE) and also as a question type for the ILIAS system. It can be used in other systems via the LTI (Learning Tools Interoperability) protocol. An application programming interface (API) is being developed to enable STACK to be easily embedded into other software. For the purposes of this guide, we consider the use of STACK within Moodle.
STACK is a highly sophisticated system. With such a powerful system, there is inevitably some complexity in authoring robust, useful questions. Question authoring requires skills in a variety of areas including:
The complete documentation of the STACK system, including a Quick Start guide, is part of every STACK installation. It can be accessed on your system as
[moodle-url]/question/type/stack/doc/doc.php
where [moodle-url] is the URL of your Moodle server. This provides documentation corresponding to the version of the system installed. The current version of the STACK documentation can also be read at https://github.com/maths/moodle-qtype_stack/blob/master/doc/ en/index.md (Note that this may describe features not yet available in your local STACK installation.)
When authoring STACK questions, it is recommended that the Firefox or Chrome web-browsers are used, rather than Internet Explorer which can cause some difficulties.
3 Moodle question bank
STACK questions (along with all other types of Moodle quiz question) are stored within the Moodle question bank. There is a question bank associated with each individual Moodle course, and a separate bank associated with each individual quiz.
We recommend storing questions within the course question bank, unless there is good reason to do otherwise.
Each question bank can be divided into a number of categories which function similar to folders or directories in a computer file system. Categories can themselves be divided into sub-categories.
In addition to helping organise large collections of questions, one advantage of categories is that you can ask Moodle to select a random question from a specified category to be included within a quiz. So questions can be randomly selected from within a category in addition to including randomisation themselves.
Questions can also be allocated tags (see Subsection 5.7). The question bank can be searched by tag, and questions can also be randomly selected to be included in a quiz on the basis of their tags.
The Moodle course question bank can be accessed from the Website administration section of the Administration block on the course home page. (Quiz question banks are accessed from the Quiz administration area of that block, which is displayed whenever a quiz is being accessed.)
3 Moodle question bank
Figure 1 The Moodle course administration block
There are two views of the question bank:
Questions which shows the questions within a given category, as shown in Figure 2;
Categories which lists the categories, and allows categories to be added, removed or re-organised.
Figure 2 The questions view of the Moodle question bank
5 STACK question form
Here we explain the details of the web-page used to author STACK questions. We will illustrate the process using an example question, one random instance of which might be
Expand the brackets in the expression
(x + 2y)^2.
5.1 General settings This first General section of the STACK authoring form contains the question text, question randomisation and general feedback given to the students. By default, this section is expanded when the STACK authoring form first opens. It contains the following elements.
This is the name of the question that will appear in the question bank listing of questions. The question name box must be completed.
Choose a meaningful name, bearing in mind the end of a long name may not be visible in the question bank listing of questions.
Within this box, Maxima code is used to randomise the parameters of the question and define variables whose value can then be used within the question statement and any worked solution. Question variables are optional. Maxima is a computer-algebra system, so it can process algebraic expressions and equations etc. Any otherwise undefined variables are treated as mathematical variables.
5 STACK question form
Most Maxima commands can be used in STACK (some are prohibited for reasons of security). A list of useful Maxima commands is given in Appendix A, and a summary of the most essential is given in the following box. A more complete introduction to Maxima can be found at
http://maxima.sourceforge.net/docs/tutorial/en/ minimal-maxima.pdf
5 STACK question form
all additional commands etc, you can download the STACK sandbox, as described in the STACK documentation: [moodle-url]/ question/type/stack/doc/doc.php/CAS/STACK-Maxima sandbox.md
This is used to link two (or more) separate STACK questions so they have the same values of randomised variables. It can be useful in creating a sequence of linked questions each addressing different steps within the same instance of a larger problem.
Every question with the same string in this box has the same seed for the random number generator, and hence if the Question variables code is the same in both questions, then both questions will have variables with the same random values.
For our simple example, leave this box empty.
This is the text of the question that will be displayed to students.
Mathematics can be included using LATEX syntax (see Appendix C). Use the LATEX delineator (... ) for inline maths and [... ] for displayed maths.
The values of any Maxima variables defined in the Question variables section can also be included here. Using {@^... @} displays the value of the variable correctly formatted using LATEX. For, example, the correctly formatted value of the variable epn can be included using {@epn@}. This can be included both within and outside of a LATEX environment. In both cases, the output will be formatted using LATEX.
It is also possible to insert the unformatted value of the variable using {#... #}. This will use Maxima’s display representation rather than using LATEX. For example, if p:sin(npi) then {#p#} will be replaced by sin(n%pi) and {@p@} will be replaced by (\sin(n\cdot\pi)).
A text box for students to enter their answers is included using, for example
[[input:ans1]]
This will cause the student’s input to be assigned to the variable ans1.
5 STACK question form
When using STACK, students’ inputted answers are first subject to a validation check to ensure the answer is appropriate (as defined by the settings discussed in Subsection 5.4). Invalid answers are usually highlighted to the student who can then address the problem and revise their answer before it is submitted for marking. Separating validation from “correctness” is a key design feature of STACK, and helps students significantly. The validation feedback can be shown even when using the Deferred feedback question behaviour. Each input box needs to have a corresponding [[validation:ans1]] tag indicating the position in which the input validation feedback will be displayed.
The question text box is pre-populated with [[input:ans1]] [[validation:ans1]] when the question is created.
For our example, ensure the Question Text box contains the following.
Expand the brackets in the expression [ {@epn@}.]
( {@epn@} = ) [[input:ans1]] [[validation:ans1]]
Note that repeating the expression before the answer box provides a hint to the students they should not enter both the question and the solution, linked with equals signs as their answer.
STACK questions can have more than one input box for students to type their answers into. To include a second box, include additional input and validation tags, for example [[input:ans2]] [[validation:ans2]], in the question text. This example will cause the answer input in the second box to be stored in the variable ans2. After completing these first few elements in the General section of the form, it is useful to test the question is working before continuing.
5.2 Saving and testing STACK does not allow the question to be saved until certain parts of the form have been completed. You might like to continually save and test your question as it is developed.
5 STACK question form
You can preview and test the question by either
This opens a Preview question page which displays the question. Check that this is showing a correctly randomised version of your question. If the Maxima code fails, for reasons other than syntax errors, the question preview may display the text CAS Error: No expressions were returned. The following subsection may help you resolve any issues.
One way of identifying the location of errors in the Question variables code is to comment out sections (by surrounding them with /*... */), and re-saving the question. You might also wish to temporarily edit the Question text to display the values of appropriate variables. The code can then be uncommented in stages until the error is found. If the question text shows the name of a variable rather than its value, this means that the variable has not been assigned a value. This might be due to a typographical error in either the Question variables or the Question text. Another useful aid is an additional STACK page that displays the values (for one particular question instance) of all variables defined in the question. To access this, click Question tests and deployed variants at the top right-hand corner of the Preview question page. Scroll down until you find the section called Question variable values which shows the variable values for one particular randomised instance. If changes are made to the question code, both the Preview question and Question tests and deployed variants pages can be updated to reflect the changes using your browser refresh function (usually F5). The Question tests and deployed variants page will be considered in more detail in Section 7.
5.3 General settings, continued The remaining elements of the General section of the STACK editing form are as follows.
5 STACK question form
This is the mark to be given if the answer to the question is fully correct. Since the mark can be scaled when the question is incorporated into a quiz, it is usual to set this to be 1.
For the example question, set this to 1.
This is the feedback given to a student in response to their particular given answer. This field is common to all Moodle quiz questions, and whether this feedback is shown to the student or not is set at the Moodle quiz level.
In STACK, this feedback is normally generated via the Potential response tree marking algorithm, described in Subsection 5.5.
To display the output from the potential response tree (which has the name prt1 by default), include the tag
[[feedback:prt1]]
in the specific feedback. This is included by default when the STACK question is created, and usually no other text need be included here.
In multi-part questions, with many inputs and many potential response trees, it is often more sensible to put specific feedback directly next to the inputs. Hence these tags can be moved into the Question text. However, in moving the tags you lose some control in how the quiz can be configured. You cannot control both the timing and the position of the feedback (which is one unfortunate constraint of working within Moodle).
For this example, leave the [[feedback:prt1]] tag in the Specific feedback box. Nothing else need be added to this box.
When the question is used with the Interactive with multiple attempts question behaviour, this specifies the (absolute) number of marks to be lost for each incorrect attempt.
5 STACK question form
This is a unique identifier which can be given to a question. It is used to identify the question when using it outside of a quiz, for example when embedded within other areas of Moodle.
This can be left blank.
As mentioned in Subsection 5.2.1, the Question note is text unique to a particular randomisation of a question, and is used to distinguish between different randomised question instances. Two instances of a question are considered different if their Question notes are different. The Question notes are visible in the listing of deployed question variants, see Subsection 7.2.
It is often useful to include a summary of the randomised question and its answer in the question note.
For the example question, if this box was not completed earlier, enter the following for the Question note.
( {@epn@}={@ans@} )
5.4 Input: ans
This section of the form specifies the properties of the student input, which by default is stored in the variable name ans1. (Throughout this section, it is assumed that ans1 has been used to store the student input.)
If you have changed the name of the answer variable or included more than one answer box, click the
Verify the question text and update the form
button at the end of the General section to update the rest of the form before continuing.
If you have more than one answer box, hence more than one answer variable, you will need to complete one of these sections for each answer variable. These additional sections will be added to the form when the
Verify the question text and update the form
button is clicked, or when you attempt to save the question.
Note that STACK separates the processes of ensuring a student’s input is a valid answer to the question from that of deciding if the answer is
5 STACK question form
correct. Some of the settings in this section help specify what a valid answer may be, and whether students are informed of an invalid answer before it is marked for correctness. Such a warning (if enabled) is displayed in the area specified by the location of the [[validation:ans1]] tag in the Question text.
This specifies the type of input associated with this variable. For example, whether it is a box allowing students to enter algebraic or numerical expressions, or a set of predefined options the student can select from. The available Input types are given in Appendix D.
For our example, we require students to enter an algebraic expression, so select Algebraic input.
This is the (or a) correct answer to the question. Generally, this will be stored within a variable defined in the Question variables section, so give the name of that variable here.
If this field was not completed earlier, enter ans here.
This is the length (in characters) of the input box displayed.
The default of 15 is probably appropriate for this example.
This specifies whether STACK should expect students to use strict Maxima input syntax when entering an answer or not. It affects the range of cases in which stars (for multiplication) might be automatically inserted, if enabled. See Subsection 5.4.5 following.
This setting works in conjunction with that above, and is used to determine how, if at all, the system automatically inserts multiplication stars into a student’s answer where implicit multiplication might have been intended. There are several options. Don’t insert stars Insert stars for implied multiplication only This allows 2x to be interpreted as 2 × x. It also means that sin x and sinx are invalid.