Skip to content
Snippets Groups Projects
Commit 6b7d7853 authored by Malthe Sporring's avatar Malthe Sporring
Browse files

Issue #487

Changes all mentioning of "question versions" to "question variants" for consistency. This includes documentation, code comments and links to "Question tests and deployed variants".
parent 2503f8d6
No related branches found
No related tags found
No related merge requests found
Showing
with 61 additions and 56 deletions
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
// along with Stack. If not, see <http://www.gnu.org/licenses/>. // along with Stack. If not, see <http://www.gnu.org/licenses/>.
/** /**
* This script runs all the quesion tests for all deployed versions of all * This script runs all the quesion tests for all deployed variants of all
* questions in a given context. * questions in a given context.
* *
* @package qtype_stack * @package qtype_stack
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
// along with Stack. If not, see <http://www.gnu.org/licenses/>. // along with Stack. If not, see <http://www.gnu.org/licenses/>.
/** /**
* This script runs all the quesion tests for all deployed versions of all * This script runs all the quesion tests for all deployed variants of all
* questions in all contexts in the Moodle site. This is intended for regression * questions in all contexts in the Moodle site. This is intended for regression
* testing, before you release a new version of STACK to your site. * testing, before you release a new version of STACK to your site.
* *
......
...@@ -33,7 +33,7 @@ This system is the brain child of [Chris Sangwin](mailto:C.J.Sangwin@ed.ac.uk). ...@@ -33,7 +33,7 @@ This system is the brain child of [Chris Sangwin](mailto:C.J.Sangwin@ed.ac.uk).
In STACK a lot of attention has been paid to allowing teachers to author and manage their own questions. The following are the key features. In STACK a lot of attention has been paid to allowing teachers to author and manage their own questions. The following are the key features.
* Question versions are randomly generated within structured templates. * Question variants are randomly generated within structured templates.
* There are many different kinds of inputs. These are, for example, where the student enters a mathematical expression, or makes a true/false selection. * There are many different kinds of inputs. These are, for example, where the student enters a mathematical expression, or makes a true/false selection.
* Mathematical properties of students' answers are established using answer tests within the CAS Maxima. * Mathematical properties of students' answers are established using answer tests within the CAS Maxima.
* Feedback is assigned on the basis of these properties using a potential response tree. This feedback includes: * Feedback is assigned on the basis of these properties using a potential response tree. This feedback includes:
......
...@@ -14,7 +14,7 @@ At the end of this guide you will be able to: ...@@ -14,7 +14,7 @@ At the end of this guide you will be able to:
- Create a new STACK question, ensuring mathematical notation is displayed correctly using \(\LaTeX\) notation. - Create a new STACK question, ensuring mathematical notation is displayed correctly using \(\LaTeX\) notation.
- Catch, and provide feedback on, common errors by building a *Potential Response Tree*. These include forgetting to include the constant of integration or accidentally differentiating instead of integrating. - Catch, and provide feedback on, common errors by building a *Potential Response Tree*. These include forgetting to include the constant of integration or accidentally differentiating instead of integrating.
- Create random versions, and ensure the marking algorithms, feedback and worked solutions reflect the particular version. - Create random variants, and ensure the marking algorithms, feedback and worked solutions reflect the particular variant.
- Preview and test STACK questions. - Preview and test STACK questions.
## Before you begin ## Before you begin
...@@ -218,7 +218,7 @@ Testing questions is time consuming and tedious, but important to ensure questio ...@@ -218,7 +218,7 @@ Testing questions is time consuming and tedious, but important to ensure questio
Scroll to the bottom of the page and press the `[Save changes and continue editing]` button. Press the `Preview` link. Scroll to the bottom of the page and press the `[Save changes and continue editing]` button. Press the `Preview` link.
From the question preview window, click on `Question tests & deployed versions` link in the top right of the page. From the question preview window, click on `Question tests & deployed variants` link in the top right of the page.
Click `Add a test case` to add a test to your question. Fill in the following information Click `Add a test case` to add a test to your question. Fill in the following information
...@@ -390,13 +390,13 @@ which you should use instead of [Maxima](../CAS/Maxima.md)'s random command. The ...@@ -390,13 +390,13 @@ which you should use instead of [Maxima](../CAS/Maxima.md)'s random command. The
### Question note ### ### Question note ###
Now that our question contains random numbers we need to record the actual question version seen by a particular student. Now that our question contains random numbers we need to record the actual question variant seen by a particular student.
As soon as we use the `rand` function STACK forces us to add a _Question note_. As soon as we use the `rand` function STACK forces us to add a _Question note_.
Fill the question note in as Fill the question note in as
\[ \int {@p@}\mathrm{d}x = {@ta@}.\] \[ \int {@p@}\mathrm{d}x = {@ta@}.\]
Two question versions are considered to be the same if and only if the question note is the same. It is the teacher's responsibility to create sensible notes. Two question variants are considered to be the same if and only if the question note is the same. It is the teacher's responsibility to create sensible notes.
### Handling random variables in the Potential Response Tree ### ### Handling random variables in the Potential Response Tree ###
...@@ -409,11 +409,11 @@ We will need to update `TAns` of node 2 of the potential response tree to add in ...@@ -409,11 +409,11 @@ We will need to update `TAns` of node 2 of the potential response tree to add in
So this possible outcome can be used in the potential response tree, question tests and so on by referring to the variable `taw1`. So this possible outcome can be used in the potential response tree, question tests and so on by referring to the variable `taw1`.
Edit your trial question, save and preview it to get new random versions of the question. Edit your trial question, save and preview it to get new random variants of the question.
### Deploying random versions ### ### Deploying random variants ###
Before a student sees the questions it is sensible to deploy random versions. See [deploying](Deploying.md) for more information on this process. Before a student sees the questions it is sensible to deploy random variants. See [deploying](Deploying.md) for more information on this process.
# Next step # # Next step #
......
# Authoring quick start 2: multi-part mathematical questions # Authoring quick start 2: multi-part mathematical questions
This is the second part of the [authoring quick start](Authoring_quick_start.md). The purpose is to write multi-part questions. This is the second part of the [authoring quick start](Authoring_quick_start.md). The purpose is to write multi-part questions.
...@@ -154,7 +158,7 @@ Your answer to this part is correct, however you have got part 1 wrong! Please ...@@ -154,7 +158,7 @@ Your answer to this part is correct, however you have got part 1 wrong! Please
###Stage 3: adding question tests### ###Stage 3: adding question tests###
It is probably sensible to add question tests. From the question preview window, click on `Question tests & deployed versions` link in the top right of the page. It is probably sensible to add question tests. From the question preview window, click on `Question tests & deployed variants` link in the top right of the page.
Add a test to your question which contains the correct answers, as follows. Add a test to your question which contains the correct answers, as follows.
...@@ -189,7 +193,7 @@ Next we can add a randomly generated polynomial to the question. Because we use ...@@ -189,7 +193,7 @@ Next we can add a randomly generated polynomial to the question. Because we use
p : (2+rand(3))*x^3+(2+rand(3))*x^2+(2+rand(3))*x; p : (2+rand(3))*x^3+(2+rand(3))*x^2+(2+rand(3))*x;
You will need to add a non-empty question note to enable grouping of random versions. E.g. the following string will suffice. You will need to add a non-empty question note to enable grouping of random variants. E.g. the following string will suffice.
{@p@} {@p@}
......
...@@ -56,9 +56,9 @@ The particular circumstances will dictate if it is better to have lots of variab ...@@ -56,9 +56,9 @@ The particular circumstances will dictate if it is better to have lots of variab
## The importance of the question note ## ## The importance of the question note ##
Notice in defining `b` we have a quotient which might well "simplify" when fractions cancel. Hence, there is not a one-one correspondence between the values of the random variables and actual question versions. In some situations there may similarly not be a one-one correspondence between the values of specific variables and actual questions. We cannot use the values of the question variables as a unique key to the question versions (although in this case it would be fine because all algebraic cancelling occurs within the definition of `b` and so we end up with a unique key). Notice in defining `b` we have a quotient which might well "simplify" when fractions cancel. Hence, there is not a one-one correspondence between the values of the random variables and actual question variants. In some situations there may similarly not be a one-one correspondence between the values of specific variables and actual questions. We cannot use the values of the question variables as a unique key to the question variants (although in this case it would be fine because all algebraic cancelling occurs within the definition of `b` and so we end up with a unique key).
Hence the teacher must leave a meaningful question note. Two versions of a question are _defined_ to be the same if and only if the question note is the same. Hence the teacher must leave a meaningful question note. Two variants of a question are _defined_ to be the same if and only if the question note is the same.
The question note field is ["CAS text"](CASText.md), just like the question text. We could write something like The question note field is ["CAS text"](CASText.md), just like the question text. We could write something like
...@@ -68,7 +68,7 @@ Or we could leave something more meaningful: ...@@ -68,7 +68,7 @@ Or we could leave something more meaningful:
{@q^n = a^n*(cos(p*%i*%pi)+%i*sin(p*%i*%pi))@} {@q^n = a^n*(cos(p*%i*%pi)+%i*sin(p*%i*%pi))@}
Notice, we probably don't want to evaluate `a^n` here as it isn't likely to be "simpler". It is up to the teacher, but putting the answer in the answer note helps if students come and ask you for the answer to their version of the question... Notice, we probably don't want to evaluate `a^n` here as it isn't likely to be "simpler". It is up to the teacher, but putting the answer in the answer note helps if students come and ask you for the answer to their variant of the question...
## Multi-part question ## ## Multi-part question ##
...@@ -114,7 +114,7 @@ Again, if you want to enforce a test for the principle argument you will need to ...@@ -114,7 +114,7 @@ Again, if you want to enforce a test for the principle argument you will need to
## Question tests ## ## Question tests ##
Please create some question tests! This will save time in the long term, by enabling you to automatically test your question for each random version you wish to deploy. You should create one test case for each outcome you expect. Here, we need Please create some question tests! This will save time in the long term, by enabling you to automatically test your question for each random variant you wish to deploy. You should create one test case for each outcome you expect. Here, we need
ans1:a^n ans1:a^n
ans2:n*b*%pi ans2:n*b*%pi
......
...@@ -37,9 +37,9 @@ To import these questions into your course ...@@ -37,9 +37,9 @@ To import these questions into your course
## Question tests and Deployed variants ## Question tests and Deployed variants
`Question Tests` serve two purposes: (1) to ensure it works and (2) to communicate to others what it does. These mirror "unit tests" in standard software engineering and will check that STACK's processing of a specific response to a particular version of a question that arises, works as you expect it should. At the very least you want to ensure that if the student enters what you think is the correct answer to a particular version of the question then they will get full marks. The tests are set up for a general set of random parameters and then when you `Deploy variants` (see later) each test is checked for each particular version of the question generated. For full documentation see [question tests](Testing.md). `Question Tests` serve two purposes: (1) to ensure it works and (2) to communicate to others what it does. These mirror "unit tests" in standard software engineering and will check that STACK's processing of a specific response to a particular variant of a question that arises, works as you expect it should. At the very least you want to ensure that if the student enters what you think is the correct answer to a particular variant of the question then they will get full marks. The tests are set up for a general set of random parameters and then when you `Deploy variants` (see later) each test is checked for each particular variant of the question generated. For full documentation see [question tests](Testing.md).
Click on the `Preview` icon for the question then click on `Question tests & deployed versions`. This takes you to a page which is unique to the STACK question type, (i.e. no other Moodle question type has these facilities). Click on the `Preview` icon for the question then click on `Question tests & deployed variants`. This takes you to a page which is unique to the STACK question type, (i.e. no other Moodle question type has these facilities).
The primary purpose of this page is to add "[question tests](Testing.md)". This page also allows you to do the following. The primary purpose of this page is to add "[question tests](Testing.md)". This page also allows you to do the following.
...@@ -51,7 +51,7 @@ You can add more test cases by clicking on `Add another test case`. All you the ...@@ -51,7 +51,7 @@ You can add more test cases by clicking on `Add another test case`. All you the
Note, the testing never "simplifies" the input, so you may need to `ev(...,simp)` if you want to simplify the input, or part of an input, before the system assesses it. Note, the testing never "simplifies" the input, so you may need to `ev(...,simp)` if you want to simplify the input, or part of an input, before the system assesses it.
Once you have devised the question tests you need to go to the `Deployed variants` section at the top of the screen and put a number (e.g. 10) in the box `Attempt to deploy the following number of variants` and click `Go`. This enables STACK to produce a set of versions of the question from which an individual question for a student will be chosen at random (questions are not generated on the fly). STACK will check that each version that it generates behaves as it should by running each version through the question tests that you have set up. Success will be indicated by a box saying that `All tests passed!` and failure of a particular version of a question to behave as it should, will be highlighted. STACK doesn't usually manage to be able to produce as many variants as you request before it starts duplicating versions. If STACK produces more than three existing duplicates it gives up. Once you have devised the question tests you need to go to the `Deployed variants` section at the top of the screen and put a number (e.g. 10) in the box `Attempt to deploy the following number of variants` and click `Go`. This enables STACK to produce a set of variants of the question from which an individual question for a student will be chosen at random (questions are not generated on the fly). STACK will check that each variant that it generates behaves as it should by running each variant through the question tests that you have set up. Success will be indicated by a box saying that `All tests passed!` and failure of a particular variant of a question to behave as it should, will be highlighted. STACK doesn't usually manage to be able to produce as many variants as you request before it starts duplicating variants. If STACK produces more than three existing duplicates it gives up.
## Constructing a Moodle quiz ## Constructing a Moodle quiz
......
...@@ -14,8 +14,8 @@ Questions are not randomly generated on the fly. Instead the teacher must pre-g ...@@ -14,8 +14,8 @@ Questions are not randomly generated on the fly. Instead the teacher must pre-g
We have chosen to add the extra deploy step, instead of generating on the fly, for a number of reasons. We have chosen to add the extra deploy step, instead of generating on the fly, for a number of reasons.
1. STACK runs all the question tests on each deployed version to establish each variant of the question is working. This aids quality control. By using question tests it is unlikely a student will be given a random version which does not work correctly. 1. STACK runs all the question tests on each deployed variant to establish each variant of the question is working. This aids quality control. By using question tests it is unlikely a student will be given a random variant which does not work correctly.
2. The teacher can decide if each deployed version appears to be of equal difficulty. The teacher can easily delete variants they do not like. Experience suggests there are unanticipated consequences of randomly generating questions. Really only statistics generated by real use can establish fairness amongst variants. 2. The teacher can decide if each deployed variant appears to be of equal difficulty. The teacher can easily delete variants they do not like. Experience suggests there are unanticipated consequences of randomly generating questions. Really only statistics generated by real use can establish fairness amongst variants.
3. The pre-generation combined with a cache helps minimise server load during the start of a large class which aids robustness of the whole experience. This helps STACK to optimize its use of the CAS for efficiency and reliability via a [dynamic cache](../Developer/Question_state_caching.md). 3. The pre-generation combined with a cache helps minimise server load during the start of a large class which aids robustness of the whole experience. This helps STACK to optimize its use of the CAS for efficiency and reliability via a [dynamic cache](../Developer/Question_state_caching.md).
Notes: Notes:
...@@ -27,7 +27,7 @@ Notes: ...@@ -27,7 +27,7 @@ Notes:
## How to deploy question variants ## ## How to deploy question variants ##
The deployment interface can be found on the top of the [Testing](Testing.md) page. This page also contains the list of currently deployed versions, and links to un-deploy a variant. The deployment interface can be found on the top of the [Testing](Testing.md) page. This page also contains the list of currently deployed variants, and links to un-deploy a variant.
Notes: Notes:
......
...@@ -6,7 +6,7 @@ In some parts of this document we mention "Abacus". The Abacus project is a STAC ...@@ -6,7 +6,7 @@ In some parts of this document we mention "Abacus". The Abacus project is a STAC
The most important things are listed here. More detail is below. The most important things are listed here. More detail is below.
1. Build questions so that it is possible to detect changes in the platform. All questions must have "question tests", which allow unit testing of each question version. 1. Build questions so that it is possible to detect changes in the platform. All questions must have "question tests", which allow unit testing of each question variant.
2. Use simple correct HTML with all closing tags, avoiding explicit style of your own. 2. Use simple correct HTML with all closing tags, avoiding explicit style of your own.
3. Use only simple core LaTeX Maths environments/commands, with only `\(...\)` and `\[...\]` as the maths delimiters. 3. Use only simple core LaTeX Maths environments/commands, with only `\(...\)` and `\[...\]` as the maths delimiters.
4. Avoid linking to externally hosted content, such as pictures and applets. 4. Avoid linking to externally hosted content, such as pictures and applets.
......
...@@ -17,7 +17,7 @@ There are two ways to export STACK questions. ...@@ -17,7 +17,7 @@ There are two ways to export STACK questions.
1. The normal Moodle procedure is to export whole category of questions at one time through the Moodle question bank. To export a selection of questions, you need to move them into a separate category. This can be any mix of STACK and other Moodle questions. You must choose "Moodle XML format" as the file format. 1. The normal Moodle procedure is to export whole category of questions at one time through the Moodle question bank. To export a selection of questions, you need to move them into a separate category. This can be any mix of STACK and other Moodle questions. You must choose "Moodle XML format" as the file format.
2. To export a single STACK question as "Moodle XML format". 2. To export a single STACK question as "Moodle XML format".
1. Preview the question. 1. Preview the question.
2. Follow the link to "Question tests & deployed versions". 2. Follow the link to "Question tests & deployed variants".
3. Export this question. 3. Export this question.
This export mechanism is only available to STACK questions and no other question types in Moodle. This export mechanism is only available to STACK questions and no other question types in Moodle.
......
...@@ -42,7 +42,7 @@ __STACK 3 now uses Maxima's assignment rules. This is a change from STACK 2.__ ...@@ -42,7 +42,7 @@ __STACK 3 now uses Maxima's assignment rules. This is a change from STACK 2.__
## Question variables {#Question_variables} ## Question variables {#Question_variables}
The question variables are evaluated when a version of a question is created. The displayed forms are available to all other [CASText](CASText.md) fields and the values to other parts of the question, e.g. The question variables are evaluated when a variant of a question is created. The displayed forms are available to all other [CASText](CASText.md) fields and the values to other parts of the question, e.g.
* Teacher's answers in [inputs](Inputs.md) are defined in terms of question variables. * Teacher's answers in [inputs](Inputs.md) are defined in terms of question variables.
* [Question note](Question_note.md). * [Question note](Question_note.md).
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
The whole point of STACK is not to use multiple-choice questions, but instead to have the student enter an algebraic expression! The whole point of STACK is not to use multiple-choice questions, but instead to have the student enter an algebraic expression!
That said there are occasions where it is very useful, if not necessary, to use multiple-choice questions in their various forms. That said there are occasions where it is very useful, if not necessary, to use multiple-choice questions in their various forms.
STACK's use of a CAS is then very helpful to generate random versions of multiple-choice questions based on the mathematical values. STACK's use of a CAS is then very helpful to generate random variants of multiple-choice questions based on the mathematical values.
This can also be one input in a multi-part randomly generated question. This can also be one input in a multi-part randomly generated question.
E.g. you might say "which method do you need to integrate \( \sin(x)\cos(x) \)?" and give students the choice of (i) trig functions first, E.g. you might say "which method do you need to integrate \( \sin(x)\cos(x) \)?" and give students the choice of (i) trig functions first,
...@@ -141,7 +141,7 @@ As the Question Note, you might like to consider just taking the first item from ...@@ -141,7 +141,7 @@ As the Question Note, you might like to consider just taking the first item from
{@maplist(first,ta)@}. The correct answer is {@tac@}. {@maplist(first,ta)@}. The correct answer is {@tac@}.
This note stores both the correct answer and the order shown to the student without the clutter of the `true/false` values or the optional display strings. This note stores both the correct answer and the order shown to the student without the clutter of the `true/false` values or the optional display strings.
Remember, random versions of a question are considered to be the same if and only if the question note is the same, Remember, random variants of a question are considered to be the same if and only if the question note is the same,
so the random order must be part of the question note if you shuffle the options. so the random order must be part of the question note if you shuffle the options.
## Constructing MCQ arrays in Maxima ## ## Constructing MCQ arrays in Maxima ##
...@@ -193,11 +193,11 @@ For example, in this question the student has to choose which of the answers are ...@@ -193,11 +193,11 @@ For example, in this question the student has to choose which of the answers are
STACK has helper functions to create MCQ arrays in Maxima. STACK has helper functions to create MCQ arrays in Maxima.
[ta, version] = multiselqn(corbase, numcor, wrongbase, numwrong) [ta, variant] = multiselqn(corbase, numcor, wrongbase, numwrong)
This function takes two lists `corbase` and `wrongbase` and two integers `numcor` and `numwrong`. This function takes two lists `corbase` and `wrongbase` and two integers `numcor` and `numwrong`.
It randomly selects `numcor` from `corbase`, and `numwrong` from `wrongbase` and then creates the MCQ list `ta` with these selections, It randomly selects `numcor` from `corbase`, and `numwrong` from `wrongbase` and then creates the MCQ list `ta` with these selections,
and an answernote `version`. and an answernote `variant`.
The function returns a list with two arguments. The function returns a list with two arguments.
The first argument of the list is the MCQ array, the second is just the list of answers which is useful for the answer note. The first argument of the list is the MCQ array, the second is just the list of answers which is useful for the answer note.
...@@ -213,7 +213,7 @@ For example, the following generates random expressions for an MCQ calculus ques ...@@ -213,7 +213,7 @@ For example, the following generates random expressions for an MCQ calculus ques
ans:diff(ev(trg), x); ans:diff(ev(trg), x);
multisel:multiselqn([ans], 1, wrongbase, 3); multisel:multiselqn([ans], 1, wrongbase, 3);
ta:multisel[1]; ta:multisel[1];
version:multisel[2]; variant:multisel[2];
In the above example there is only one correct answer, so we just select `1` from `[ans]`. In the above example there is only one correct answer, so we just select `1` from `[ans]`.
This is fine, and we then choose three randomly generated wrong answers. This is fine, and we then choose three randomly generated wrong answers.
...@@ -221,33 +221,33 @@ This is fine, and we then choose three randomly generated wrong answers. ...@@ -221,33 +221,33 @@ This is fine, and we then choose three randomly generated wrong answers.
This returns (for example) the values This returns (for example) the values
ta = [[-2*a*x*cos(a*x^2+b),false],[-sin(2*a*x),false],[a*cos(a*x^2+b),false],[-2*a*x*sin(a*x^2+b),true]]; ta = [[-2*a*x*cos(a*x^2+b),false],[-sin(2*a*x),false],[a*cos(a*x^2+b),false],[-2*a*x*sin(a*x^2+b),true]];
version = [-2*a*x*cos(a*x^2+b),-sin(2*a*x),a*cos(a*x^2+b),-2*a*x*sin(a*x^2+b)]; variant = [-2*a*x*cos(a*x^2+b),-sin(2*a*x),a*cos(a*x^2+b),-2*a*x*sin(a*x^2+b)];
The following function does a similar job when we have MCQ display strings. The following function does a similar job when we have MCQ display strings.
[ta, version] = multiselqndisplay(corbase, numcor, wrongbase, numwrong) [ta, variant] = multiselqndisplay(corbase, numcor, wrongbase, numwrong)
For example, here the return values could be For example, here the return values could be
ta = [[3,false,2*a*x*sin(a*x^2+b)],[2,false,a*sin(a*x^2+b)],[5,false,cos(2*a*x)],[1,true,2*a*x*cos(a*x^2+b)]] ta = [[3,false,2*a*x*sin(a*x^2+b)],[2,false,a*sin(a*x^2+b)],[5,false,cos(2*a*x)],[1,true,2*a*x*cos(a*x^2+b)]]
version = [3,2,5,1] variant = [3,2,5,1]
The function `multiselqndisplay` automatically assigns numbers \(1,\cdots, k\) to the `corbase` entries, and then \(k+1,\cdots, n\) to the `wrongbase` entries so that the numbers returned by the input type uniquely map to the entries in the two lists regardless of which random version is generated. These numbers are useful internally, but not for students. The function `multiselqndisplay` automatically assigns numbers \(1,\cdots, k\) to the `corbase` entries, and then \(k+1,\cdots, n\) to the `wrongbase` entries so that the numbers returned by the input type uniquely map to the entries in the two lists regardless of which random variant is generated. These numbers are useful internally, but not for students.
The function `multiselqnalpha` automatically selects the appropriate number of correct and incorrect entries, permutes the list and then assigns strings `"(a)"`, `"(b)"`, `"(c)"` etc. in the correct order. The student's answer will thus be a list of strings (somewhat subverting the whole purpose of STACK in returning a genuine mathematical expression, but this has its place...). The function `multiselqnalpha` automatically selects the appropriate number of correct and incorrect entries, permutes the list and then assigns strings `"(a)"`, `"(b)"`, `"(c)"` etc. in the correct order. The student's answer will thus be a list of strings (somewhat subverting the whole purpose of STACK in returning a genuine mathematical expression, but this has its place...).
[ta, version] = multiselqnalpha(corbase, numcor, wrongbase, numwrong, [dispstyle]) [ta, variant] = multiselqnalpha(corbase, numcor, wrongbase, numwrong, [dispstyle])
For example, here the return values (with inline maths) could be For example, here the return values (with inline maths) could be
ta = [["(a)",false,"<b>(a)</b> \\(-2\\,a\\,x\\,\\sin \\left( a\\,x^2+b \\right)\\)"],["(b)",true,"<b>(b)</b> \\(2\\,a\\,x\\,\\cos \\left( a\\,x^2+b \\right)\\)"],["(c)",false,"<b>(c)</b> \\(\\cos \\left( 2\\,a\\,x \\right)\\)"],["(d)",false,"<b>(d)</b> \\(2\\,a\\,x\\,\\cos \\left( 2\\,a\\,x \\right)\\)"]] ta = [["(a)",false,"<b>(a)</b> \\(-2\\,a\\,x\\,\\sin \\left( a\\,x^2+b \\right)\\)"],["(b)",true,"<b>(b)</b> \\(2\\,a\\,x\\,\\cos \\left( a\\,x^2+b \\right)\\)"],["(c)",false,"<b>(c)</b> \\(\\cos \\left( 2\\,a\\,x \\right)\\)"],["(d)",false,"<b>(d)</b> \\(2\\,a\\,x\\,\\cos \\left( 2\\,a\\,x \\right)\\)"]]
version = [-2*a*x*sin(a*x^2+b),2*a*x*cos(a*x^2+b),cos(2*a*x),2*a*x*cos(2*a*x)] variant = [-2*a*x*sin(a*x^2+b),2*a*x*cos(a*x^2+b),cos(2*a*x),2*a*x*cos(2*a*x)]
Notes Notes
1. The fifth optional argument to ` multiselqnalpha` controls the display style of the LaTeX. Use `"i"` (a string containing `i`) for inline, `"d"` for displayed and `"id"` for inline "displaystyle" (which is the default). 1. The fifth optional argument to ` multiselqnalpha` controls the display style of the LaTeX. Use `"i"` (a string containing `i`) for inline, `"d"` for displayed and `"id"` for inline "displaystyle" (which is the default).
2. Note that the "student's" answer will now be a _string_ such as `"(a)"`. When you construct the PRT you will not need to check against these strings, not the original CAS expressions. 2. Note that the "student's" answer will now be a _string_ such as `"(a)"`. When you construct the PRT you will not need to check against these strings, not the original CAS expressions.
3. The `version` retains the CAS statements, in order. 3. The `variant` retains the CAS statements, in order.
4. Do not use `multiselqnalpha` in conjunction with the `shuffle` option. There is no need as the selection are permuted, and it messes up the order of the choices for the student. 4. Do not use `multiselqnalpha` in conjunction with the `shuffle` option. There is no need as the selection are permuted, and it messes up the order of the choices for the student.
......
...@@ -54,7 +54,7 @@ before being returned to the student as [feedback](Feedback.md) or recorded in t ...@@ -54,7 +54,7 @@ before being returned to the student as [feedback](Feedback.md) or recorded in t
The answer note is a tag which is key for reporting purposes. It is designed to record the outcome of each answer test and the unique path through the The answer note is a tag which is key for reporting purposes. It is designed to record the outcome of each answer test and the unique path through the
tree. This is automatically generated, but can be changed to something meaningful. When looking for identical paths through the tree we have to do tree. This is automatically generated, but can be changed to something meaningful. When looking for identical paths through the tree we have to do
so, regardless of which random numbers were selected in this version of the question given to a particular student. Hence, this string may not depend so, regardless of which random numbers were selected in this variant of the question given to a particular student. Hence, this string may not depend
on any of the variables. on any of the variables.
The answer note is the concatenation of each answer note from the [answer tests](Answer_tests.md) and then the corresponding true/false branch. This The answer note is the concatenation of each answer note from the [answer tests](Answer_tests.md) and then the corresponding true/false branch. This
......
...@@ -5,14 +5,14 @@ The question note is [CASText](CASText.md). The question note is used to decide ...@@ -5,14 +5,14 @@ The question note is [CASText](CASText.md). The question note is used to decide
_Two question variants are equal if and only if the question notes are equal._ _Two question variants are equal if and only if the question notes are equal._
In particular, when we generate statistics about students' attempts we group attempts according to the equality of their question notes. In particular, when we generate statistics about students' attempts we group attempts according to the equality of their question notes.
Two versions are not necessarily different if their [question variables](KeyVals.md#Question_variables) Two variants are not necessarily different if their [question variables](KeyVals.md#Question_variables)
are different, and hence a note is useful. The teacher needs to choose what identifies each unique version - this cannot be automated. are different, and hence a note is useful. The teacher needs to choose what identifies each unique variant - this cannot be automated.
The teacher can also leave useful information about the answer in the question note. The teacher can also leave useful information about the answer in the question note.
For example they might use a note such as For example they might use a note such as
\[ \frac{d}{d{@v@}}{@p@} = {@diff(p,v)@} \] \[ \frac{d}{d{@v@}}{@p@} = {@diff(p,v)@} \]
This is very helpful, particularly when students ask about the version they were given. The teacher only need look at the question note to get both the question, and answer. This is very helpful, particularly when students ask about the variant they were given. The teacher only need look at the question note to get both the question, and answer.
The question note is used when [deploying](Deploying.md) question variants. The question note is used when [deploying](Deploying.md) question variants.
...@@ -10,11 +10,11 @@ We would encourage colleagues to release their materials under a creative common ...@@ -10,11 +10,11 @@ We would encourage colleagues to release their materials under a creative common
# Moodle courses released with STACK # # Moodle courses released with STACK #
STACK is released with a demonstration course which contains hundreds of tested STACK questions. Many have a full worked solution and random versions, and this represents a substantial resource. STACK is released with a demonstration course which contains hundreds of tested STACK questions. Many have a full worked solution and random variants, and this represents a substantial resource.
/qtype_stack/samplequestions/STACK-demo.mbz /qtype_stack/samplequestions/STACK-demo.mbz
You can "restore" this into your version of Moodle. It has a number of quizzes, pre-created with questions and deployed versions. It also has a large question bank, with questions not arranged into quizzes. You can "restore" this into your version of Moodle. It has a number of quizzes, pre-created with questions and deployed variants. It also has a large question bank, with questions not arranged into quizzes.
# Materials released with STACK # # Materials released with STACK #
......
...@@ -21,12 +21,12 @@ __Minimal requirements__ ...@@ -21,12 +21,12 @@ __Minimal requirements__
* Can "validation" help, e.g. by telling students how many significant figures are expected? (See the "numbers" input type.) * Can "validation" help, e.g. by telling students how many significant figures are expected? (See the "numbers" input type.)
4. Use question variable stubs throughout, to enable efficient random generation. (E.g. define the correct answer in question variables, rather than hard-wiring a specific expression). 4. Use question variable stubs throughout, to enable efficient random generation. (E.g. define the correct answer in question variables, rather than hard-wiring a specific expression).
5. Always make sure the question marks the correct answer as correct! 5. Always make sure the question marks the correct answer as correct!
6. Add question tests for one correct and at least one incorrect version. (See below.) 6. Add question tests for one correct and at least one incorrect variant. (See below.)
7. Check all options in the question, inputs and PRTs. 7. Check all options in the question, inputs and PRTs.
__Phase 1__ __Phase 1__
1. Minimal random versions. 1. Minimal random variants.
2. Worked solution ("General feedback") reflecting the random variables. 2. Worked solution ("General feedback") reflecting the random variables.
3. Consider likely mistakes, and add feedback to test for this. 3. Consider likely mistakes, and add feedback to test for this.
4. Add at least one question test to test for each eventuality identified above. 4. Add at least one question test to test for each eventuality identified above.
...@@ -38,7 +38,7 @@ Use data obtained from one cycle of attempts by students. ...@@ -38,7 +38,7 @@ Use data obtained from one cycle of attempts by students.
1. Did the question operate correctly? E.g. were correct answers correctly marked, and incorrect answers rejected? 1. Did the question operate correctly? E.g. were correct answers correctly marked, and incorrect answers rejected?
2. What did students get wrong? Is there a reason for these answers such as a common misconception? If so, add nodes to the PRTs to test for this and improve feedback. 2. What did students get wrong? Is there a reason for these answers such as a common misconception? If so, add nodes to the PRTs to test for this and improve feedback.
3. Add further question tests to test each misconception. 3. Add further question tests to test each misconception.
4. Is there any significant difference between random versions? 4. Is there any significant difference between random variants?
## Testing for quality control ## ## Testing for quality control ##
...@@ -71,7 +71,7 @@ In this way, the teacher can record, within the question itself, how they expect ...@@ -71,7 +71,7 @@ In this way, the teacher can record, within the question itself, how they expect
2. From the Question bank, choose the _Preview_ option. 2. From the Question bank, choose the _Preview_ option.
3. The _Preview question_ window will open. If you have authority to edit the question, then the top right of the question window will contain a link to _Run the question tests..._. Follow this link. 3. The _Preview question_ window will open. If you have authority to edit the question, then the top right of the question window will contain a link to _Run the question tests..._. Follow this link.
4. This page manages both question tests and deployed variants. Initially you will have no tests or deployed variants. At the bottom of this page choose _Add a test case..._ 4. This page manages both question tests and deployed variants. Initially you will have no tests or deployed variants. At the bottom of this page choose _Add a test case..._
5. Specify values for each input. This may use the question variables. The values of these variables will be used for any random versions. 5. Specify values for each input. This may use the question variables. The values of these variables will be used for any random variants.
6. Specify the expected outcomes for each potential response tree. This includes the score, penalty and answer note. _Note_: currently only the last Answer Note, not the whole path through the potential response tree, is examined. This is a limitation. 6. Specify the expected outcomes for each potential response tree. This includes the score, penalty and answer note. _Note_: currently only the last Answer Note, not the whole path through the potential response tree, is examined. This is a limitation.
7. Once you have added the test case, STACK will automatically validate and submit these responses and display the outcomes. 7. Once you have added the test case, STACK will automatically validate and submit these responses and display the outcomes.
8. You may add as many test cases are you need. It is sensible to add in 8. You may add as many test cases are you need. It is sensible to add in
......
...@@ -35,7 +35,7 @@ The only field which is compulsory is in **bold**. ...@@ -35,7 +35,7 @@ The only field which is compulsory is in **bold**.
| [Question variables](KeyVals.md#Question_variables) | [Question Variables](KeyVals.md#Question_variables) | These are potentially random variables which can be used to generate a question. | [Question variables](KeyVals.md#Question_variables) | [Question Variables](KeyVals.md#Question_variables) | These are potentially random variables which can be used to generate a question.
| [Question text](CASText.md#question_text) | [CASText](CASText.md) | This is the question the student actually sees | [Question text](CASText.md#question_text) | [CASText](CASText.md) | This is the question the student actually sees
| [General feedback](CASText.md#General_feedback) | [CASText](CASText.md) | The worked solution is only available after an item is closed. | [General feedback](CASText.md#General_feedback) | [CASText](CASText.md) | The worked solution is only available after an item is closed.
| [Question note](Question_note.md) | [CASText](CASText.md) | Two randomly generated question versions are different, if and only if the question note is different. Use this field to store useful information which distinguishes versions. | [Question note](Question_note.md) | [CASText](CASText.md) | Two randomly generated question variants are different, if and only if the question note is different. Use this field to store useful information which distinguishes variants.
| [Inputs](Inputs.md) | | The inputs are the things, such as form boxes, with which the student actually interacts. | [Inputs](Inputs.md) | | The inputs are the things, such as form boxes, with which the student actually interacts.
| [Potential response trees](Potential_response_trees.md) | | These are the algorithms which establish the mathematical properties of the students' answers and generate feedback. | [Potential response trees](Potential_response_trees.md) | | These are the algorithms which establish the mathematical properties of the students' answers and generate feedback.
| [Options](Options.md) | Options | Many behaviours can be changed with the options. | [Options](Options.md) | Options | Many behaviours can be changed with the options.
...@@ -46,7 +46,7 @@ The only field which is compulsory is in **bold**. ...@@ -46,7 +46,7 @@ The only field which is compulsory is in **bold**.
* [Answer tests](Answer_tests.md), * [Answer tests](Answer_tests.md),
* [Frequently Asked Questions](Author_FAQ.md), * [Frequently Asked Questions](Author_FAQ.md),
* [KeyVals](KeyVals.md) * [KeyVals](KeyVals.md)
* [Deploying question versions](Deploying.md) * [Deploying question variants](Deploying.md)
* Specific adaptations of [Maxima](../CAS/Maxima.md). * Specific adaptations of [Maxima](../CAS/Maxima.md).
* [Import and Export](ImportExport.md) of STACK questions. * [Import and Export](ImportExport.md) of STACK questions.
* [Question blocks](Question_blocks.md) * [Question blocks](Question_blocks.md)
......
...@@ -4,7 +4,7 @@ STACK can generate structured random objects. STACK provides a [Maxima](Maxima. ...@@ -4,7 +4,7 @@ STACK can generate structured random objects. STACK provides a [Maxima](Maxima.
**Note:** it is important not to use Maxima's own `random()` function. **Note:** it is important not to use Maxima's own `random()` function.
STACK creates pseudo-random numbers from a definite seed. STACK creates pseudo-random numbers from a definite seed.
This ensures that when a particular student returns they see the same version of the question. This ensures that when a particular student returns they see the same variant of the question.
Hence, STACK provides its own function `rand()`. Hence, STACK provides its own function `rand()`.
For the purposes of learning and teaching, we do not need an algorithm which is statistically perfect. For the purposes of learning and teaching, we do not need an algorithm which is statistically perfect.
......
...@@ -110,7 +110,7 @@ How do we do the following in Maxima? ...@@ -110,7 +110,7 @@ How do we do the following in Maxima?
factor(radcan((x-1)*(k*(x-1))^a)) factor(radcan((x-1)*(k*(x-1))^a))
Maxima's internal representation of an expression sometimes does not correspond with what you expect -- in that case, `dispform` may help to bring it into the form you expect. For example, the output of `solve` in the following code shows the \(b\) in the denominator as \(b^{-1}\) which gives unnatural-looking output when a value is substituted in -- this is fixed by using `dispform` and substituting into that version instead. Maxima's internal representation of an expression sometimes does not correspond with what you expect -- in that case, `dispform` may help to bring it into the form you expect. For example, the output of `solve` in the following code shows the \(b\) in the denominator as \(b^{-1}\) which gives unnatural-looking output when a value is substituted in -- this is fixed by using `dispform` and substituting into that variants instead.
simp:true; simp:true;
eqn:b = 1/(6*a+3); eqn:b = 1/(6*a+3);
...@@ -183,7 +183,7 @@ You probably then want to make sure a student has "gathered" like terms. In par ...@@ -183,7 +183,7 @@ You probably then want to make sure a student has "gathered" like terms. In par
\[ 2\sqrt{5}-3 \mbox{ or } \sqrt{20}-3\] \[ 2\sqrt{5}-3 \mbox{ or } \sqrt{20}-3\]
but not \[ 5+4\sqrt{2}-2\sqrt{2}+6.\] but not \[ 5+4\sqrt{2}-2\sqrt{2}+6.\]
This causes a problem because `ATComAss` thinks that \[ 2\sqrt{5}-3 \neq \sqrt{20}-3.\] This causes a problem because `ATComAss` thinks that \[ 2\sqrt{5}-3 \neq \sqrt{20}-3.\]
So you can't use `ATComAss` here, and guarantee that all random versions will work by testing that we really have \(5+4\sqrt{2}\) for example. So you can't use `ATComAss` here, and guarantee that all random variants will work by testing that we really have \(5+4\sqrt{2}\) for example.
What we really want is for the functions `sqrt` and `+` to appear precisely once in the student's answer, or that the answer is a sum of two things. What we really want is for the functions `sqrt` and `+` to appear precisely once in the student's answer, or that the answer is a sum of two things.
......
...@@ -59,7 +59,7 @@ Released August 2017. ...@@ -59,7 +59,7 @@ Released August 2017.
This is a bug-fix release, mostly associated with the upgrade process from version 3.X to 4.X. This is a bug-fix release, mostly associated with the upgrade process from version 3.X to 4.X.
* Fix a bug in the upgrade script. * Fix a bug in the upgrade script.
* Fix a bug in the testing procedure in the "question test" script, and improve the way deployed versions are tested. * Fix a bug in the testing procedure in the "question test" script, and improve the way deployed variants are tested.
* Make SVG the default image format for pictures created by Maxima. (Old .png code left in place in this release, but no user option to access this functionality.) * Make SVG the default image format for pictures created by Maxima. (Old .png code left in place in this release, but no user option to access this functionality.)
## STACK 4.0 ## STACK 4.0
...@@ -136,7 +136,7 @@ Numerous minor bug fixes and improvements, particularly with numerical tests and ...@@ -136,7 +136,7 @@ Numerous minor bug fixes and improvements, particularly with numerical tests and
Numerous minor bug fixes and improvements. Numerous minor bug fixes and improvements.
1. Added an export mechanism for single stack questions through a link on the "Question tests & deployed versions" page. 1. Added an export mechanism for single stack questions through a link on the "Question tests & deployed variant" page.
2. Modify the text area input so that each line is validated separately. 2. Modify the text area input so that each line is validated separately.
3. Support for plot2d "label" command. 3. Support for plot2d "label" command.
4. Added support for `grid2d` for plot in newer versions of Maxima only. 4. Added support for `grid2d` for plot in newer versions of Maxima only.
...@@ -181,6 +181,7 @@ This contains numerous minor bug fixes and improvements. ...@@ -181,6 +181,7 @@ This contains numerous minor bug fixes and improvements.
8. Reinstate the STACK 2 feature called "Hints". This has been done as a "Fact sheet" to avoid ambiguity with other Moodle features. See [Fact sheet](../Authoring/Fact_sheets.md) documentation. 8. Reinstate the STACK 2 feature called "Hints". This has been done as a "Fact sheet" to avoid ambiguity with other Moodle features. See [Fact sheet](../Authoring/Fact_sheets.md) documentation.
9. Better install (auto OS detection), healthcheck and testing. 9. Better install (auto OS detection), healthcheck and testing.
10. When using the Maxima Pool servlet, it is now possible to use any type of HTTP authentication 10. When using the Maxima Pool servlet, it is now possible to use any type of HTTP authentication
(e.g. basic or digest), and there is a separate configuration option, so that you don't need to put the username and password in the URL. (e.g. basic or digest), and there is a separate configuration option, so that you don't need to put the username and password in the URL.
...@@ -328,7 +329,7 @@ At this point STACK will be "ready" for use with students, although not all feat ...@@ -328,7 +329,7 @@ At this point STACK will be "ready" for use with students, although not all feat
5. Immediate feedback with CBM - no unit tests, but if the others work, this one must. 5. Immediate feedback with CBM - no unit tests, but if the others work, this one must.
3. Add sample_questions, and update question banks for STACK 3.0. 3. Add sample_questions, and update question banks for STACK 3.0.
4. Improve the way questions are deployed. 4. Improve the way questions are deployed.
1. Only deploy new versions. 1. Only deploy new variants.
5. Editing form: a way to remove a given PRT node. 5. Editing form: a way to remove a given PRT node.
6. Fix bug: penalties and other fields being changed from NULL to 0 when being stored in the database. 6. Fix bug: penalties and other fields being changed from NULL to 0 when being stored in the database.
7. Add back Matrix input type. 7. Add back Matrix input type.
...@@ -342,7 +343,7 @@ Once completed we are ready for the **Beta release!** ...@@ -342,7 +343,7 @@ Once completed we are ready for the **Beta release!**
2. Eliminate as many TODOs from the code as possible. 2. Eliminate as many TODOs from the code as possible.
3. Add back other translations from STACK 2.0, preserving as many of the existing strings as possible. NOTE: the new format of the language strings containing parameters. In particular, strings {$a[0]} need to be changed to {$a->m0}, etc. 3. Add back other translations from STACK 2.0, preserving as many of the existing strings as possible. NOTE: the new format of the language strings containing parameters. In particular, strings {$a[0]} need to be changed to {$a->m0}, etc.
4. Add back all questions from the diagnostic quiz project as further examples. 4. Add back all questions from the diagnostic quiz project as further examples.
5. Deploy many versions at once. 5. Deploy many variants at once.
#### Editing form #### Editing form
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment