diff --git a/middlewares/autoGrading.js b/middlewares/autoGrading.js index 27ae29c..2b1bfa6 100644 --- a/middlewares/autoGrading.js +++ b/middlewares/autoGrading.js @@ -55,8 +55,8 @@ export const checkCorrectAnswers = async (req, res, next) => { where: { ID_ADMIN_EXERCISE }, }); if (matchingPairs && matchingPairs.length > 0) { - const studentAnswers = ANSWER_STUDENT.split(",").map((pair) => { - const [left, right] = pair.split("-"); + const studentAnswers = ANSWER_STUDENT.split("|").map((pair) => { + const [left, right] = pair.split(">"); return { LEFT_PAIR: left ? left.trim() : "",