Commit 3ddb60ab authored by limingzhe's avatar limingzhe

fix: debug

parent aec4e9a0
......@@ -604,6 +604,16 @@ export default class NewClass extends middleLayerBase {
const score = this.studyRecord.getTotalAverageAudioScore();
this.showSRResult(score)
}
}
showSRResultByQuestion() {
if (this.studyRecord) {
this.studyRecordModel.recordData = this.studyRecord.getAllQuestionResults();
const score = this.studyRecord.getAverageScore();
this.showSRResult(score)
}
}
......@@ -614,6 +624,18 @@ export default class NewClass extends middleLayerBase {
}
}
setTotalQuestions(total) {
if (this.studyRecord) {
this.studyRecord.setTotalQuestions(total);
}
}
setQuestionResult(index, score) {
if (this.studyRecord) {
this.studyRecord.setQuestionResult(index, score);
}
}
reportData() {
console.log('reportData 1');
......
......@@ -237,7 +237,8 @@ class StudyRecord {
totalScore += this.questionResults[index];
}
}
return totalScore / answeredCount;
// 四舍五入
return Math.round(totalScore / answeredCount);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment