@programisto/edrm-exams 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -57,7 +57,7 @@ async function correctTest(options) {
|
|
|
57
57
|
result.state = TestState.Finish;
|
|
58
58
|
// Forcer la sauvegarde des sous-documents responses
|
|
59
59
|
result.markModified('responses');
|
|
60
|
-
const scorePercentage = (finalscore / maxScore) * 100;
|
|
60
|
+
const scorePercentage = Math.ceil((finalscore / maxScore) * 100);
|
|
61
61
|
// Sauvegarder les modifications avec findByIdAndUpdate pour éviter les conflits de version
|
|
62
62
|
await TestResult.findByIdAndUpdate(result._id, {
|
|
63
63
|
$set: {
|