-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Client Validation] Use emptyWidgetsFunctional in scoring #2083
base: feature/client-validation
Are you sure you want to change the base?
Conversation
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (fc63b15) and published it to npm. You Example: yarn add @khanacademy/perseus@PR2083 If you are working in Khan Academy's webapp, you can run: ./dev/tools/bump_perseus_version.sh -t PR2083 |
Size Change: +77 B (+0.01%) Total Size: 1.47 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love seeing a PR that's mostly tests. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with some thoughts :) Thanks!
ec8e6a2
to
fc63b15
Compare
This PR completes the work of extracting validation logic from scoring logic. This retains most of the validation that used to be intermingled with scoring.
This means that even when we strip scoring data from the widget options, we'll still be able to check if an answer is scorable.
Notably:
input-number
andnumeric-input
missed the train here. Both of these widgets useKhanAnswerTypes
right at the beginning of scoring. Further, thecoefficient
answer type allows an empty value (""
) and bare negative ("-"
) to be treated as answers by coercing them to1
and-1
respectively. This means that we cannot do any validation/empty checking for these widgets because we need the fullKhanAnswerTypes
logic (which requires scoring data to work).Issue: LEMS-2561
Test plan:
yarn test
yarn typecheck