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