Mixins provided by mtrchk.org.momotor.lti.mixins¶
- checklet mixin class mtrchk.org.momotor.lti.mixins.feedback.FeedbackOptionMixin¶
A Checklet mixin that adds feedback options to a step. Different feedback can be prepended to the report when the step passes or fails.
- feedback-pass option¶
Feedback to prepend to the report property when this step passes.
Can contain reference placeholders and task id placeholders.
- Type:
Any
- Required:
False
- Multiple:
False
- Location:
config, step, recipe
- Default:
No default
- feedback-fail option¶
Feedback to prepend to the report property when this step fails.
Can contain reference placeholders and task id placeholders.
- Type:
Any
- Required:
False
- Multiple:
False
- Location:
config, step, recipe
- Default:
No default
- checklet mixin class mtrchk.org.momotor.lti.mixins.label.LabelOptionMixin¶
A Checklet mixin that adds a label property to the result.
The label can contain reference placeholders and task id placeholders
- label option¶
Label for this step. Momotor LTI uses labels as the header of the step in the result view. If a step does not have a label, Momotor LTI will use the step id as the label.
Can contain reference placeholders and task id placeholders.
- Type:
Any
- Required:
False
- Multiple:
False
- Location:
config, step, recipe
- Default:
No default
- checklet mixin class mtrchk.org.momotor.lti.mixins.outputfile.OutputFileOptionMixin¶
A Checklet mixin that adds commonly used functionality to capture output from a step into a file node.
- output-file option¶
This option defines the file or property that will contain the contents of an output file generated by the step. The syntax is:
output-file-option ::= [ "$" ][ name ] ":" [ output-class-name | "%" output-property-name ]
The left hand side (before the colon) defines the file name. If only name is provided, a file with that name is expected to exist in the step workdir after running the step. If value starts with
$, a unique file name is generated. If a name follows the$, the generated file name is stored in an environment variable with that name.The right hand side (after the colon) is either an output file class name, or a
%followed by a property name. The contents of the file are provided to the next steps through either a file with the given class, or a property with the given name.Example values:
output.txt:output: expects file output.txt in the step workdir and creates a file node with class output with the contents of the output.txt fileoutput.txt:%output: expects file output.txt in the step workdir and creates a property output with the contents of the output.txt file$OUTPUT_FILE:output: creates an empty file with a unique file name and stores that file name in an environment variableOUTPUT_FILEbefore the step is executed. After the step finishes, a file node with class output is created with the contents of the file.
Can contain reference placeholders and task id placeholders.
- Type:
Any
- Required:
False
- Multiple:
True
- All:
False
- Location:
config, step, recipe
- Default:
No default
- output-file-missing option¶
Action to take and optional message if the output file expected by the
output-fileoption does not exist.Action can be one of:
ignore: Do nothingfail: Fail the stepfail-secret: Fail the step marking the step as secretfail-hidden: Fail the step marking the step as hiddenerror: Raise a CheckletErrorwarn: Log a warning
The action can be followed by a message that will be logged or included in the report.
- Type:
string
- Required:
False
- Multiple:
False
- Location:
config, step, recipe
- Default:
fail Expected output file does not exist
- checklet mixin class mtrchk.org.momotor.lti.mixins.secret.SecretOptionMixin¶
A Checklet mixin that can add a property with name secret to the result.
Momotor LTI will not show steps containing a property named secret set to
trueto learners. The step will still be visible to reviewers.- secret option¶
Dynamic secret property value for the result. Momotor LTI will not show steps with a secret property set to
trueto learners, but will still show that step to reviewers.The option value can be one of the following:
alwaysortrue: adds a secret property with valuetrueto the result.false: do not add a secret property to the result.on-fail: adds a secret property with valuetrueto the result if the step fails.on-pass: adds a secret property with valuetrueto the result if the step passed.default: inherits the value from the next provider. If the last provider is ‘default’ no property will be added.
Note that this only adds a secret property with value
true, but never one with valuefalse. This ensures that a default defined in a recipe will be used unless the step or config explicitly override it.The value can contain reference placeholders to inherit the value from another step’s options or properties.
- Type:
Any
- Required:
False
- Multiple:
False
- Location:
config, step, recipe
- Default:
default