Skip to content

Commit 93e3d8f

Browse files
committed
Allow most input types to become manually graded.
1 parent 91c8373 commit 93e3d8f

15 files changed

Lines changed: 65 additions & 42 deletions

File tree

doc/en/Authoring/Inputs/Input_options.md

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,36 @@ This is reference documentation for the input options.
66

77
This table lists all options, and which inputs use/respect them. The `.` means the option is ignored.
88

9-
Options | Alg | Num | Units | Matrix | Check | Radio | Drop | T/F | TextArea | Equiv | String | Notes
10-
------------------|-----|-----|-------|--------|-------|-------|------|-----|----------|-------|--------|------
11-
Box size | Y | Y | Y | Y | . | . | . | . | Y | Y | Y | Y
12-
Strict Syn | Y | (1) | (1) | Y | . | . | . | . | Y | Y | . | .
13-
Insert stars | Y | Y | Y | Y | . | . | . | . | Y | Y | . | .
14-
Syntax hint | Y | Y | Y | Y | . | . | . | . | Y | Y | Y | Y
15-
Hint att | Y | Y | Y | Y | . | . | . | . | Y | Y | Y | Y
16-
Forbidden words | Y | Y | Y | Y | . | . | . | . | Y | Y | . | .
17-
Allowed words | Y | Y | Y | Y | . | . | . | . | Y | Y | . | .
18-
Forbid float | Y | Y | Y | Y | . | . | . | . | Y | Y | . | .
19-
Lowest terms | Y | Y | Y | Y | . | . | . | . | Y | Y | . | .
20-
Check type | Y | Y | Y | Y | . | . | . | . | . | . | . | .
21-
Must verify | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | .
22-
Show validation | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | .
23-
**Extra options:**| | | | | | | | | | | |
24-
`rationalize` | Y | Y | . | . | . | . | . | . | . | . | . | .
25-
min/max sf/dp | . | Y | Y | . | . | . | . | . | . | . | . | .
26-
`floatnum` | . | Y | . | . | . | . | . | . | . | . | . | .
27-
`intnum` | . | Y | . | . | . | . | . | . | . | . | . | .
28-
`rationalnum` | . | Y | . | . | . | . | . | . | . | . | . | .
29-
`consolidatesubscripts` | Y | . | Y | Y | . | . | . | . | . | . | . | .
30-
`negpow` | . | . | Y | . | . | . | . | . | . | . | . | .
31-
`simp` | Y | Y | Y | Y | . | . | . | . | Y | . | . | .
32-
`align` | Y | Y | Y | . | . | . | . | . | . | . | . | .
33-
`nounits` | Y | Y | Y | Y | Y | Y | Y | . | . | Y | . | .
34-
`checkvars` | Y | . | . | Y | . | . | . | . | . | Y | . | .
35-
`validator` | Y | Y | Y | Y | . | . | . | . | . | . | Y | .
36-
`feedback` | Y | . | Y | Y | . | . | . | . | . | . | . | .
9+
Options | Alg | Num | Units | Matrix | VarMat | Check | Radio | Drop | T/F | TextArea | Equiv | String | Notes | Freetext
10+
------------------|-----|-----|-------|--------|--------|-------|-------|------|-----|----------|-------|--------|-------|---------
11+
Box size | Y | Y | Y | Y | Y | . | . | . | . | Y | Y | Y | Y | Y
12+
Strict Syn | Y | (1) | (1) | Y | Y | . | . | . | . | Y | Y | . | . | .
13+
Insert stars | Y | Y | Y | Y | Y | . | . | . | . | Y | Y | . | . | .
14+
Syntax hint | Y | Y | Y | Y | Y | . | . | . | . | Y | Y | Y | Y | Y
15+
Hint att | Y | Y | Y | Y | Y | . | . | . | . | Y | Y | Y | Y | Y
16+
Forbidden words | Y | Y | Y | Y | Y | . | . | . | . | Y | Y | . | . | .
17+
Allowed words | Y | Y | Y | Y | Y | . | . | . | . | Y | Y | . | . | .
18+
Forbid float | Y | Y | Y | Y | Y | . | . | . | . | Y | Y | . | . | .
19+
Lowest terms | Y | Y | Y | Y | Y | . | . | . | . | Y | Y | . | . | .
20+
Check type | Y | Y | Y | Y | Y | . | . | . | . | . | . | . | . | .
21+
Must verify | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y
22+
Show validation | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y
23+
**Extra options:**| | | | | | | | | | | | | |
24+
`rationalize` | Y | Y | . | . | . | . | . | . | . | . | . | . | . | .
25+
min/max sf/dp | . | Y | Y | . | . | . | . | . | . | . | . | . | . | .
26+
`floatnum` | . | Y | . | . | . | . | . | . | . | . | . | . | . | .
27+
`intnum` | . | Y | . | . | . | . | . | . | . | . | . | . | . | .
28+
`rationalnum` | . | Y | . | . | . | . | . | . | . | . | . | . | . | .
29+
`consolidatesubscripts` | Y | . | Y | Y | Y | . | . | . | . | . | . | . | . | .
30+
`negpow` | . | . | Y | . | . | . | . | . | . | . | . | . | . | .
31+
`simp` | Y | Y | Y | Y | Y | . | . | . | . | Y | . | . | . | .
32+
`align` | Y | Y | Y | . | . | . | . | . | . | . | . | . | . | .
33+
`nounits` | Y | Y | Y | Y | Y | Y | Y | Y | . | . | Y | . | . | .
34+
`checkvars` | Y | . | . | Y | Y | . | . | . | . | . | Y | . | . | .
35+
`validator` | Y | Y | Y | Y | Y | . | . | . | . | . | . | Y | . | Y
36+
`feedback` | Y | . | Y | Y | Y | . | . | . | . | . | . | . | . | .
37+
`monospace` | Y | Y | Y | . | Y | . | . | . | . | . | . | . | . | .
38+
`manualgraded` | Y | Y | Y | Y | Y | . | . | . | . | Y | Y | Y | Y | Y
3739

