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
Refactor LabelImage to separate out answers from userInput into scoringData (#1965)
## Summary:
This PR updates LabelImage so that answers are no longer available in the userInput object. This allows the scoring function to have both a userInput parameter and a scoringData parameter to keep answers separate from the user's input with the goal of supporting server side scoring.
PerseusLabelImageMarker and MarkerType contained the same properties. As such, I simplified the code a bit and removed PerseusLabelImageMarker.
In addition, several locations were referencing the wrong types, so those were updated to reference the correct ones. Also, new tests were added confirming the output of `getUserInput` does not contain answers, that `scorePerseusItem` returns the correct results, and that the widget renders correctly if answers are not present in the JSON blob.
Issue: LEMS-2440
## Test plan:
- Confirm all checks pass
- Confirm widget still works as expected
Author: Myranae
Reviewers: Myranae, handeyeco, jeremywiebe, catandthemachines
Required Reviewers:
Approved By: catandthemachines, jeremywiebe
Checks: ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x)
Pull Request URL: #1965
0 commit comments