2506회 정기 채점기준표(JSON) 업데이트
This commit is contained in:
@@ -231,32 +231,25 @@ function getGpdpScore(gpdpData, scoringJson, index) {
|
||||
name: name,
|
||||
option: {},
|
||||
}
|
||||
const optionKeys = Object.keys(rightAnswer['option']);
|
||||
if (name === '흑백') {
|
||||
const Intensity = xpath.select1('Intensity/@value', effectData)?.value;
|
||||
|
||||
const optionKeys = Object.keys(rightAnswer['option']);
|
||||
if (optionKeys.includes('강도')) userAnswer['option']['강도'] = Intensity;
|
||||
}
|
||||
else if (name === '밝기/대비') {
|
||||
const brightness = xpath.select1('brightness/@value', effectData)?.value;
|
||||
const contrast = xpath.select1('contrast/@value', effectData)?.value;
|
||||
|
||||
const optionKeys = Object.keys(rightAnswer['option']);
|
||||
if (optionKeys.includes('밝기')) userAnswer['option']['밝기'] = brightness;
|
||||
if (optionKeys.includes('대비')) userAnswer['option']['대비'] = contrast;
|
||||
}
|
||||
else if (name === '노출') {
|
||||
const ExposureValue = xpath.select1('ExposureValue/@value', effectData)?.value;
|
||||
|
||||
const optionKeys = Object.keys(rightAnswer['option']);
|
||||
if (optionKeys.includes('노출')) userAnswer['option']['노출'] = ExposureValue;
|
||||
}
|
||||
else if (name === '색조/채도') {
|
||||
const hue = xpath.select1('hue/@value', effectData)?.value;
|
||||
const saturation = xpath.select1('saturation/@value', effectData)?.value;
|
||||
const lightness = xpath.select1('lightness/@value', effectData)?.value;
|
||||
|
||||
const optionKeys = Object.keys(rightAnswer['option']);
|
||||
if (optionKeys.includes('색조')) userAnswer['option']['색조'] = hue;
|
||||
if (optionKeys.includes('채도')) userAnswer['option']['채도'] = saturation;
|
||||
if (optionKeys.includes('명도')) userAnswer['option']['명도'] = lightness;
|
||||
@@ -265,8 +258,6 @@ function getGpdpScore(gpdpData, scoringJson, index) {
|
||||
const lift = xpath.select1('Lift/@value', effectData)?.value;
|
||||
const gamma = xpath.select1('Gamma/@value', effectData)?.value;
|
||||
const gain = xpath.select1('Gain/@value', effectData)?.value;
|
||||
|
||||
const optionKeys = Object.keys(rightAnswer['option']);
|
||||
if (optionKeys.includes('리프트')) userAnswer['option']['리프트'] = lift;
|
||||
if (optionKeys.includes('감마')) userAnswer['option']['감마'] = gamma;
|
||||
if (optionKeys.includes('게인')) userAnswer['option']['게인'] = gain;
|
||||
@@ -286,14 +277,32 @@ function getGpdpScore(gpdpData, scoringJson, index) {
|
||||
// 설정한 값 그대로 적용되는 경우도 있어서 오차범위 2로 설정
|
||||
const userValue = parseInt(vibranceValue, 10);
|
||||
const rightValue = parseInt(rightAnswer.option['생동감'], 10);
|
||||
|
||||
if (Math.abs(rightValue - userValue) <= 2) {
|
||||
const optionKeys = Object.keys(rightAnswer['option']);
|
||||
if (optionKeys.includes('생동감')) {
|
||||
userAnswer['option']['생동감'] = rightValue.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (name === '흐리게') {
|
||||
const radius = xpath.select1('radius/@value', effectData)?.value;
|
||||
if (optionKeys.includes('반경')) userAnswer['option']['반경'] = radius;
|
||||
}
|
||||
else if (name === '글로우') {
|
||||
const radius = xpath.select1('radius/@value', effectData)?.value;
|
||||
const brightness = xpath.select1('brightness/@value', effectData)?.value;
|
||||
const contrast = xpath.select1('contrast/@value', effectData)?.value;
|
||||
if (optionKeys.includes('반경')) userAnswer['option']['반경'] = radius;
|
||||
if (optionKeys.includes('밝기')) userAnswer['option']['밝기'] = brightness;
|
||||
if (optionKeys.includes('대비')) userAnswer['option']['대비'] = contrast;
|
||||
}
|
||||
else if (name === '픽셀효과') {
|
||||
const cellSize = xpath.select1('cellSize/@value', effectData)?.value;
|
||||
if (optionKeys.includes('셀크기')) userAnswer['option']['셀크기'] = cellSize;
|
||||
}
|
||||
else if (name === '선명하게') {
|
||||
const amount = xpath.select1('amount/@value', effectData)?.value;
|
||||
if (optionKeys.includes('양')) userAnswer['option']['양'] = amount;
|
||||
}
|
||||
|
||||
for (const key in rightAnswer.option) {
|
||||
// 속성값이 정답과 다른 경우가 있으면 오답처리
|
||||
@@ -329,7 +338,7 @@ function getGpdpScore(gpdpData, scoringJson, index) {
|
||||
// 공백, 대소문자 무시
|
||||
const cleanUserAnswer = userAnswer.replace(/\s+/g, '').toLowerCase();
|
||||
const cleanRightAnswer = rightAnswer.replace(/\s+/g, '').toLowerCase();
|
||||
|
||||
|
||||
// 하나라도 일치하면 정답
|
||||
if (cleanUserAnswer === cleanRightAnswer) {
|
||||
isMatched = true;
|
||||
|
||||
Reference in New Issue
Block a user