Ausdrücke
Eingabefelder für mathematische Ausdrücke können mit dem Eingabetyp expression
im input
Element erzeugt werden.
Die Eingaben in diesem Feld werden mit Hilfe des Computeralgebrasystems ausgewertet und mit der im XML angegebenen Lösung verglichen.
Example
Attribute
Das expression
Element unterstützt die folgenden Attribute:
Attribut | Typ | Standardwert | Beschreibung |
---|---|---|---|
credits |
xs:nonNegativeInteger |
1 |
Number of credit points the user gets awarded for this input value. |
expanded |
xs:boolean |
- | If this attribute is set to true, the expression entered by the user must be fully expanded for this field to be correct. This means that the collections of node types and node values appearing in the user expression tree and the expression tree of its expanded form must agree without order but with counting. |
expect |
ExpressionNodeTypeList | All |
- | Whitespace-separated list of expression node types that are allowed for the root node of the expression, or the special value "all" which means that all types are allowed for the root element. |
model |
xs:Name |
- | Name of the model to use for this input value. If this attribute is not set, the input model associated to the input field containing this input value is used. |
simplified |
xs:boolean |
- | If this attribute is set to true, the expression entered by the user must be simplified for this field to be correct. This means that the collections of node types and node values appearing in the user expression tree and the expression tree of its simplification must agree without order but with counting. |
testmode |
ExpressionTestMode |
- | The test mode defines in what way the expression entered by the user is compared with the expression in the solution. By default, they must be equal. |
usenot |
ExpressionNodeTypeList |
- | Whitespace-separated list of expression node types that are forbidden to occur in the expression. |
useonce |
ExpressionNodeTypeList |
- | Whitespace-separated list of expression node types that have to appear exactly once in the expression. |
useonly |
ExpressionNodeTypeList | All |
- | Whitespace-separated list of expression node types that are allowed to appear in the expression or the special value "all", which means that all types are allowed. |