Skip to content

Commit

Permalink
Consider a partially_correct answer to be wrong if submitted
Browse files Browse the repository at this point in the history
Signed-off-by: Abhishek Kumar <[email protected]>
  • Loading branch information
abhi-kr-2100 committed Apr 7, 2024
1 parent 716a7d8 commit 2d9f694
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions webapp/src/PlayPage/Questions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ export default function Questions({
() =>
userEnteredSolutionStatus === 'fully_correct'
? theme.palette.success.main
: userEnteredSolutionStatus === 'incorrect'
// A `partially_correct` solution should be considered wrong if user
// submits it for checking
: userEnteredSolutionStatus === 'incorrect' || isSolutionChecked
? theme.palette.error.main
: undefined,
[userEnteredSolutionStatus, theme],
[userEnteredSolutionStatus, theme, isSolutionChecked],
);

useEffect(() => {
Expand Down

0 comments on commit 2d9f694

Please sign in to comment.