Solving a Listening bug
This commit is contained in:
@@ -62,8 +62,8 @@ export default function WriteBlanks({id, prompt, type, maxWords, solutions, user
|
||||
(x) =>
|
||||
solutions
|
||||
.find((y) => x.id.toString() === y.id.toString())
|
||||
?.solution.map((y) => y.toLowerCase())
|
||||
.includes(x.solution.toLowerCase()) || false,
|
||||
?.solution.map((y) => y.toLowerCase().trim())
|
||||
.includes(x.solution.toLowerCase().trim()) || false,
|
||||
).length;
|
||||
const missing = total - answers.filter((x) => solutions.find((y) => x.id === y.id)).length;
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@ export default function WriteBlanksSolutions({
|
||||
(x) =>
|
||||
solutions
|
||||
.find((y) => x.id.toString() === y.id.toString())
|
||||
?.solution.map((y) => y.toLowerCase())
|
||||
.includes(x.solution.toLowerCase()) || false,
|
||||
?.solution.map((y) => y.toLowerCase().trim())
|
||||
.includes(x.solution.toLowerCase().trim()) || false,
|
||||
).length;
|
||||
const missing = total - userSolutions.filter((x) => solutions.find((y) => x.id.toString() === y.id.toString())).length;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user