Solved a bug where the speaking and interactive speaking were not being correctly evaluated
This commit is contained in:
@@ -28,6 +28,7 @@ export const evaluateWritingAnswer = async (exercise: WritingExercise, solution:
|
||||
total: 100,
|
||||
},
|
||||
solutions: [{id: exercise.id, solution: solution.solutions[0].solution, evaluation: response.data}],
|
||||
isDisabled: true,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -77,12 +78,14 @@ const evaluateSpeakingExercise = async (exercise: SpeakingExercise, exerciseId:
|
||||
if (response.status === 200) {
|
||||
return {
|
||||
...solution,
|
||||
id,
|
||||
score: {
|
||||
correct: response.data ? speakingReverseMarking[response.data.overall] : 0,
|
||||
correct: 0,
|
||||
missing: 0,
|
||||
total: 100,
|
||||
},
|
||||
solutions: [{id: exerciseId, solution: response.data ? response.data.fullPath : null, evaluation: response.data}],
|
||||
isDisabled: true,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -119,18 +122,19 @@ const evaluateInteractiveSpeakingExercise = async (exerciseId: string, solution:
|
||||
};
|
||||
|
||||
const response = await axios.post("/api/evaluate/interactiveSpeaking", formData, config);
|
||||
console.log({data: response.data, status: response.status});
|
||||
|
||||
if (response.status === 200) {
|
||||
return {
|
||||
...solution,
|
||||
id,
|
||||
score: {
|
||||
correct: response.data ? speakingReverseMarking[response.data.overall] : 0,
|
||||
correct: 0,
|
||||
missing: 0,
|
||||
total: 100,
|
||||
},
|
||||
module: "speaking",
|
||||
solutions: [{id: exerciseId, solution: response.data ? response.data.answer : null, evaluation: response.data}],
|
||||
isDisabled: true,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user