2019-STACK-Guide.pdf, Lecture notes of Mathematics

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

2021/2022

Uploaded on 08/05/2022

jacqueline_nel
jacqueline_nel 🇧🇪

4.4

(242)

3.2K documents

1 / 52

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
3.1 Our visual identity
Logo
Loughborough
University
06
Logo
The logo is the most recognisable symbol of
Loughborough University and is unique to us.
As such, its crucial we use it correctly and
consistently 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 two
core elements must always appear together as
a way of identifying the University.
The logo is normally used in its entirety, but there
may be practical reasons why this doesn’t apply.
For example, the shield can be used as an agile
device where it can take on a wide range of visual
forms. See page 61 for examples.
For advice or approval on using the
Loughborough University logo please
contact visualidentity@lboro.ac.uk
Getting started
with STACK
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34

Partial preview of the text

Download 2019-STACK-Guide.pdf and more Lecture notes Mathematics in PDF only on Docsity!

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]

Getting started

with STACK

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]

  • Introduction
  • 1 What is STACK?
  • 2 Question behaviours
  • 3 Moodle question bank
  • 4 Creating a STACK question
    • 4.1 Authoring a question
    • 4.2 Importing a question
  • 5 STACK question form
    • 5.1 General settings
      • 5.1.1 Question name
      • 5.1.2 Question variables
      • 5.1.3 Random group
      • 5.1.4 Question text
    • 5.2 Saving and testing
      • 5.2.1 Saving
      • 5.2.2 Preview and Testing
      • 5.2.3 Debugging
    • 5.3 General settings, continued
      • 5.3.1 Default mark
      • 5.3.2 Specific feedback
      • 5.3.3 Penalty
      • 5.3.4 General feedback
      • 5.3.5 ID number
      • 5.3.6 Question note
    • 5.4 Input: ans1
      • 5.4.1 Input type
      • 5.4.2 Model answer
      • 5.4.3 Input box size
      • 5.4.4 Strict syntax
      • 5.4.5 Insert stars
      • 5.4.6 Syntax hint
      • 5.4.7 Hint attribute
      • 5.4.8 Forbidden words
      • 5.4.9 Allowed words
      • 5.4.10 Forbid float
      • 5.4.11 Require lowest terms
      • 5.4.12 Check the type of the response
      • 5.4.13 Student must verify
      • 5.4.14 Show the validation
      • 5.4.15 Extra options
    • 5.5 Potential response tree: prt1
      • 5.5.1 Question value
      • 5.5.2 Auto-simplify
      • 5.5.3 Feedback variables
      • 5.5.4 Nodes
    • 5.6 Options - 5.6.1 Question-level simplify - 5.6.2 Assume positive - 5.6.3 Assume real - 5.6.4 Standard feedback - 5.6.5 Multiplication sign - 5.6.6 Surd for square root - 5.6.7 Meaning and display of sqrt(-1) - 5.6.8 Inverse trigonometric functions - 5.6.9 Default shape of matrix parenthesis - 5.6.10 Hints
      • 5.7 Tags
      • 5.8 Created/last saved
      • 5.9 Fix dollars
    • 6 Previewing the question
    • 7 Question tests and deploying variants
      • 7.1 Question tests
      • 7.2 Deploying variants
  • Appendix A Useful Maxima commands
  • Appendix B STACK-specific Maxima commands
  • Appendix C Basic LATEX commands
  • Appendix D STACK answer input types
  • Appendix E STACK answer tests
  • Index

1 What is STACK?

Introduction

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.

1 What is STACK?

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:

  • teaching mathematics, to identify appropriate questions, common errors and appropriate feedback;
  • mathematics, to create and appropriately randomise questions;
  • programming using the Maxima computer-algebra system, to implement the question randomisation;
  • simple LATEX, for the display of mathematics;
  • the Moodle VLE, for storing the questions and assembling the quiz.

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.)

Tip

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

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.

Tip

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.

Tips

  • Bear in mind how questions will be used within quizzes when deciding on a category structure.
  • Remember that questions can be randomly selected from a category or by tag – an individual question does not have to contain every possible randomisation internally.

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

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

Example

Expand the brackets in the expression

(x + 2y)^2.

Tips

  • When creating a question, start with the worked solution to the problem. If different random versions need different worked solutions, then consider having two or more different questions. If these different questions are put in the same question bank category, or given the same tag, then the quiz can be configured to randomly select one of them to be offered to the student.
  • Similarly, questions do not have to include all randomisation possibilities. You can have different questions which are randomly chosen by the quiz.

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.

5.1.1 Question name

This is the name of the question that will appear in the question bank listing of questions. The question name box must be completed.

Tip

Choose a meaningful name, bearing in mind the end of a long name may not be visible in the question bank listing of questions.

5.1.2 Question variables

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

Tips

  • Use Maxima variable names consisting of more than one character. Students cannot enter any variable name defined in Question variables that has more than one character within their answer. Hence, if multi-character variable names are used, students cannot accidentally enter the name of the variable in which the answer is stored!
  • Assign each mathematical expression you wish to use in the question or worked solution to a Maxima variable. Future maintenance of questions is easier if Maxima code is restricted to this area, rather than also including code in the question statement or feedback areas. In particular, assign the correct answer (or a sample correct answer) to the question to a variable.

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

Maxima syntax

  • Variables and function names can be a combination of letters followed by a combination of numbers. (This is a STACK restriction on the usual Maxima convention.)
  • Lines of Maxima code should end with a semi-colon (;).
  • Values are assigned to variables using a colon (:), for example aa:4;
  • Functions are defined using colon-equals (:=), for example f(x):=x∧2;
  • Equals (=) is used within equations, which could themselves be assigned to a variable, for example eqn:x∧2-4=0;
  • More complicated functions requiring several commands (similar to subroutines) can be defined using the following syntax f(x,y):=block( [list of local variables], command , command , return(value to be returned ) );
  • Comments can be included in the code using /* comment text */
  • Lists are a powerful data structure and are delineated by [... ], for example [1,2,3]

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

5.1.3 Random group

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.

Example

For our simple example, leave this box empty.

5.1.4 Question text

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.

Tips

  • It is better to assign randomised mathematical expressions to a question variable rather than attempt complicated LATEX constructions in the question text.
  • It is better not to use Internet Explorer for authoring STACK questions as its default behaviour is to insert an HTML link to an email address whenever @^ is entered.

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.

Tip

The question text box is pre-populated with [[input:ans1]] [[validation:ans1]] when the question is created.

Example

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

5.2.2 Preview and Testing

You can preview and test the question by either

  • in the question form, click Preview which should be shown next to the Save changes and continue editing button once the question has been successfully saved; or
  • from the question bank, click the preview icon near the question name.

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.

5.2.3 Debugging

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

5.3.1 Default mark

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.

Example

For the example question, set this to 1.

5.3.2 Specific feedback

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).

Tips

  • If you want specific feedback to be shown right next to the input, then move the tag.
  • If you want control over the timing of when specific feedback is given, using the quiz settings, leave the tag in this box.

Example

For this example, leave the [[feedback:prt1]] tag in the Specific feedback box. Nothing else need be added to this box.

5.3.3 Penalty

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

5.3.5 ID number

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.

Example

This can be left blank.

5.3.6 Question note

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.

Tip

It is often useful to include a summary of the randomised question and its answer in the question note.

Example

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.

5.4.1 Input type

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.

Example

For our example, we require students to enter an algebraic expression, so select Algebraic input.

5.4.2 Model answer

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.

Example

If this field was not completed earlier, enter ans here.

5.4.3 Input box size

This is the length (in characters) of the input box displayed.

Example

The default of 15 is probably appropriate for this example.

5.4.4 Strict syntax

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.

5.4.5 Insert stars

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.