Closed Famondir closed 3 years ago
The screenshot in #555 is from a prototype of "input2" a system under development and intended to replace the whole input system of STACK. As it is quite a major rewrite of a core system we are not yet happy enough to start plugging it to STACK and it stays on the Stateful side for some more testing.
"varmatrix" will surely be an input type in the next system as well, but the version in the screenshot is probably going to be the one that will be used more, especially when working with data-entry style questions. Unfortunately, the covid times have slowed development down quite a lot on this and many other things in the pipeline so I won't be throwing any estimates about when it will eventually get to STACK maybe STACK 5 would be the version that would have it but when that happens is an open question.
Just to confuse people, below is the schema for all the options the input2 version of a matrix input has, if after reading that through you happen to have ideas for other details that might be nice to tune I would be happy to hear about them as I try to make the input-types in input2 as flexible as possible so that we can have fewer input types and allow them to adapt further, even if it means that the list of options is long...
"matrix": {
"type": "object",
"properties": {
"allow-empty": {
"default": false,
"type": "boolean",
"title": "Allow empty",
"description": "empty value for this field is valid and interpreted to contain the token EMPTYANSWER"
},
"hide-answer": {
"default": false,
"type": "boolean",
"title": "Hide field",
"description": "hides this fields answer from input values shown in short form logging and similar, for use with scripting"
},
"guidance-label": {
"default": "$INPUT_NAME",
"type": "string",
"title": "Guidance label",
"description": "a verbal label for this input for ARIA and other use"
},
"syntax-hint": {
"default": "",
"type": "string",
"title": "Syntax hint",
"description": "any value you want to show in the field as a hint"
},
"no-units": {
"default": false,
"type": "boolean",
"title": "No units",
"description": "The input value of this input does not contain \"units\", will not check for case-sensitivity issues related to units"
},
"syntax-hint-type": {
"default": 1,
"type": "integer",
"oneOf": [
{
"enum": [
0
],
"description": "Value"
},
{
"enum": [
1
],
"description": "Placeholder"
}
],
"title": "Type of syntax hint",
"description": "the type of rendering used for a syntax hint if any is provided"
},
"validation-box": {
"default": "automatic with list of variables",
"type": "string",
"title": "Type of validation rendering",
"description": "should validation be rendered, how it should be rendered, either through automated messages or customised ones"
},
"must-verify": {
"default": true,
"type": "boolean",
"title": "Must validate",
"description": "requires that the student sees the validation before the input is accepted"
},
"input-width": {
"type": "integer",
"minimum": 1,
"maximum": 80,
"default": 15,
"title": "Width",
"description": "the width of this input field"
},
"allow-words": {
"default": "",
"type": "string",
"title": "Allow words",
"description": "allows some typically forbidden functions and identifiers for the student"
},
"forbid-words": {
"default": "",
"type": "string",
"title": "Forbid words",
"description": "forbids some typically allowed functions and identifiers from the student"
},
"forbid-floats": {
"default": true,
"type": "boolean",
"title": "Forbid floating point numbers",
"description": "forbids values containing decimal points and the floating point version of scientific notation"
},
"forbid-strings": {
"default": true,
"type": "boolean",
"title": "Forbid strings",
"description": "no <code>\"strings\"</code> are allowed in the input"
},
"forbid-lists": {
"default": false,
"type": "boolean",
"title": "Forbid lists",
"description": "no <code>[lists]</code> are allowed in the input, also affects matrices etc."
},
"forbid-sets": {
"default": false,
"type": "boolean",
"title": "Forbid sets",
"description": "no <code>{sets}</code> are allowed in the input"
},
"forbid-groups": {
"default": false,
"type": "boolean",
"title": "Forbid grouping",
"description": "no <code>(g+r-o/u.p*s)</code> are allowed in the input, applies to all use of parenthesis beyond function calls"
},
"forbid-functions": {
"default": "nothing",
"type": "string",
"oneOf": [
{
"enum": [
"nothing"
],
"description": "Do nothing to functions"
},
{
"enum": [
"split_unknown_functions"
],
"description": "Disable unknown"
},
{
"enum": [
"split_all_functions"
],
"description": "Disable all"
},
{
"enum": [
"forbid_unknown_functions"
],
"description": "Forbid unknown"
},
{
"enum": [
"forbid_all_functions"
],
"description": "Forbid all"
}
],
"title": "Forbid/split functions",
"description": "Disable function calls by turning them to multiplications or forbid them, either for all functions or unknown functions."
},
"fix-spaces": {
"default": false,
"type": "boolean",
"title": "Fix spaces",
"description": "allow fixing of spaces"
},
"fix-stars": {
"default": false,
"type": "boolean",
"title": "Fix stars",
"description": "allow fixing by adding stars"
},
"split-number-letter-boundary": {
"default": true,
"type": "boolean",
"title": "Number-letter boundaries",
"description": "split variables at number letter boundaries, assume a missing multiplication sign"
},
"split-prefixes-from-functions": {
"default": true,
"type": "boolean",
"title": "Prefixes of known functions",
"description": "split prefixes from known functions"
},
"split-implied-variables": {
"default": true,
"type": "boolean",
"title": "Implied variables",
"description": "identifiers used as both variable and function-identifiers will be considered as variables"
},
"split-to-single-letter-variables": {
"default": false,
"type": "boolean",
"title": "Single letter variables",
"description": "unknown variable-identifiers are split to known ones or all the way to single letter ones"
},
"require-lowest-terms": {
"default": false,
"type": "boolean",
"title": "Lowest terms",
"description": "fractions must be expressed in lowest terms, i.e. simplified"
},
"input-align": {
"default": "browser default",
"type": "string",
"oneOf": [
{
"enum": [
"left"
],
"description": "Left"
},
{
"enum": [
"right"
],
"description": "Right"
},
{
"enum": [
"browser default"
],
"description": "Default"
}
],
"title": "Text align",
"description": "Alignment of the value inputted in the input box"
},
"matrix-min-columns": {
"type": "string",
"default": "",
"title": "Columns min",
"description": "minimum number of columns if different than maximum input allows adding of columns, does not apply in \"data\"-mode, if empty uses the teachers answers size"
},
"matrix-init-columns": {
"type": "string",
"default": "",
"title": "Columns initial",
"description": "initial number of columns for when the number of columns is modifiable, does not apply in \"data\"-mode, if empty uses the teachers answers size"
},
"matrix-max-columns": {
"type": "string",
"default": "",
"title": "Columns max",
"description": "maximum number of columns if different than minimum input allows adding of columns, does not apply in \"data\"-mode, if empty uses the teachers answers size"
},
"matrix-min-rows": {
"type": "string",
"default": "",
"title": "Rows min",
"description": "minimum number of rows if different than maximum input allows adding of rows, if empty uses the teachers answers size"
},
"matrix-init-rows": {
"type": "string",
"default": "",
"title": "Rows initial",
"description": "initial number of rows for when the number if rows is modifiable, if empty uses the teachers answers size"
},
"matrix-max-rows": {
"type": "string",
"default": "",
"title": "Rows max",
"description": "maximum number of rows if different than minimum input allows adding of rows, if empty uses the teachers answers size"
},
"matrix-mode": {
"default": "algebraic",
"type": "string",
"oneOf": [
{
"enum": [
"algebraic"
],
"description": "Algebraic"
},
{
"enum": [
"data"
],
"description": "Data"
}
],
"title": "Operation mode",
"description": "the operation mode of this input, in the \"algebraic\"-mode all cells are identical algebraic style inputs, in \"data\"-mode each column is separately controlled"
},
"matrix-wrap-left": {
"default": "default",
"type": "string",
"oneOf": [
{
"enum": [
"default"
],
"description": "Question default"
},
{
"enum": [
"("
],
"description": "("
},
{
"enum": [
"["
],
"description": "["
},
{
"enum": [
"{"
],
"description": "{"
},
{
"enum": [
"|"
],
"description": "|"
},
{
"enum": [
""
],
"description": "none"
},
{
"enum": [
"1...N."
],
"description": "Numbered top to bottom"
},
{
"enum": [
"N...1."
],
"description": "Numbered bottom up"
}
],
"title": "Left wrapper",
"description": "the left border symbol/label if any"
},
"matrix-wrap-right": {
"default": "default",
"type": "string",
"oneOf": [
{
"enum": [
"default"
],
"description": "Question default"
},
{
"enum": [
")"
],
"description": ")"
},
{
"enum": [
"]"
],
"description": "]"
},
{
"enum": [
"}"
],
"description": "}"
},
{
"enum": [
"|"
],
"description": "|"
},
{
"enum": [
""
],
"description": "none"
},
{
"enum": [
"1...N."
],
"description": "Numbered top to bottom"
},
{
"enum": [
"N...1."
],
"description": "Numbered bottom up"
}
],
"title": "Right wrapper",
"description": "the right border symbol/label if any"
},
"matrix-wrap-top": {
"default": "labels",
"type": "string",
"oneOf": [
{
"enum": [
"labels"
],
"description": "Column labels"
},
{
"enum": [
""
],
"description": "none"
},
{
"enum": [
"1...N."
],
"description": "Numbered left to right"
},
{
"enum": [
"N...1."
],
"description": "Numbered right to left"
}
],
"title": "Top wrapper",
"description": "the top border labelling, by default shows column labels in \"data\"-mode"
},
"matrix-wrap-bottom": {
"default": "",
"type": "string",
"oneOf": [
{
"enum": [
"labels"
],
"description": "Column labels"
},
{
"enum": [
""
],
"description": "none"
},
{
"enum": [
"1...N."
],
"description": "Numbered left to right"
},
{
"enum": [
"N...1."
],
"description": "Numbered right to left"
}
],
"title": "Bottom wrapper",
"description": "the bottom border labelling, by default blank"
},
"matrix-column-lines": {
"default": false,
"type": "boolean",
"title": "Column lines",
"description": "draws lines between columns"
},
"matrix-columns": {
"default": [],
"type": "array",
"uniqueItems": false,
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"title": "label/title for this column"
},
"type": {
"type": "string",
"title": "type of operation for this columns inputs",
"oneOf": [
{
"enum": [
"algebraic"
],
"description": "Algebraic"
},
{
"enum": [
"numeric"
],
"description": "Numeric"
},
{
"enum": [
"unit"
],
"description": "Units"
}
],
"default": "algebraic"
},
"sf-min": {
"type": "string",
"title": "require minimum of N significant-figures for inputs of this column",
"default": ""
},
"sf-max": {
"type": "string",
"title": "require maximum of N significant-figures for inputs of this column",
"default": ""
},
"dp-min": {
"type": "string",
"title": "require minimum of N decimal-places for inputs of this column",
"default": ""
},
"dp-max": {
"type": "string",
"title": "require maximum of N decimal-places for inputs of this column",
"default": ""
}
},
"required": [
"label"
]
},
"title": "Column definitions",
"description": "in \"data\"-mode each column can have a label and a separate type with separate precision requirements"
}
}
},
Hi, I had trouble finding documentation on the input type varmatrix. I found it mentioned in this issue but when I used it I realised now it's just a text field where you seperate the values by space. But this makes it kinda hard to label the columns (or rows).
Is there a way to get a varmatrix in the style from issue #555 ? Or will there be the option in future? Or will it just stay as the free text field?
Sincerely Simon