2507회 채점기준표

This commit is contained in:
2025-07-30 17:40:02 +09:00
parent 6d9682ce80
commit 57427f437f
46 changed files with 6131 additions and 92 deletions

View File

@@ -9,18 +9,17 @@ const { DOMParser } = require('xmldom');
const findSimilarString = require('./findSimilarString');
const getGpdpScore = require('./gpdpScoring.js');
const getToday = require('./getToday.js');
// const { userInfo } = require('os');
// const { get } = require('http');
const todayDate = getToday();
const examRound = '2506';
const examRound = '2507';
const DICorDPI = 'DIC'
// const DICorDPI = 'DPI'
const examTypes = [
'A',
// 'A',
'B',
'C',
'D'
// 'C',
// 'D'
];
// testMode가 true일 경우 TEST 폴더에 있는 답안 파일을 읽어옴
@@ -31,19 +30,13 @@ const outputExcelFiles = [];
examTypes.forEach(type => {
const jsonPath = `./${DICorDPI}_${examRound}${type}.json`
if ( !fs.existsSync(jsonPath)) return;
if (!fs.existsSync(jsonPath)) return;
const scoringJson = require(jsonPath);
const answerFilesDir = `./output/${examRound}/${type}/${testMode ? 'TEST' : DICorDPI}`;
let outputExcelFile = `./${todayDate}_${DICorDPI}_${examRound}${type}_채점결과.xlsx`;
if (testMode) {
outputExcelFile = `./00_${DICorDPI}_${examRound}${type}_TEST.xlsx`;
}
// const scoringJson = require(`./DIC_${examRound}${type}.json`);
// const answerFilesDir = `./output/${examRound}/${type}/${testMode ? 'TEST' : 'DIC'}`;
// let outputExcelFile = `./${todayDate}_DIC_${examRound}${type}_채점결과.xlsx`;
// if (testMode) {
// outputExcelFile = `./00_DIC_${examRound}${type}_TEST.xlsx`;
// 답안 폴더 내부에 디렉토리가 아닌 일반 파일이 있을 경우 디렉토리만 필터링 해서 불러옴
const studentDirs = fs.readdirSync(answerFilesDir).filter(file => {
@@ -64,7 +57,6 @@ examTypes.forEach(type => {
// DIAT시험 프로젝트로 생성시 gmep확장자로
// 교육용 프로젝프로 생성시 gmdp확장자로 생성됨
// 두 경우 모두 처리
const gmepFile = fs.readdirSync(studentDir).filter(
file => file.toLowerCase().endsWith('.gmep')
// || file.toLowerCase().endsWith('.gmdp')
@@ -669,11 +661,11 @@ function getGmepScore(gmepData, scoringJson, index) {
else {
const attributes = fadeoutEffect.attributes;
const id = attributes.getNamedItem('ID').value;
const playtime = attributes.getNamedItem('VID8').value;
const duration = attributes.getNamedItem('VID8')?.value;
userAnswer = {
"ID": id,
"PlayTime": playtime,
"Duration": duration,
};
}
}