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 },
|
where: { ID_ADMIN_EXERCISE },
|
||||||
});
|
});
|
||||||
if (matchingPairs && matchingPairs.length > 0) {
|
if (matchingPairs && matchingPairs.length > 0) {
|
||||||
const studentAnswers = ANSWER_STUDENT.split(",").map((pair) => {
|
const studentAnswers = ANSWER_STUDENT.split("|").map((pair) => {
|
||||||
const [left, right] = pair.split("-");
|
const [left, right] = pair.split(">");
|
||||||
|
|
||||||
return {
|
return {
|
||||||
LEFT_PAIR: left ? left.trim() : "",
|
LEFT_PAIR: left ? left.trim() : "",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user