DPI [2-15] 클리핑 마스크 미적용시 [16~20] 문항 오답처리
This commit is contained in:
@@ -132,10 +132,20 @@ function getGpdpScore(gpdpData, scoringJson, index) {
|
||||
|
||||
let totalScore = 0;
|
||||
|
||||
// 15번 문항의 정답 여부를 추적할 상태 플래그를 선언합니다.
|
||||
let hasClippingMask = false;
|
||||
// 15번 문항에 종속적인 문항들의 키 목록을 정의합니다.
|
||||
const clippingMaskKeys = ['16', '17', '18', '19', '20'];
|
||||
|
||||
// 채점기준표 문항별 분류
|
||||
for (const key in scoringData) {
|
||||
console.log(`❔❔ 문제번호 : [${index}-${key}]`)
|
||||
|
||||
if ( clippingMaskKeys.includes(key) && !hasClippingMask ) {
|
||||
console.log("❌ 오답: 클리핑 마스크 미적용(15번 문항 오답)이므로 오답처리 ")
|
||||
scoringResult[key] = 0;
|
||||
continue; // 현재 문항 채점을 건너뛰고 다음 문항으로 넘어갑니다.
|
||||
}
|
||||
let ele = scoringData[key].ele;
|
||||
let ele2 = scoringData[key].ele2;
|
||||
const rightAnswer = scoringData[key].value;
|
||||
@@ -309,7 +319,6 @@ function getGpdpScore(gpdpData, scoringJson, index) {
|
||||
|
||||
for (const v of existsValues) {
|
||||
userAnswer = v.value;
|
||||
|
||||
if (type.includes('layer') || type.includes('text')) {
|
||||
|
||||
// 공백, 대소문자 무시
|
||||
@@ -338,6 +347,9 @@ function getGpdpScore(gpdpData, scoringJson, index) {
|
||||
totalScore += compareAndScore(userAnswer, rightAnswer, point, key, scoringResult);
|
||||
}
|
||||
|
||||
if ( type.includes('hasClippingMask') && scoringResult[key] > 0 ) {
|
||||
hasClippingMask = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user