|
|
@@ -267,8 +267,17 @@ const choiceQuestionList = () => {
|
|
|
const _studentContent: any = JSON.parse(
|
|
|
decodeURIComponent(studentWork.content)
|
|
|
).testJson
|
|
|
+ // let _studentContentCorrection = []
|
|
|
+ // console.log(_workData)
|
|
|
+ // console.log(_studentContent)
|
|
|
+ // _studentContentCorrection = _workData.map((i:any) => {
|
|
|
+ // return _studentContent.find((i2:any) => {
|
|
|
+ // return (JSON.stringify({testtitle: i2.testtitle, checkList: i2.checkList, timuList: i2.timuList}) === JSON.stringify({testtitle: i.testtitle, checkList: i.checkList, timuList: i.timuList}))
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // console.log(_studentContentCorrection)
|
|
|
_studentContent.forEach((test: any, testIndex: number) => {
|
|
|
- if (test.userAnswer || test.userAnswer === 0) {
|
|
|
+ if (_workData[testIndex] && JSON.stringify({testtitle: test.testtitle, checkList: test.checkList, timuList: test.timuList}) === JSON.stringify({testtitle: _workData[testIndex].testtitle, checkList: _workData[testIndex].checkList, timuList: _workData[testIndex].timuList}) && (test.userAnswer || test.userAnswer === 0)) {
|
|
|
if (Array.isArray(test.userAnswer)) {
|
|
|
test.userAnswer.forEach((ch: number) => {
|
|
|
_workData[testIndex].choiceUser[ch].user.push(studentWork.name)
|