You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from inginious import feedback
feedback.set_custom_value("highlight", 56)
# Colors the line 3 of subproblem "subproblem_id" with the default color
feedback.set_custom_value("highlight", {"subproblem_id": 3})
# Colors the lines 2 and 4 of subproblem "subproblem_id" with the default color
feedback.set_custom_value("highlight", {"subproblem_id": [2, 4]})
# Colors the lines 1,2,3 of subproblem "subproblem_id1" with a pale red,
# and lines 5 of subproblem "subproblem_id2" with a darker green
feedback.set_custom_value("highlight", {
"subproblem_id1": [{"lines": [1, 2, 3], "color": "red"}, {"lines": [4], "color": "darkred"}],
"subproblem_id2": {"lines": [5], "color": "darkgreen"},
})
Inside your run file, in bash:
# Colors the line 3 of subproblem "subproblem_id" with the default color
feedback-custom --json highlight '{"subproblem_id": 3}'
# Colors the line 2 and 4 of subproblem "subproblem_id" with the default color
feedback-custom --json highlight '{"subproblem_id": [2, 4]}'
# Colors the lines 1,2,3 of subproblem "subproblem_id1" with a pale red,
# and lines 5 of subproblem "subproblem_id2" with a darker green
feedback-custom --json highlight '{"subproblem_id1": [{"lines": [1, 2, 3], "color": "red"}, {"lines": [4], "color": "darkred"}], "subproblem_id2": {"lines": [5], "color": "darkgreen"}}'