Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/docs/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This function is used to compare two number arrays/vectors/matrices, provided ab

### Optional parameters

There is one optional parameter: `feedback_for_incorrect_case`.
There is one optional parameter: `feedback_for_incorrect_response`.

## `feedback_for_incorrect_case`
## `feedback_for_incorrect_response`
All feedback for all incorrect responses will be replaced with the string that this parameter is set to.
4 changes: 2 additions & 2 deletions app/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ def evaluation_function(response, answer, params) -> dict:

is_correct = np.allclose(res, ans, rtol=rtol, atol=atol)

if is_correct is False and params.get("feedback_for_incorrect_case", None) is not None:
if is_correct is False and params.get("feedback_for_incorrect_response", None) is not None:
return {
"is_correct": is_correct,
"feedback": params["feedback_for_incorrect_case"]
"feedback": params["feedback_for_incorrect_response"]
}

# TODO: If incorrect, could compute which cells are, and return as feedback
Expand Down