2506회 정기 채점기준표(JSON) 업데이트
This commit is contained in:
@@ -13,28 +13,28 @@ const getToday = require('./getToday.js');
|
||||
// const { get } = require('http');
|
||||
const todayDate = getToday();
|
||||
|
||||
const examRound = '2504';
|
||||
// const dic_or_dpi = 'DIC'
|
||||
const dic_or_dpi = 'DPI'
|
||||
const examRound = '2506';
|
||||
// const DICorDPI = 'DIC'
|
||||
const DICorDPI = 'DPI'
|
||||
const examTypes = [
|
||||
// 'A',
|
||||
'B',
|
||||
// 'C',
|
||||
// 'B',
|
||||
'C',
|
||||
// 'D'
|
||||
];
|
||||
|
||||
// testMode가 true일 경우 TEST 폴더에 있는 답안 파일을 읽어옴
|
||||
// const testMode = false;
|
||||
const testMode = true;
|
||||
const testMode = false;
|
||||
// const testMode = true;
|
||||
|
||||
const outputExcelFiles = [];
|
||||
|
||||
examTypes.forEach(type => {
|
||||
const scoringJson = require(`./DIC_${examRound}${type}.json`);
|
||||
const answerFilesDir = `./output/${examRound}/${type}/${testMode ? 'TEST' : dic_or_dpi}`;
|
||||
let outputExcelFile = `./${todayDate}_${dic_or_dpi}_${examRound}${type}_채점결과.xlsx`;
|
||||
const scoringJson = require(`./${DICorDPI}_${examRound}${type}.json`);
|
||||
const answerFilesDir = `./output/${examRound}/${type}/${testMode ? 'TEST' : DICorDPI}`;
|
||||
let outputExcelFile = `./${todayDate}_${DICorDPI}_${examRound}${type}_채점결과.xlsx`;
|
||||
if (testMode) {
|
||||
outputExcelFile = `./00_${dic_or_dpi}_${examRound}${type}_TEST.xlsx`;
|
||||
outputExcelFile = `./00_${DICorDPI}_${examRound}${type}_TEST.xlsx`;
|
||||
}
|
||||
// const scoringJson = require(`./DIC_${examRound}${type}.json`);
|
||||
// const answerFilesDir = `./output/${examRound}/${type}/${testMode ? 'TEST' : 'DIC'}`;
|
||||
@@ -414,7 +414,7 @@ function getGmepScore(gmepData, scoringJson, index) {
|
||||
result = result.replace(/"/g, "'");
|
||||
search = result;
|
||||
ele = ele?.replace(/{search}/g, search);
|
||||
}
|
||||
}
|
||||
else {
|
||||
ele = ele?.includes('{search}') ? null : ele;
|
||||
}
|
||||
@@ -492,7 +492,11 @@ function getGmepScore(gmepData, scoringJson, index) {
|
||||
// CRTrackClip 요소의 Pos(시작시간)과 Length(재생길이)를 구함
|
||||
const pos = xpath.select1('@Pos', crTrackClip);
|
||||
const length = xpath.select1('@Length', crTrackClip);
|
||||
userAnswer = { start: pos.value, end: length.value }
|
||||
|
||||
userAnswer = {
|
||||
start: pos.value,
|
||||
end: length.value
|
||||
}
|
||||
}
|
||||
}
|
||||
totalScore += compareAndScore(userAnswer, rightAnswer, point, key, scoringResult);
|
||||
@@ -629,7 +633,7 @@ function getGmepScore(gmepData, scoringJson, index) {
|
||||
else {
|
||||
const xpathExpr = ele?.replace(/{CRClipIndex}/g, crclipIndex);
|
||||
const imageLength = xpath.select1(xpathExpr, gmepXmlDoc);
|
||||
userAnswer = imageLength.value;
|
||||
userAnswer = parseInt(imageLength.value, 10);
|
||||
}
|
||||
totalScore += compareAndScore(userAnswer, rightAnswer, point, key, scoringResult);
|
||||
}
|
||||
@@ -650,7 +654,7 @@ function getGmepScore(gmepData, scoringJson, index) {
|
||||
userAnswer = null;
|
||||
} else {
|
||||
const length = crTrackClip.getAttribute('Length');
|
||||
userAnswer = length;
|
||||
userAnswer = parseInt(length, 10);
|
||||
}
|
||||
}
|
||||
else if (type.includes('Effect')) {
|
||||
@@ -738,12 +742,12 @@ function getGmepScore(gmepData, scoringJson, index) {
|
||||
}
|
||||
else if (type.includes('FadeInEffect')) {
|
||||
const attributes = subtitleResult.attributes;
|
||||
const id = attributes.getNamedItem('VID505').value;
|
||||
const playtime = attributes.getNamedItem('VID507').value;
|
||||
const VID505 = attributes.getNamedItem('VID505').value;
|
||||
const VID507 = attributes.getNamedItem('VID507').value;
|
||||
|
||||
userAnswer = {
|
||||
"ID": id,
|
||||
"PlayTime": playtime,
|
||||
"VID505": VID505,
|
||||
"VID507": VID507,
|
||||
};
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user