2601회 채점기준 수정
This commit is contained in:
33
main.py
33
main.py
@@ -192,13 +192,20 @@ def process_project(project_data, scoring_data):
|
||||
# - 복제본이 생성 되었을 때 : when_clone_start
|
||||
# - 장면이 시작 되었을 때 : when_scene_start
|
||||
# - 오브젝트를 클릭 했을 때 : when_object_click
|
||||
# - 특정 키가 눌렸을 때 : when_some_key_pressed
|
||||
# 이벤트 블록이 존재하는지 여부 확인용 변수
|
||||
|
||||
# 2026-01-29 16:40:29
|
||||
# target_event_type 회차마다 추가 될 수 있으므로
|
||||
# 채점 기준표의 answer 키값과 비교하여 동적으로 처리하도록 수정
|
||||
# 2601회는 "when_some_key_pressed"가 필요해서 추가함
|
||||
target_event_type = {
|
||||
"when_run_button_click",
|
||||
"when_message_cast",
|
||||
"when_clone_start",
|
||||
"when_scene_start",
|
||||
"when_object_click"
|
||||
"when_object_click",
|
||||
"when_some_key_pressed"
|
||||
}
|
||||
|
||||
for question_key, question_info in scoring_data.items():
|
||||
@@ -215,9 +222,19 @@ def process_project(project_data, scoring_data):
|
||||
# block_event_order 리스트에 추가
|
||||
if isinstance(block_list, list) and block_list:
|
||||
for block in block_list:
|
||||
answer = block.get("answer") # answer 키값을 안전하게 가져오기
|
||||
if isinstance(answer, str) and answer in target_event_type:
|
||||
block_event_order.append(answer) # 리스트에 추가
|
||||
answer = block.get("answer")
|
||||
if isinstance(answer, str):
|
||||
if answer in target_event_type:
|
||||
block_event_order.append(answer)
|
||||
|
||||
# 2026-01-29 16:39:48
|
||||
# answer가 리스트인 경우 리스트 요소들 모두를 확인
|
||||
# JSON채점 기준표에서 answer가 리스트인 경우가 생겨서 추가함
|
||||
elif isinstance(answer, list):
|
||||
# answer 리스트 내에 target_event_type에 포함된 요소가 있으면 추가
|
||||
for ans_item in answer:
|
||||
if ans_item in target_event_type:
|
||||
block_event_order.append(ans_item)
|
||||
|
||||
print(f"▶ Processing question: {question_key}")
|
||||
|
||||
@@ -336,11 +353,11 @@ def normalize_path(path):
|
||||
def main():
|
||||
timestamp = datetime.now().strftime("%y%m%d")
|
||||
|
||||
test_mode = False # 일반 채점 모드
|
||||
# test_mode = True # 테스트 모드
|
||||
# test_mode = False # 일반 채점 모드
|
||||
test_mode = True # 테스트 모드
|
||||
|
||||
exam_round = "2512"
|
||||
exam_names = ["CAS_2_A"] # 여러 시험명을 리스트로 설정
|
||||
exam_round = "2601"
|
||||
exam_names = ["CAT_3_A"] # 여러 시험명을 리스트로 설정
|
||||
# exam_names = ["CAS_2_A", "CAS_2_B"] # 여러 시험명을 리스트로 설정
|
||||
excel_list = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user