Commit 3ddb60ab authored by limingzhe's avatar limingzhe

fix: debug

parent aec4e9a0
...@@ -604,7 +604,17 @@ export default class NewClass extends middleLayerBase { ...@@ -604,7 +604,17 @@ export default class NewClass extends middleLayerBase {
const score = this.studyRecord.getTotalAverageAudioScore(); const score = this.studyRecord.getTotalAverageAudioScore();
this.showSRResult(score) this.showSRResult(score)
} }
}
showSRResultByQuestion() {
if (this.studyRecord) {
this.studyRecordModel.recordData = this.studyRecord.getAllQuestionResults();
const score = this.studyRecord.getAverageScore();
this.showSRResult(score)
}
} }
showSRResult(score) { showSRResult(score) {
...@@ -613,7 +623,19 @@ export default class NewClass extends middleLayerBase { ...@@ -613,7 +623,19 @@ export default class NewClass extends middleLayerBase {
// this.studyRecord.showResult(); // this.studyRecord.showResult();
} }
} }
setTotalQuestions(total) {
if (this.studyRecord) {
this.studyRecord.setTotalQuestions(total);
}
}
setQuestionResult(index, score) {
if (this.studyRecord) {
this.studyRecord.setQuestionResult(index, score);
}
}
reportData() { reportData() {
console.log('reportData 1'); console.log('reportData 1');
......
...@@ -237,7 +237,8 @@ class StudyRecord { ...@@ -237,7 +237,8 @@ class StudyRecord {
totalScore += this.questionResults[index]; 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