Skip to content
Snippets Groups Projects
Commit d4301f3b authored by csangwin's avatar csangwin
Browse files

Update the docs (mostly spell checking)

parent 2d6c1ba6
Branches
No related tags found
No related merge requests found
Showing
with 96 additions and 102 deletions
...@@ -13,12 +13,15 @@ Todo: ...@@ -13,12 +13,15 @@ Todo:
2. Strip out parallel DB support in reporting etc. Search for `stack_determine_moodle_version()` 2. Strip out parallel DB support in reporting etc. Search for `stack_determine_moodle_version()`
3. Bring the API into the core of STACK for longer term support, and better support for ILIAS. 3. Bring the API into the core of STACK for longer term support, and better support for ILIAS.
4. Major code tidy: Moodle code style now requires (i) short forms of arrays, i.e. `[]` not `array()`, and (ii) commas at the end of all list items. 4. Major code tidy: Moodle code style now requires (i) short forms of arrays, i.e. `[]` not `array()`, and (ii) commas at the end of all list items.
5. Fix markdown problems. See issue #420.
6. Error messages: use caserror.class more fully to use user information to target error messages.
7. Remove all "cte" code from Maxima - mostly install.
## Version 4.5.0 ## Version 4.5.0
Please note, this is the _last_ version of STACK which will support Moodle 3.x. Please note, this is the _last_ version of STACK which will support Moodle 3.x.
1. Refactor the healthcheck scripts, especially to make unicode requirements for maxima more prominent. 1. Re-factor the healthcheck scripts, especially to make unicode requirements for maxima more prominent.
2. Shape of brackets surrounding matrix/var matrix input types now matches question level option for matrix parentheses. (TODO: possible option to change shape at the input level?) 2. Shape of brackets surrounding matrix/var matrix input types now matches question level option for matrix parentheses. (TODO: possible option to change shape at the input level?)
3. Allow users to [systematically deploy](../CAS/Systematic_deployment.md) all variants of a question in a simple manner. 3. Allow users to [systematically deploy](../CAS/Systematic_deployment.md) all variants of a question in a simple manner.
4. Tag inputs with 'aria-live' is 'assertive' for better screen reader support. 4. Tag inputs with 'aria-live' is 'assertive' for better screen reader support.
...@@ -28,20 +31,14 @@ Please note, this is the _last_ version of STACK which will support Moodle 3.x. ...@@ -28,20 +31,14 @@ Please note, this is the _last_ version of STACK which will support Moodle 3.x.
8. Add in an option `margin` to control margins around STACK-generated plots. 8. Add in an option `margin` to control margins around STACK-generated plots.
9. Add in better support for proof as [Parson's problems](../Authoring/Parsons.md). 9. Add in better support for proof as [Parson's problems](../Authoring/Parsons.md).
TODO:
1. Fix markdown problems. See issue #420.
2. Error messages: use caserror.class more fully to use user information to target error messages.
3. Remove all "cte" code from Maxima - mostly install.
## Parson's block development track ## Parson's block development track
Essential (v 4.5.0) Essential (v 4.5.0)
1. Add in an option "fixed". When we have "submit all and finish" we don't want to allow users to then drag things. This is an edge case for after the quiz. I think we can achive this by adding in an argument to the JSON in the student's input "fixed", and this will get sent to the block. We can talk about this. 1. Add in an option "fixed". When we have "submit all and finish" we don't want to allow users to then drag things. This is an edge case for after the quiz. I think we can achive this by adding in an argument to the JSON in the student's input "fixed", and this will get sent to the block. We can talk about this.
2. Polish up the "use once" or "clone" strings. 2. Polish up the "use once" or "clone" strings.
3. Use syntax hint to set up a non-empty starting point.... 3. Use syntax hint to set up a non-empty starting point.
4. Check sortable for keyboard accessibility (SM: Not build in to Sortable currently: https://github.com/SortableJS/Sortable/issues/1951; however, it looks like it is do-able with some work https://robbymacdonell.medium.com/refactoring-a-sortable-list-for-keyboard-accessibility-2176b34a07f4) 4. Check sortable for keyboard accessibility (SM: Not built-in to Sortable currently: https://github.com/SortableJS/Sortable/issues/1951; however, it looks like it is do-able with some work https://robbymacdonell.medium.com/refactoring-a-sortable-list-for-keyboard-accessibility-2176b34a07f4)
5. CSS styling fix for automated feedback 5. CSS styling fix for automated feedback
Later Later
...@@ -50,7 +47,7 @@ Later ...@@ -50,7 +47,7 @@ Later
2. Different proof types -- iff, induction, etc. how do we indicate the different scaffolding for this? 2. Different proof types -- iff, induction, etc. how do we indicate the different scaffolding for this?
2. Create templates from the start for different proof types 2. Create templates from the start for different proof types
4. Restrict blocks to fixed number of steps 4. Restrict blocks to fixed number of steps
5. Other draggable arrangements, e.g. fill in a 2*2 grid (for matching problems) 5. Other arrangements, e.g. fill in a 2*2 grid (for matching problems)
Nested lists (flat list vs. nested/tree) Nested lists (flat list vs. nested/tree)
6. Allow student to select proof style (e.g. iff, contradiction) and pre-structure answer list accordingly 6. Allow student to select proof style (e.g. iff, contradiction) and pre-structure answer list accordingly
7. Allow some strings in the correct answer to be optional. Allow authors to input a weight for each item and use weighted D-L distance, e.g., weight of 0 indicates that a step is not required, but will not be considered incorrect if included. 7. Allow some strings in the correct answer to be optional. Allow authors to input a weight for each item and use weighted D-L distance, e.g., weight of 0 indicates that a step is not required, but will not be considered incorrect if included.
...@@ -58,6 +55,7 @@ Later ...@@ -58,6 +55,7 @@ Later
9. Allow students to mark items (e.g. as used or unneeded) or tick used items 9. Allow students to mark items (e.g. as used or unneeded) or tick used items
10. Confirmation for delete all? 10. Confirmation for delete all?
11. Alternative styling/signalling for clone mode? 11. Alternative styling/signalling for clone mode?
12. Better support (and documentation) for bespoke grading functions.
## For "inputs 2"? ## For "inputs 2"?
......
...@@ -99,9 +99,9 @@ Note that the `maximacommand`, `maximacommandopt` and `maximalibraries` should b ...@@ -99,9 +99,9 @@ Note that the `maximacommand`, `maximacommandopt` and `maximalibraries` should b
The `castimeout` of 100s is excessive. However, the very first time Maxima is called on a server it internally compiles a lot of LISP source code. This can take a surprisingly long time! The `castimeout` of 100s is excessive. However, the very first time Maxima is called on a server it internally compiles a lot of LISP source code. This can take a surprisingly long time!
### 3. GOAL: Reduce timeout and check Maxima libraies. ### 3. GOAL: Reduce timeout and check Maxima libraries.
Now we need to back away gently from the above raw confuration, back towards the defaults/production settings. Now we need to back away gently from the above raw configuration, back towards the defaults/production settings.
qtype_stack | castimeout = 10 qtype_stack | castimeout = 10
qtype_stack | maximalibraries = stats, distrib, descriptive, simplex qtype_stack | maximalibraries = stats, distrib, descriptive, simplex
...@@ -162,4 +162,4 @@ The very last step is to use the CAS cache. ...@@ -162,4 +162,4 @@ The very last step is to use the CAS cache.
qtype_stack | casresultscache = Cache in the database qtype_stack | casresultscache = Cache in the database
This should be a working server, using the optimised image. Please consider using the Maxima Pool for production sites, putting Maxima onto another server competely. This should be a working server, using the optimised image. Please consider using the Maxima Pool for production sites, putting Maxima onto another server completely.
\ No newline at end of file \ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
STACK is being used live at many institutions, including the University of Edinburgh, the UK Open University, Aalto, Loughborough University, and the University of Birmingham in the UK. STACK is being used live at many institutions, including the University of Edinburgh, the UK Open University, Aalto, Loughborough University, and the University of Birmingham in the UK.
We appreciate some people perfer hosted services as an alterntaive to running their own server. We are pleased to work with EDINA at the University of Edinburgh as a [recommended hosting partner](https://stack.edina.ac.uk/). We appreciate some people prefer hosted services as an alternative to running their own server. We are pleased to work with EDINA at the University of Edinburgh as a [recommended hosting partner](https://stack.edina.ac.uk/).
STACK is designed to be used on a Linux-based server. The Windows/MS option exists to help teachers author questions offline, and for demonstration and development. However, for demonstration, development and offline use we strongly recommend using VirtualBox instead of the Windows port. Note also that support for the optimized Maxima image is not available on Windows platforms, which is a substantial performance improvement. STACK is designed to be used on a Linux-based server. The Windows/MS option exists to help teachers author questions offline, and for demonstration and development. However, for demonstration, development and offline use we strongly recommend using VirtualBox instead of the Windows port. Note also that support for the optimized Maxima image is not available on Windows platforms, which is a substantial performance improvement.
...@@ -43,7 +43,7 @@ to `filter_mathjaxloader | mathjaxconfig` in the filter settings: Dashboard > Si ...@@ -43,7 +43,7 @@ to `filter_mathjaxloader | mathjaxconfig` in the filter settings: Dashboard > Si
Ensure gcc, gnuplot and [Maxima](http://maxima.sourceforge.net) are installed on your server. Currently Maxima 5.38.1 to 5.47.0 are supported. Please contact the developers to request support for other versions. (Newer versions will be supported, and prompts to test them are welcome.) We currently recommend that you use any version of Maxima after 5.43.0. Ensure gcc, gnuplot and [Maxima](http://maxima.sourceforge.net) are installed on your server. Currently Maxima 5.38.1 to 5.47.0 are supported. Please contact the developers to request support for other versions. (Newer versions will be supported, and prompts to test them are welcome.) We currently recommend that you use any version of Maxima after 5.43.0.
Maxima can be installed via a package manager on most Linux distributions (e.g. `sudo apt-get install maxima` on Debian/Ubuntu), [downloaded](http://maxima.sourceforge.net/download.html) as a self-contained installer program for Windows, or [compiled from source](Maxima.md). Please make sure you also have `maxima-share` installed. (This is automatically installed on some distros, but not others.) Maxima can be installed via a package manager on most Linux distributions (e.g. `sudo apt-get install maxima` on Debian/Ubuntu), [downloaded](http://maxima.sourceforge.net/download.html) as a self-contained installer program for Windows, or [compiled from source](Maxima.md). Please make sure you also have `maxima-share` installed. (This is automatically installed on some distributions, but not others.)
To check your version of maxima, run `maxima --version`. If Moodle is set up using Apache, STACK will run maxima through the Apache user (`www-data/apache2`). To check that this works, run maxima as the apache user (e.g. `sudo -u www-data maxima`). Later versions of maxima create a cache and thus the executing user needs to have write access to a temporary folder, see [#731](https://github.com/maths/moodle-qtype_stack/issues/731) for more details and troubleshooting. To check your version of maxima, run `maxima --version`. If Moodle is set up using Apache, STACK will run maxima through the Apache user (`www-data/apache2`). To check that this works, run maxima as the apache user (e.g. `sudo -u www-data maxima`). Later versions of maxima create a cache and thus the executing user needs to have write access to a temporary folder, see [#731](https://github.com/maths/moodle-qtype_stack/issues/731) for more details and troubleshooting.
......
# Maintaining questions and question banks # Maintaining questions and question banks
This section of the documentation provides information on testing questions and maintaining question banks for the long term. Access to functions related to maintaining STACK questions is through the "adminui" page This section of the documentation provides information on testing questions and maintaining question banks for the long term. Access to functions related to testing STACK questions and maintaining question banks for the long term is through the "adminui" page
[...]/question/type/stack/adminui/index.php [...]/question/type/stack/adminui/index.php
(or available from the qtype_stack plugin setting page). To make use of these tools (in Moodle) users require the capability `qtype/stack:usediagnostictools` via Moodle's capability system. We stronly recommend anyone who regularly writes STACK questions across more than one Moodle course be given this capability. It enables the following: (or available from the qtype_stack plugin setting page). To make use of these tools (in Moodle) users require the capability `qtype/stack:usediagnostictools` via Moodle's capability system. We strongly recommend anyone who regularly writes STACK questions across more than one Moodle course be given this capability. It enables the following:
* Bulk testing of questions. * Bulk testing of questions, and efficient follow-up via direct links to the "STACK question dashboard" for questions of interest
* Identifying STACK questions using particular blocks, e.g. the "todo" block, or includes. * Identifying STACK questions using particular blocks, e.g. the "todo" block, or includes.
* Bulk change of the default settings. * Bulk change of the default settings.
* Direct connection to Maxima (with normal teacher privileges in place) through a "Chat" script
* Ability to view unit test results for STACK answer tests online, which acts as comprehensive documentation for the intended behaviour, with commentary.
If your institution restricts site admin status, then this capability will allow a subset of users to access these functions. If it is not possible to get this capability, then Moodle site administrators will need to run the tests themselves and give you the results. If your institution restricts site admin status, then this capability will allow a subset of users to access these functions. If it is not possible to get this capability, then Moodle site administrators will need to run the tests themselves and give you the results.
......
...@@ -56,4 +56,4 @@ There have been a number of changes between STACK 2 and STACK 3. These are deta ...@@ -56,4 +56,4 @@ There have been a number of changes between STACK 2 and STACK 3. These are deta
* the options which ask the student to verify and to show validation feedback. * the options which ask the student to verify and to show validation feedback.
* question level penalty option. * question level penalty option.
* Questions with a single potential response tree import with the PRT feedback in the specific feedback slot, not in the question text. We envisage this will enable single part questions to respect a wider variety of Moodle question behaviours. * Questions with a single potential response tree import with the PRT feedback in the specific feedback slot, not in the question text. We envisage this will enable single part questions to respect a wider variety of Moodle question behaviours.
* When importing question tests, the new testing mechanism in STACK 3 enables the teacher to specify a score and penalty, not just an answer note. Since we have to set defaults on import, most question tests now fail and this information will need to be added by hand. A good opportunity to confirm questions have imported correctly..... * When importing question tests, the new testing mechanism in STACK 3 enables the teacher to specify a score and penalty, not just an answer note. Since we have to set defaults on import, most question tests now fail and this information will need to be added by hand. A good opportunity to confirm questions have imported correctly.
...@@ -13,6 +13,6 @@ STACK provides the "notes" [input type](../Authoring/Inputs.md). There are some ...@@ -13,6 +13,6 @@ STACK provides the "notes" [input type](../Authoring/Inputs.md). There are some
## Manual grading. ## Manual grading.
The notes input has a special extra option `manualgraded`, and the default option value is `manualgraded:false`. If you specify `manualgraded:true` then the _whole STACK quesion_ will require manual grading! The notes input has a special extra option `manualgraded`, and the default option value is `manualgraded:false`. If you specify `manualgraded:true` then the _whole STACK question_ will require manual grading!
There really is no way to mix automatic and manually graded parts of a question. Therefore, if you want automatic and manual marking you must have separate questions. There really is no way to mix automatic and manually graded parts of a question. Therefore, if you want automatic and manual marking you must have separate questions.
\ No newline at end of file
# STACK within the Moodle VLE. # STACK within the Moodle VLE.
This page contains useful information about using STACK within the Moodle VLE. This section contains useful information about using STACK within the Moodle VLE.
* [Finding the question bank](Question_bank.md), * [Finding the question bank](Question_bank.md),
* [Creating a quiz](../AbInitio/Authoring_quick_start_8.md), * [Creating a quiz](../AbInitio/Authoring_quick_start_8.md),
......
...@@ -126,7 +126,7 @@ Now use: ...@@ -126,7 +126,7 @@ Now use:
{@plot(pg2(x), [x,(x0-5),(x0+5)], [y,-10,10], [legend,false])@} {@plot(pg2(x), [x,(x0-5),(x0+5)], [y,-10,10], [legend,false])@}
A further example of a step functio: A further example of a step function:
step_fn(x,x0) := unit_step(x-x0-1/2) - unit_step(x-x0+1/2) + und*kron_delta(x,x0+1/2)+ und*kron_delta(x,x0-1/2); step_fn(x,x0) := unit_step(x-x0-1/2) - unit_step(x-x0+1/2) + und*kron_delta(x,x0+1/2)+ und*kron_delta(x,x0-1/2);
p1:sum(step_fn(x,2*k),k,-3,3); p1:sum(step_fn(x,2*k),k,-3,3);
......
...@@ -58,7 +58,7 @@ Note that the variable `proof_steps` is a _list_ of lists: `[ ["key", "step", ( ...@@ -58,7 +58,7 @@ Note that the variable `proof_steps` is a _list_ of lists: `[ ["key", "step", (
2. The `key` can be an integer position in the proof_steps, a string `key`, or a string. 2. The `key` can be an integer position in the proof_steps, a string `key`, or a string.
* Using integers: `proof_iff(proof(1,2,3,4,5),proof(6,7,8,9,10,11))`; * Using integers: `proof_iff(proof(1,2,3,4,5),proof(6,7,8,9,10,11))`;
* Using keys: `proof_iff(proof("assodd","defn_odd","alg_odd","def_M_odd","conc_odd"),proof("contrapos","assnotodd","even","alg_even","def_M_even","conc_even"))` * Using keys: `proof_iff(proof("assodd","defn_odd","alg_odd","def_M_odd","conc_odd"),proof("contrapos","assnotodd","even","alg_even","def_M_even","conc_even"))`
3. The `proof_steps` list can contain an optional string argument `"comment"`. This string can be used to store justification, explaination and narative. Some display functions use this argument, when it exists. To prume out the comments use `proof_steps_prune(proof_steps)` as an argument to the display function. 3. The `proof_steps` list can contain an optional string argument `"comment"`. This string can be used to store justification, explanation and narrative. Some display functions use this argument, when it exists. To prune out the comments use `proof_steps_prune(proof_steps)` as an argument to the display function.
4. Note that the backslash must be protected when defining these strings. 4. Note that the backslash must be protected when defining these strings.
5. The strings can contain HTML, including `<img>` tags for including images within draggable elements. 5. The strings can contain HTML, including `<img>` tags for including images within draggable elements.
......
...@@ -46,5 +46,3 @@ To display feedback use `{@proof_assessment_display(saa, proof_steps)@}` in a PR ...@@ -46,5 +46,3 @@ To display feedback use `{@proof_assessment_display(saa, proof_steps)@}` in a PR
In addition to the automatic feedback, or as an alternative, a teacher can check other properties and define feedback as required. In addition to the automatic feedback, or as an alternative, a teacher can check other properties and define feedback as required.
E.g. a teacher might want to provide feedback such as _"It makes no sense to use \(M\) before it is defined!"_. E.g. a teacher might want to provide feedback such as _"It makes no sense to use \(M\) before it is defined!"_.
TODO: examples of how to do this, and general tools to support bespoke assessment....
\ No newline at end of file
# Support for proof and recepies in STACK # Support for proof in STACK
In STACK the basic assumption is that a student's answer will be a mathematical expression, e.g. a polynomial or an equation. While the facilities for assessing a student's free-form proof is limited (in any online assessment system), teachers can create materials for assessing students' understanding of proof in general, and of particular mathematical proofs. In STACK the basic assumption is that a student's answer will be a mathematical expression, e.g. a polynomial or an equation. While the facilities for assessing a student's free-form proof is limited (in any online assessment system), teachers can create materials for assessing students' understanding of proof in general, and of particular mathematical proofs.
...@@ -23,7 +23,7 @@ Colleagues assessing proof might also consider [semi-automatic marking](../Moodl ...@@ -23,7 +23,7 @@ Colleagues assessing proof might also consider [semi-automatic marking](../Moodl
Mathematical writing, especially for students, commonly takes two forms. Mathematical writing, especially for students, commonly takes two forms.
1. A mathematical proof, which is a deductive justification of a claim. A proof is a "checkable record of reasoning". 1. A mathematical proof, which is a deductive justification of a claim. A proof is a "checkable record of reasoning".
2. A mathematical recepie, which is a set of instructions for carrying out a procedure. 2. A mathematical recipe, which is a set of instructions for carrying out a procedure.
## Presentation of proof ## Presentation of proof
...@@ -47,13 +47,9 @@ By separating out these issues we provide more control, and wider opportunities ...@@ -47,13 +47,9 @@ By separating out these issues we provide more control, and wider opportunities
Consider the following theorem: \(\sum_{k=1}^n (2k-1) = 1+3+5+\cdots + (2n-1) = n^2\). Consider the following theorem: \(\sum_{k=1}^n (2k-1) = 1+3+5+\cdots + (2n-1) = n^2\).
A traditional proof is shown below. This proof was published by DeMorgan in 1838. According to Cajori (1918) this is the first use of the name "mathematical induction", although DeMorgan calls it "successive induction". A traditional proof is shown below. This proof was published by DeMorgan in 1838. According to Cajori (1918) this is the first use of the name "mathematical induction", although DeMorgan calls it "successive induction".
<div style="color: #2f6473; background-color: #def2f8; border-color: #d1edf6;">
<div class="proof">
<p>The sum of any number of successive odd numbers, beginning from unity, is a square number, namely the square of half the even number which follows the last odd number. <p>The sum of any number of successive odd numbers, beginning from unity, is a square number, namely the square of half the even number which follows the last odd number.
Let this proposition be true in any one single instance; that is, \(n\) being some whole number, let \(1,\, 3,\, 5,\, \ldots\) up to \(2n+1\) put together give \((n+1)^2\). Let this proposition be true in any one single instance; that is, \(n\) being some whole number, let \(1,\, 3,\, 5,\, \ldots\) up to \(2n+1\) put together give \((n+1)^2\).
Then the next odd number being \(2n+3\), the sum of all the odd numbers up to \(2n+3\) will be \((n+1)^2+2n+3\), or \(n^2+4n+4\), or \((n+2)^2\). But \(n+2\) is half of the even number next following \(2n+3\): consequently, if the proposition be true of any one set of odd numbers, it is true of one more. But it is true of the first odd number \(1\), for this is the square of half the even number next following. Consequently, being true of \(1\), it is true of \(1+3\); being true of \(1+3\), it is true of \(1+3+5\); being true of \(1+3+5\), it is true of \(1+3+5+7\), and so on, {\em ad infinitum}.</p> Then the next odd number being \(2n+3\), the sum of all the odd numbers up to \(2n+3\) will be \((n+1)^2+2n+3\), or \(n^2+4n+4\), or \((n+2)^2\). But \(n+2\) is half of the even number next following \(2n+3\): consequently, if the proposition be true of any one set of odd numbers, it is true of one more. But it is true of the first odd number \(1\), for this is the square of half the even number next following. Consequently, being true of \(1\), it is true of \(1+3\); being true of \(1+3\), it is true of \(1+3+5\); being true of \(1+3+5\), it is true of \(1+3+5+7\), and so on, {\em ad infinitum}.</p>
</div>
</div>
This is the original version. This is the original version.
......
...@@ -8,7 +8,7 @@ You often need to enter an answer which is an algebraic expression. Details and ...@@ -8,7 +8,7 @@ You often need to enter an answer which is an algebraic expression. Details and
## Why is my answer "invalid"? ## Why is my answer "invalid"?
STACK validates students' answers before they are graded, checking if the answers are in an acceptable syntax and giving the student a chance to confirm their answer is correct. By default, answers not explicitly specifying multiplication (fx. \(2x\) instead of \(2*x\)) are not accepted. This is linked to a core [philosophy of STACK](../About/The_philosophy_of_STACK.md); students should not be penalized for poor computer syntax. It is better to bug students until their answer is unambiguous, than to risk students being marking wrong for typic in "sinx" instead of "sin(x)" and having the computer interpret it as "s\*i\*n\*x". STACK validates students' answers before they are graded, checking if the answers are in an acceptable syntax and giving the student a chance to confirm their answer is correct. By default, answers not explicitly specifying multiplication (fx. \(2x\) instead of \(2*x\)) are not accepted. This is linked to a core [philosophy of STACK](../About/The_philosophy_of_STACK.md); students should not be penalized for poor computer syntax. It is better to bug students until their answer is unambiguous, than to risk students being marking wrong for typing in "sinx" instead of "sin(x)" and having the computer interpret it as "s\*i\*n\*x".
That being said, there are options in STACK to be less strict with student syntax, so that the system may accept "2x" as a valid input. The question author has to activate this function, so contact your teacher if you think they should choose this option. That being said, there are options in STACK to be less strict with student syntax, so that the system may accept "2x" as a valid input. The question author has to activate this function, so contact your teacher if you think they should choose this option.
......
...@@ -17,11 +17,11 @@ The syntax to enter a derivative in Maxima is `diff(y,x,n)`. Teachers need to u ...@@ -17,11 +17,11 @@ The syntax to enter a derivative in Maxima is `diff(y,x,n)`. Teachers need to u
Students' answers always have noun forms added. If a student types in `diff(y,x)` then this is protected by a special function `noundiff(y,x)` (etc), and ends up being sent to answer test as `'diff(y,x,1)`. If a student types in (literally) `diff(y,x)+1 = 0` this will end up being sent to answer test as `'diff(y,x,1)+1 = 0`. Students' answers always have noun forms added. If a student types in `diff(y,x)` then this is protected by a special function `noundiff(y,x)` (etc), and ends up being sent to answer test as `'diff(y,x,1)`. If a student types in (literally) `diff(y,x)+1 = 0` this will end up being sent to answer test as `'diff(y,x,1)+1 = 0`.
The answer test `AlgEquiv` evaluates all nouns. This has a (perhaps) unexpected side-effect that `noundiff(y,x)` will be equivalent to `0`, and `noundiff(y(x),x)` is not. For this reason we have an alternative [answer test](../Authoring/Answer_Tests/index.md) `AlgEquivNouns` which does not evaluate all the nouns. The answer test `AlgEquiv` evaluates all nouns. This has a (perhaps) unexpected side-effect that `noundiff(y,x)` will be equivalent to `0`, and `noundiff(y(x),x)` is not. For this reason we have an alternative [answer test](../Authoring/Answer_Tests/index.md) `AlgEquivNouns` which does not evaluate all the nouns.
The `ATEqualComAss` also evaluates its arguments but does not "simplify" them. So, counter-intuatively perhaps, we currently do have `ATEqualComAss(diff(x^2,x), 2*x);` as true. The `ATEqualComAss` also evaluates its arguments but does not "simplify" them. So, counter-intuitively perhaps, we currently do have `ATEqualComAss(diff(x^2,x), 2*x);` as true.
Students might expect to enter expressions like \( y' \), \( \dot{y} \) or \( y_x \) (especially if you are using `derivabbrev:true`, see below). The use by Maxima of the apostrophe which affects evaluation also has a side-effect that we can't accept `y'` as valid student input. Input `y_x` is an atom. Individual questions could interpet this as `'diff(y,x)` but there is no systematic mechanism for intepreting subscripts as derivatives. Input `dy/dx` is the division of one atom `dy` by another `dx` and so will commute with other multiplication and division in the expression as normal. There is no way to protect input `dy/dx` as \( \frac{\mathrm{d}y}{\mathrm{d}x}\). The only input which is interpreted by STACK as a derivative is Maxima's `diff` function, and students must type this as input. Students might expect to enter expressions like \( y' \), \( \dot{y} \) or \( y_x \) (especially if you are using `derivabbrev:true`, see below). The use by Maxima of the apostrophe which affects evaluation also has a side-effect that we can't accept `y'` as valid student input. Input `y_x` is an atom. Individual questions could interpret this as `'diff(y,x)` but there is no systematic mechanism for interpreting subscripts as derivatives. Input `dy/dx` is the division of one atom `dy` by another `dx` and so will commute with other multiplication and division in the expression as normal. There is no way to protect input `dy/dx` as \( \frac{\mathrm{d}y}{\mathrm{d}x}\). The only input which is interpreted by STACK as a derivative is Maxima's `diff` function, and students must type this as input.
The exprssion `diff(y(x),x)` is not the same as `diff(y,x)`. In Maxima `diff(y(x),x)` is not evaluated further. Getting students to type `diff(y(x),x)` and not `diff(y,x)` will be a challange. Hence, if you want to condone the difference, it is probably best to evaluate the student's answer in the feedback variables as follows to ensure all occurances of `y` become `y(x)`. The expression `diff(y(x),x)` is not the same as `diff(y,x)`. In Maxima `diff(y(x),x)` is not evaluated further. Getting students to type `diff(y(x),x)` and not `diff(y,x)` will be a challenge. Hence, if you want to condone the difference, it is probably best to evaluate the student's answer in the feedback variables as follows to ensure all occurrences of `y` become `y(x)`.
ans1:'diff(y(x),x)+1 = 0; ans1:'diff(y(x),x)+1 = 0;
ansyx:subst(y,y(x),ans1); ansyx:subst(y,y(x),ans1);
...@@ -183,7 +183,7 @@ Mostly when dealing with expressions you need to remove the \(\pm\) operator. T ...@@ -183,7 +183,7 @@ Mostly when dealing with expressions you need to remove the \(\pm\) operator. T
\[ \pm a \rightarrow a \vee -a \] \[ \pm a \rightarrow a \vee -a \]
(actually using STACK's `nounor` operator to prevent evaluation). (actually using STACK's `nounor` operator to prevent evaluation).
If you simply want to implement the re-write rule \( a\pm b \rightarrow a+b, \) i.e. ignore the \(\pm\) operator, then you can use `subst( "+","#pm#", ex)`. For example, this substitution can be done in the feebdack variables on a student's answer. If you would like to test code offline with `#pm#` then you will need to make use of the [Maxima sandbox](../CAS/STACK-Maxima_sandbox.md). If you simply want to implement the re-write rule \( a\pm b \rightarrow a+b, \) i.e. ignore the \(\pm\) operator, then you can use `subst( "+","#pm#", ex)`. For example, this substitution can be done in the feedback variables on a student's answer. If you would like to test code offline with `#pm#` then you will need to make use of the [Maxima sandbox](../CAS/STACK-Maxima_sandbox.md).
## Second order linear differential equations with constant coefficients ## ## Second order linear differential equations with constant coefficients ##
......
...@@ -26,7 +26,7 @@ Move the points \(A\) and \(B\) (on a GeoGebra applet) so that the line \(AB\) i ...@@ -26,7 +26,7 @@ Move the points \(A\) and \(B\) (on a GeoGebra applet) so that the line \(AB\) i
Notes. Notes.
* \(m\) and \(c\) are defined by STACK in the question variables. Ultimately these could be randomly genereated. They illustrate how to _set_ values in an applet. * \(m\) and \(c\) are defined by STACK in the question variables. Ultimately these could be randomly generated. They illustrate how to _set_ values in an applet.
* We should listen to the _gradient_ of the line \(AB\) as an input. This illustrates how to _watch_ a value in GeoGebra and link it to a STACK input. * We should listen to the _gradient_ of the line \(AB\) as an input. This illustrates how to _watch_ a value in GeoGebra and link it to a STACK input.
* \(A\) and \(B\) are points in the GeoGebra applet. We need to _remember_ the position a student leaves the points in. * \(A\) and \(B\) are points in the GeoGebra applet. We need to _remember_ the position a student leaves the points in.
* In this question, the potential response tree should multiply the variable \(m\) by the gradient of \(AB\) to check this is \(-1\). We don't worry about the position of the student's line otherwise. * In this question, the potential response tree should multiply the variable \(m\) by the gradient of \(AB\) to check this is \(-1\). We don't worry about the position of the student's line otherwise.
...@@ -63,7 +63,7 @@ Set the question text - before entering make sure that the editor is switched to ...@@ -63,7 +63,7 @@ Set the question text - before entering make sure that the editor is switched to
Notice this uses the `[[geogebra]]` question block. Then complete the question as follows. Notice this uses the `[[geogebra]]` question block. Then complete the question as follows.
1. Make sure the question text is "HTML" format (not moodle auto format, or something else). 1. Make sure the question text is "HTML" format (not Moodle auto format, or something else).
2. Input `ans1` should have Model answer equal to `-1/m`. 2. Input `ans1` should have Model answer equal to `-1/m`.
3. Input `ans1` should "Forbid float" set to no/false (GeoGebra will return floating point numbers) 3. Input `ans1` should "Forbid float" set to no/false (GeoGebra will return floating point numbers)
4. Set up the PRT with node 1 testing `ATNumAbsolute(ans1*m, -1, 0.1)`. This checks the product of the gradient of the lines is within \(0.1\) of \(-1\) - i.e. are they close to perpendicular. (You could opt for a strict algebraic equivalence `ATAlgEquiv(ans1*m, -1)` if you prefer.) 4. Set up the PRT with node 1 testing `ATNumAbsolute(ans1*m, -1, 0.1)`. This checks the product of the gradient of the lines is within \(0.1\) of \(-1\) - i.e. are they close to perpendicular. (You could opt for a strict algebraic equivalence `ATAlgEquiv(ans1*m, -1)` if you prefer.)
......
...@@ -33,24 +33,24 @@ Notes on using the answer test in STACK. ...@@ -33,24 +33,24 @@ Notes on using the answer test in STACK.
1. The first argument to the test (the "student's answer") must be a string. 1. The first argument to the test (the "student's answer") must be a string.
2. The second argument to the test (the "teacher's answer") must be a list in the form `[allow, deny]` where both `allow` and `deny` are themselves lists of strings. The `allow` list must be non-empty, but the `deny` list could be empty. 2. The second argument to the test (the "teacher's answer") must be a list in the form `[allow, deny]` where both `allow` and `deny` are themselves lists of strings. The `allow` list must be non-empty, but the `deny` list could be empty.
3. The option must be used. Either give the numerical tolerance as a number, or a list of options. The numerical tolerance must be the first element of the options list. 3. The option must be used. Either give the numerical tolerance as a number, or a list of options. The numerical tolerance must be the first element of the options list.
4. By default the test is case-insensitive. If you include the atom `CASE` in the list of options then the matching is case sensitive, potentially increasing the Levenshtein distance between strings. E.g. use answer test option `[0.9, CASE]` for a case-senstive test with a tolerance of 0.9. 4. By default the test is case-insensitive. If you include the atom `CASE` in the list of options then the matching is case sensitive, potentially increasing the Levenshtein distance between strings. E.g. use answer test option `[0.9, CASE]` for a case-sensitive test with a tolerance of 0.9.
5. By default this test consolidates whitespace, e.g. replaces tab and newline characters with a single space, trims whitespace from each end and separates with at most one space character. If you include the atom `WHITESPACE` in the list of options then whitesapace is not consolidated. 5. By default this test consolidates whitespace, e.g. replaces tab and newline characters with a single space, trims whitespace from each end and separates with at most one space character. If you include the atom `WHITESPACE` in the list of options then whitespace is not consolidated.
The current answer test provides feedback indicating which of the allow strings was most similar. The test does not provide feedback indicating which of the deny strings was most similar, but if you can find a use-case which needs deny based feedback please contact the developers and we will add an option. The current answer test provides feedback indicating which of the allow strings was most similar. The test does not provide feedback indicating which of the deny strings was most similar, but if you can find a use-case which needs deny based feedback please contact the developers and we will add an option.
The answernote records the most similar allow string, the most similar deny string and the corresoding tolerance values. It is likley that a teacher will need to examine students' answers in the fist use cycle and fine tune the `allow`, `deny` and tolerance values (perhaps with a regrade) to reach an acceptable level of test reliability: the use of the tolerance means this test is not as objective as some other STACK assessments. The answernote records the most similar allow string, the most similar deny string and the corresponding tolerance values. It is likely that a teacher will need to examine students' answers in the fist use cycle and fine tune the `allow`, `deny` and tolerance values (perhaps with a regrade) to reach an acceptable level of test reliability: the use of the tolerance means this test is not as objective as some other STACK assessments.
It is likely this test will benefit from a wide range of text pre-processing options prior to the test being executed, e.g. using functions from Maxima's stringproc library. For example It is likely this test will benefit from a wide range of text pre-processing options prior to the test being executed, e.g. using functions from Maxima's stringproc library. For example
* remove (ignore) accents and diacritical marks * remove (ignore) accents and diacritical marks
At this point we do not propose to add these as options to the test itself as the pre-processing can be done in the feedback variables as required. However, pre-processing does affect the feedback given by the test and so test options might be very useful. If you create such processing functions and have compelling use-cases we would appreciate an opportinity to document, and support them as core functionality: please contact the developers. At this point we do not propose to add these as options to the test itself as the pre-processing can be done in the feedback variables as required. However, pre-processing does affect the feedback given by the test and so test options might be very useful. If you create such processing functions and have compelling use-cases we would appreciate an opportunity to document, and support them as core functionality: please contact the developers.
## Advice on processing strings in this context. ## Advice on processing strings in this context.
1. To trim whitespace and full stops from each end of a string, you can define `sans1:strim(" .",ans1);` in the feedback variables. 1. To trim whitespace and full stops from each end of a string, you can define `sans1:strim(" .",ans1);` in the feedback variables.
2. STACK provides a function `sremove_chars(rem, st)` which removes all occurances of each _character_ in the string `rem` from the string `st`. For example to remove all selected punctuation characters use `sremove_chars(".,!?", ans1)`. 2. STACK provides a function `sremove_chars(rem, st)` which removes all occurrences of each _character_ in the string `rem` from the string `st`. For example to remove all selected punctuation characters use `sremove_chars(".,!?", ans1)`.
3. STACK provides a function `ssquish` which changes tabs and newlines to spaces; trips whitespace at the ends; and replaces multiple whitespaces with a single whitespace. 3. STACK provides a function `ssquish` which changes tabs and newlines to spaces; trips whitespace at the ends; and replaces multiple whitespace characters with a single whitespace.
## Writing a STACK question ## Writing a STACK question
......
...@@ -22,7 +22,7 @@ We might expect/require two conscious and separate blocks ...@@ -22,7 +22,7 @@ We might expect/require two conscious and separate blocks
2. Assume \(B\), \(\cdots\), hence \(A\). 2. Assume \(B\), \(\cdots\), hence \(A\).
The order in which these two sub-proofs are presented is (normally) irrelevant. That is the _if and only if_ proof construct allows its two sub-proofs to commute. This is precisely the same sense in which \(A=B\) and \(B=A\) are equivalent. There are _blocks_ within the proof which can change order. Furthermore, since proofs are often nested blocks these sub-proofs may themselves have acceptable options for correctness. The order in which these two sub-proofs are presented is (normally) irrelevant. That is the _if and only if_ proof construct allows its two sub-proofs to commute. This is precisely the same sense in which \(A=B\) and \(B=A\) are equivalent. There are _blocks_ within the proof which can change order. Furthermore, since proofs are often nested blocks these sub-proofs may themselves have acceptable options for correctness.
Proofs often contain local variables. Use of explicit block-structres clarify the local scope of variables, and the local scope of assumptions. Proofs often contain local variables. Use of explicit block-structures clarify the local scope of variables, and the local scope of assumptions.
STACK provides ["proof construction functions"](../Proof/Proof_CAS_library.md) with arguments. For example, an if and only if proof would be represented as `proof_iff(A,B)`. Here `A` and `B` are either sub-proofs or strings to be shown to the student. STACK provides ["proof construction functions"](../Proof/Proof_CAS_library.md) with arguments. For example, an if and only if proof would be represented as `proof_iff(A,B)`. Here `A` and `B` are either sub-proofs or strings to be shown to the student.
...@@ -75,7 +75,7 @@ The example question text below contains a Parson's block. Within the header of ...@@ -75,7 +75,7 @@ The example question text below contains a Parson's block. Within the header of
Notes: Notes:
1. The Parson's block requires a JSON object containins `"key":"string"` pairs. The `string` will be shown to the student. The student's answer will be returned in terms of the `key` tags. Numbers can be used as keys, but named keys above will be more specific. We strongly recommend using named keys. 1. The Parson's block requires a JSON object containing `"key":"string"` pairs. The `string` will be shown to the student. The student's answer will be returned in terms of the `key` tags. Numbers can be used as keys, but named keys above will be more specific. We strongly recommend using named keys.
2. The `\` character in the string must be protected! Notice that `\(...\)` needs to be typed as `\\(...\\)`. 2. The `\` character in the string must be protected! Notice that `\(...\)` needs to be typed as `\\(...\\)`.
3. The [Parson's block](../Authoring/Parsons.md) has a wide range of options such as `height` and `width` which are documented elsewhere. 3. The [Parson's block](../Authoring/Parsons.md) has a wide range of options such as `height` and `width` which are documented elsewhere.
...@@ -98,7 +98,7 @@ The student's answer will be a _JSON string_, but we need to interpret which of ...@@ -98,7 +98,7 @@ The student's answer will be a _JSON string_, but we need to interpret which of
Then you can set up the potential response tree to be `ATAlgEquiv(sa,ta)` to confirm the student's answer is the same as the teacher's answer. Then you can set up the potential response tree to be `ATAlgEquiv(sa,ta)` to confirm the student's answer is the same as the teacher's answer.
# Example question 2: a proof with interchangable block order # Example question 2: a proof with interchangeable block order
The following Parson's question is an _if and only if_ proof, containing two blocks in order. The following Parson's question is an _if and only if_ proof, containing two blocks in order.
......
...@@ -53,7 +53,7 @@ The function `verb_logic(ex)` will remove the noun forms such as `nounand` and s ...@@ -53,7 +53,7 @@ The function `verb_logic(ex)` will remove the noun forms such as `nounand` and s
## Answer tests ## Answer tests
The answer tests protect the logical operators. This behaviour is to prevent evaluation of expressions such as `x=1` as a boolean predicate fuction. I.e. the default behaviour is to give priority to the assumption an arbitary expression is an algebraic expression, or a set of equations, inequalities etc. The answer tests protect the logical operators. This behaviour is to prevent evaluation of expressions such as `x=1` as a boolean predicate function. I.e. the default behaviour is to give priority to the assumption an arbitrary expression is an algebraic expression, or a set of equations, inequalities etc.
The answer test `PropLogic` replaces all noun logical expressions with the Maxima versions, and then tests two expressions using the function `logic_equiv` from Maxima's logic package. This answer test does not support sets, lists, etc. The answer test `PropLogic` replaces all noun logical expressions with the Maxima versions, and then tests two expressions using the function `logic_equiv` from Maxima's logic package. This answer test does not support sets, lists, etc.
......
...@@ -43,15 +43,15 @@ Continuing the above example, in the PRT use ...@@ -43,15 +43,15 @@ Continuing the above example, in the PRT use
### Dealing with duplicate entries ### ### Dealing with duplicate entries ###
How do we decide partial credit when there may be duplicates, e.g. eignevalues with repetion? If the teacher's answer is `[1,1,2]` then we can't use the above example based on sets. How do we decide partial credit when there may be duplicates, e.g. eigenvalues with repetition? If the teacher's answer is `[1,1,2]` then we can't use the above example based on sets.
STACK provides a maxima function `list_cancel(l1,l2)` which removes any common elements from `[l1,l2]`, with duplication. E.g. use the following in the quesion variables. STACK provides a maxima function `list_cancel(l1,l2)` which removes any common elements from `[l1,l2]`, with duplication. E.g. use the following in the question variables.
sans:{ans1, ans2}; sans:{ans1, ans2};
[missing, notwanted]:list_cancel([sans, tas]); [missing, notwanted]:list_cancel([sans, tas]);
score:max(1-(length(missing)+length(notwanted))/(2*length(tas)),0); score:max(1-(length(missing)+length(notwanted))/(2*length(tas)),0);
Note that `list_cancel` will not establish algebraic equialence and within this function two expressions are considered the same using maxima's `is(ex1=ex2))`. Hence, some pre-processing of the lists might be needed, depending on the situation and what you consider is the "same". For example if we have Note that `list_cancel` will not establish algebraic equivalence and within this function two expressions are considered the same using maxima's `is(ex1=ex2))`. Hence, some pre-processing of the lists might be needed, depending on the situation and what you consider is the "same". For example if we have
l1:[x^2,x^3,x^2-1,x+x]; l1:[x^2,x^3,x^2-1,x+x];
l2:[x^2,x^4,(x-1)*(x+1),2*x]; l2:[x^2,x^4,(x-1)*(x+1),2*x];
......
# Mathematical topics # Mathematical topics
This section of the STACK documentation contains information on how to author questions in particular mathematics topics. Many topics have differente requirements, e.g. physics needs support for scientific units. These pages contain know-how on linking together features such as [inputs](../Authoring/Inputs.md), [answer tests](../Authoring/Answer_Tests/index.md) and [options](../Authoring/Options.md) to write questions in particular subject areas. This section of the STACK documentation contains information on how to author questions in particular mathematics topics. Many topics have different requirements, e.g. physics needs support for scientific units. These pages contain know-how on linking together features such as [inputs](../Authoring/Inputs.md), [answer tests](../Authoring/Answer_Tests/index.md) and [options](../Authoring/Options.md) to write questions in particular subject areas.
Current topics include: Current topics include:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment