修改考试成绩计算的错误

This commit is contained in:
daihh
2022-12-12 11:19:55 +08:00
parent b2629e76dc
commit 7a382c7bc4

View File

@@ -214,8 +214,14 @@
}
let allRight = true;
item.options.forEach(it =>{
if(it.answer && item.userAnswer.indexOf(it.id)==-1) {
if(it.answer){ //正确答案
if(item.userAnswer.indexOf(it.id)==-1){
allRight=false;
}
}else{
if(item.userAnswer.indexOf(it.id)>-1){
allRight=false;
}
}
});
if(allRight){