mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-10 11:26:47 +08:00
修改考试成绩计算的错误
This commit is contained in:
@@ -214,9 +214,15 @@
|
|||||||
}
|
}
|
||||||
let allRight = true;
|
let allRight = true;
|
||||||
item.options.forEach(it =>{
|
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;
|
allRight=false;
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
if(item.userAnswer.indexOf(it.id)>-1){
|
||||||
|
allRight=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if(allRight){
|
if(allRight){
|
||||||
scoreNum+=item.score;
|
scoreNum+=item.score;
|
||||||
|
|||||||
Reference in New Issue
Block a user