3840
For documentation about the various options not documented on this page look at the pages for the specific inputs in which each option is used.
3941

@@ -151,6 +153,11 @@ This option is available for algebraic, numerical, units and varmatrix inputs. I
151153

152154
If `monospace` is not specified, then the CURRENT system default for the given input type will be used when the question is displayed.
153155

156+
### Extra option: manualgraded ###
157+
158+
Most input types support the extra option extra option `manualgraded`, and the default is `manualgraded:false`. Only freetext inputs have default `manualgraded:true`. When `manualgraded:true` then the _whole STACK question_ will require manual grading! See [Semi-automatic Marking](../../Moodle/Semi-automatic_Marking.md) for more details.
159+
160+
154161
## Future extra options ##
155162

156163
In the future we are likely to add additional functionality via the _extra options_ fields. This is because the form-based support becomes ever more complex, intimidating and difficult to navigate.

doc/en/Authoring/Inputs/Text_input.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This input is a text area into which students may type whatever they choose. Th
2121
Notes
2222

2323
1. All the notes for "string" inputs above still apply.
24-
2. The freetext input has a special extra option `manualgraded`, and the default option value is `manualgraded:true`. If you specify `manualgraded:false` then the _whole STACK question_ will require manual grading!
24+
2. The freetext input takes the default option value is `manualgraded:true`. If you specify `manualgraded:true` then the _whole STACK question_ will require manual grading!
2525
3. Part of this input can be linked to an automatically graded STACK input, e.g. an algebraic input (final answer), textarea (last lines) or units input.
2626

2727
#### JSON input ####
@@ -30,19 +30,22 @@ The JSXGraph, GeoGebra and Parsons blocks return a JSON object. When linking to
3030

3131
This input gives the _teacher_ a JSON pretty print view of the JSON object for debugging.
3232

33+
### Parsons input ###
34+
35+
A special [Parsons input](../../Specialist_tools/Drag_and_drop/index.md), is available to store the JSON object generated by the Parsons block.
36+
37+
### GeoGebra input ###
38+
39+
A special [GeoGebra input](../../Specialist_tools/GeoGebra/index.md), is available to store the JSON object generated by the GeoGebra block.
40+
3341
#### Notes input ####
3442

3543
This input is a text area into which students may type whatever they choose. It can be used to gather their notes or "working". However, this input is always considered as "invalid", so that any potential response tree which relies on this input will never get evaluated!
3644

3745
This input type can be used for
3846

3947
1. surveys;
40-
2. answers which are not automatically marked, contributing to [semi-automatic marking](../../Moodle/Semi-automatic_Marking.md).
41-
42-
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!
48+
2. answers which are not automatically marked, contributing to [semi-automatic marking](../../Moodle/Semi-automatic_Marking.md). Set the extra option `manualgraded:true`, but note that the _whole STACK question_ will require manual grading!
4349

4450
Note, for consistency with other inputs the teacher must still supply an answer, e.g. the empty string `""`. This answer is not used.
4551

46-
### Parsons input ###
47-
48-
A special [Parsons input](../../Specialist_tools/Drag_and_drop/index.md), is available to store the JSON object generated by the Parsons block.

doc/en/Developer/Development_track.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ Issues with [github milestone 4.13.0](https://github.com/maths/moodle-qtype_stac
1313
2. Support for Maxima 5.47.0, 5.48.0, and 5.49.0. This includes a fix for issue #1281 from 5.48.0.
1414
3. Question tests can now test the whole route through a PRT, rather than just the final node. This is a significant improvement on the ability to test questions. This is back-compatible with older questions.
1515
4. Add in a new "free-text" input to allow student to input typed free-text proof.
16-
17-
--------------------------------------
16+
5. Allow most input types to use the extra option 'manualgraded'.
1817

1918
## Better testing
2019

doc/en/Moodle/Semi-automatic_Marking.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ STACK provides the "free-text" and "notes" [input type](../Authoring/Inputs/Text
1313

1414
## Manual grading.
1515

16-
The free-text and notes inputs have a special extra option `manualgraded`. When `manualgraded:true` then the _whole STACK question_ will require manual grading!
16+
Most input types support the extra option extra option `manualgraded`, and the default is `manualgraded:false`. When `manualgraded:true` then the _whole STACK question_ will require manual grading!
17+
18+
The free-text default extra option `manualgraded:true`.
1719

1820
There really is no way to mix automatic and manually grading within a question. Therefore, if you want automatic and manual marking you have two options.
1921

20-
1. Use separate questions. If you need to serparate out parts to automatic and manually graded parts then you can consider [variant matching](../Deploying_matched_varients) to ensure random parts have the same seed.
22+
1. Use separate questions. If you need to serparate out parts to automatic and manually graded parts then you can consider [variant matching](../STACK_question_admin/Deploying_matched_variants.md) to ensure random parts have the same seed.
2123
2. Manual grade, taking into account some automatic marks when you manually grade.
2224

2325
Once a student has completed the quiz, navigate to

question.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,11 @@ public function make_behaviour(question_attempt $qa, $preferredbehaviour) {
311311
return question_engine::make_behaviour('informationitem', $qa, $preferredbehaviour);
312312
}
313313

314+
// This is an edge case to stop survey items automatically becoming manually graded.
315+
if (empty($this->prts)) {
316+
return question_engine::make_behaviour('manualgraded', $qa, $preferredbehaviour);
317+
}
318+
314319
if ($this->is_manually__graded()) {
315320
return question_engine::make_behaviour('manualgraded', $qa, $preferredbehaviour);
316321
}
@@ -335,9 +340,6 @@ public function make_behaviour(question_attempt $qa, $preferredbehaviour) {
335340
* @return bool
336341
*/
337342
public function is_manually__graded() {
338-
if (empty($this->prts)) {
339-
return true;
340-
}
341343
if (!empty($this->inputs)) {
342344
foreach ($this->inputs as $input) {
343345
if ($input->get_extra_option('manualgraded')) {

stack/input/algebraic/algebraic.class.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class stack_algebraic_input extends stack_input {
3636
'feedback' => false,
3737
'monospace' => false,
3838
'basen' => false,
39+
'manualgraded' => false,
3940
];
4041

4142
// phpcs:ignore moodle.Commenting.MissingDocblock.Function

stack/input/equiv/equiv.class.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class stack_equiv_input extends stack_input {
5454
'calculus' => false,
5555
'consolidatesubscripts' => false,
5656
'checkvars' => 0,
57+
'manualgraded' => false,
5758
];
5859

5960
// phpcs:ignore moodle.Commenting.MissingDocblock.Function

stack/input/geogebra/geogebra.class.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class stack_geogebra_input extends stack_input {
3434
'align' => 'left',
3535
'consolidatesubscripts' => false,
3636
'checkvars' => 0,
37+
'manualgraded' => false,
3738
];
3839

3940
// phpcs:ignore moodle.Commenting.MissingDocblock.Function

stack/input/json/json.class.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class stack_json_input extends stack_string_input {
3333
'hideanswer' => false,
3434
'allowempty' => false,
3535
'validator' => false,
36+
'manualgraded' => false,
3637
];
3738

3839
/**

stack/input/matrix/matrix.class.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class stack_matrix_input extends stack_input {
3737
'checkvars' => 0,
3838
'validator' => false,
3939
'feedback' => false,
40+
'manualgraded' => false,
4041
];
4142

4243
// phpcs:ignore moodle.Commenting.MissingDocblock.Function

0 commit comments

Comments
 (0)