refactor: auto grading splitter
This commit is contained in:
parent
b524a0a41a
commit
2da2950c84
|
|
@ -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() : "",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user