--- client/views/pages/teacher/QuestionDetail.vue
+++ client/views/pages/teacher/QuestionDetail.vue
... | ... | @@ -291,13 +291,13 @@ |
291 | 291 |
file_mng_id: '', |
292 | 292 |
prblmDetail: { |
293 | 293 |
answers: { |
294 |
- 1: { text: '', isCorrect: 'N', fileMngId: null, fileInfo: '' }, |
|
294 |
+ 1: { text: '', isCorrect: 'Y', fileMngId: null, fileInfo: '' }, |
|
295 | 295 |
2: { text: '', isCorrect: 'N', fileMngId: null, fileInfo: '' }, |
296 | 296 |
3: { text: '', isCorrect: 'N', fileMngId: null, fileInfo: '' }, |
297 | 297 |
4: { text: '', isCorrect: 'N', fileMngId: null, fileInfo: '' }, |
298 | 298 |
5: { text: '', isCorrect: 'N', fileMngId: null, fileInfo: '' }, |
299 | 299 |
}, |
300 |
- correctIndex: null, // 정답으로 선택된 답의 인덱스 |
|
300 |
+ correctIndex: 1, // 정답으로 선택된 답의 인덱스 |
|
301 | 301 |
}, |
302 | 302 |
books: [], |
303 | 303 |
units: [], |
... | ... | @@ -384,10 +384,6 @@ |
384 | 384 |
} |
385 | 385 |
|
386 | 386 |
vm.prblmDetail.correctIndex = vm.problemDetail.findIndex(detail => detail.prblmYn === 'Y') + 1; |
387 |
- |
|
388 |
- if (vm.dataList.prblmTypeId === 'prblm_type_009') { |
|
389 |
- vm.prblmDetail.answer1 = vm.problemDetail.find(detail => detail.prblmYn === 'Y') ? 'O' : 'X'; |
|
390 |
- } |
|
391 | 387 |
} |
392 | 388 |
|
393 | 389 |
if (vm.file_mng_id) { |
... | ... | @@ -455,7 +451,6 @@ |
455 | 451 |
console.log('성공:', response.data); |
456 | 452 |
const problemDetails = await this.prepareProblemDetails(); |
457 | 453 |
await this.submitDetailForm(problemDetails); |
458 |
- |
|
459 | 454 |
alert('문제가 성공적으로 수정되었습니다.'); |
460 | 455 |
|
461 | 456 |
this.goToPage('QuestionList'); |
... | ... | @@ -507,7 +502,8 @@ |
507 | 502 |
details.push({ |
508 | 503 |
prblmDtlId: answers[i].prblmDtlId, |
509 | 504 |
prblmDtlExpln: answers[i].text || '', |
510 |
- prblmYn: answers[i].isCorrect, // isCorrect가 'Y' 또는 'N'으로 설정됨 |
|
505 |
+ prblmYn: this.selectedSearchOption2.prblm_type_cls === '서술형' || |
|
506 |
+ this.selectedSearchOption2.prblm_type_cls === 'OX 문제' ? 'Y' : answers[i].isCorrect, // 서술형 및 OX 문제의 경우 항상 'Y' |
|
511 | 507 |
fileMngId: answers[i].fileMngId, |
512 | 508 |
}); |
513 | 509 |
} |
... | ... | @@ -528,13 +524,13 @@ |
528 | 524 |
this.prblmDetail = { |
529 | 525 |
|
530 | 526 |
answers: { |
531 |
- 1: { text: '', isCorrect: 'N', fileMngId: null, fileInfo: '' }, |
|
527 |
+ 1: { text: '', isCorrect: 'Y', fileMngId: null, fileInfo: '' }, |
|
532 | 528 |
2: { text: '', isCorrect: 'N', fileMngId: null, fileInfo: '' }, |
533 | 529 |
3: { text: '', isCorrect: 'N', fileMngId: null, fileInfo: '' }, |
534 | 530 |
4: { text: '', isCorrect: 'N', fileMngId: null, fileInfo: '' }, |
535 | 531 |
5: { text: '', isCorrect: 'N', fileMngId: null, fileInfo: '' }, |
536 | 532 |
}, |
537 |
- correctIndex: null, |
|
533 |
+ correctIndex: 1, |
|
538 | 534 |
}; |
539 | 535 |
this.selectedFiles = {}; |
540 | 536 |
}, |
--- client/views/pages/teacher/QuestionInsert.vue
+++ client/views/pages/teacher/QuestionInsert.vue
... | ... | @@ -345,7 +345,7 @@ |
345 | 345 |
4: { text: '', isCorrect: 'N', fileMngId: null }, |
346 | 346 |
5: { text: '', isCorrect: 'N', fileMngId: null }, |
347 | 347 |
}, |
348 |
- correctIndex: null, // 정답으로 선택된 답의 인덱스 |
|
348 |
+ correctIndex: 1, // 정답으로 선택된 답의 인덱스 |
|
349 | 349 |
}, |
350 | 350 |
}; |
351 | 351 |
}, |
... | ... | @@ -492,7 +492,8 @@ |
492 | 492 |
details.push({ |
493 | 493 |
prblmId, |
494 | 494 |
prblmDtlExpln: answers[i].text || '', |
495 |
- prblmYn: answers[i].isCorrect, // isCorrect가 'Y' 또는 'N'으로 설정됨 |
|
495 |
+ prblmYn: this.selectedSearchOption2.prblm_type_cls === '서술형' || |
|
496 |
+ this.selectedSearchOption2.prblm_type_cls === 'OX 문제' ? 'Y' : answers[i].isCorrect, // 서술형 및 OX 문제의 경우 항상 'Y' |
|
496 | 497 |
fileMngId: answers[i].fileMngId, |
497 | 498 |
}); |
498 | 499 |
} |
... | ... | @@ -512,13 +513,13 @@ |
512 | 513 |
this.prblmDetail = { |
513 | 514 |
|
514 | 515 |
answers: { |
515 |
- 1: { text: '', isCorrect: 'N', fileMngId: null }, |
|
516 |
+ 1: { text: '', isCorrect: 'Y', fileMngId: null }, |
|
516 | 517 |
2: { text: '', isCorrect: 'N', fileMngId: null }, |
517 | 518 |
3: { text: '', isCorrect: 'N', fileMngId: null }, |
518 | 519 |
4: { text: '', isCorrect: 'N', fileMngId: null }, |
519 | 520 |
5: { text: '', isCorrect: 'N', fileMngId: null }, |
520 | 521 |
}, |
521 |
- correctIndex: null, |
|
522 |
+ correctIndex: 1, |
|
522 | 523 |
}; |
523 | 524 |
this.selectedFiles = {}; |
524 | 525 |
}, |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?