-
Notifications
You must be signed in to change notification settings - Fork 3
Meclib tutorial: Add Meclib feedback functions
Back to My first Meclib question
Feedback functions are provided for detailed adaptive feedback without complex potential response trees. This way it is easy to equip many questions with enriched standard feedback.
The feedback functions are included using links to the Meclib github repository.
The code for inserting them is found under Meclib question setup. In our case, we need the feedback for numeric or algebraic values.
Question variables
- Insert the link to
fb_value.mac
stack_include("https://raw.githubusercontent.com/mkraska/meclib/main/Maxima/fb_value_EN.mac");
Potential response tree Hnum
- Node 1
- Quiet: Yes (suppress standard feedback of the answer test)
- Make sure that text format of the "true feedback" and "false feedback" text fields is set to HTML (failing to do so suppresses the yellow feedback background)
- false feedback:
{@fb_unit(S_Hnum, Hnum*cm, 0.05)@}
This is Meclib standard feedback for numerical values with or without units. The numeric value matches the tolerance of the answer test.
Preview
- Press Save changes and continue editing
- Press Preview
- Press Fill in correct responses
- Change
cm
tom
in the third input field - Press Check
This is an example of the feedback that the function fb_unit can provide.
Potential response tree Ha
- Node 1
- Make sure that text format of the "true feedback" and "false feedback" text fields is set to HTML (failing to do so suppresses the yellow feedback background)
- false feedback:
{@fb_vars(S_Ha,Ha)@}
This is Meclib standard feedback for algebraic expressions. Basically it compares the sets of variables in student's and teacher's answer.
Potential response tree H
- Node 1
- Make sure that text format of the "true feedback" and "false feedback" text fields is set to HTML (failing to do so suppresses the yellow feedback background)
- false feedback:
{@fb_vars(S_H,H)@}
Preview
- Press Save changes and continue editing
- Press Preview
- Press Fill in correct responses
- Modify the first two inputs as shown
- Press Check
Note that we see interference of the unit definitions with the formatting of algebraic expressions.
Nonetheless this type of feedback handles some very basic errors in wrong usage of variables. There may be cases where the feedback would give away too much of the solution. Usually it does not harm to add the feedback functions shown here to every algebraic or numeric input.
Back to My first Meclib question
In order to try code snippets in jsfiddle,
- copy the code from the wiki page to the clipboard
- follow the link for the JSXGraph version you want to try
- Replace the code in the HTML section (contents of
<p hidden id="init">
) with the content of the clipboard