채점 확인 필요

This commit is contained in:
devdra9
2025-01-18 17:35:23 +09:00
parent 989922b746
commit 802af38bab
10 changed files with 1867 additions and 182 deletions

View File

@@ -150,20 +150,28 @@ class XMLScorer:
item = criterion['item']
simliar_text = None
# searchValue가 있을 경우 유사한 텍스트 찾기
if search_value is not None:
simliar_text = self.find_similar_text(root, search_value)
if simliar_text is None:
xpath = xpath.replace('{searchValue}', search_value)
else:
xpath = xpath.replace('{searchValue}', simliar_text)
# chart xml 파일에서 채점하는 경우
if "chart_xml" in category:
if search_value is not None:
simliar_text = self.find_similar_text(chart_tree, search_value)
if simliar_text is None:
xpath = xpath.replace('{searchValue}', search_value)
else:
xpath = xpath.replace('{searchValue}', simliar_text)
result = self.chart_query_xml(chart_tree, xpath, namespaces)
# xpath로 실제 작성 답안 찾기
else:
result = self.query_xml(root, xpath, xpath2, points)
# 그 외의 hml 파일에서 채점하는 경우
else:
if search_value is not None:
simliar_text = self.find_similar_text(root, search_value)
if simliar_text is None:
xpath = xpath.replace('{searchValue}', search_value)
else:
xpath = xpath.replace('{searchValue}', simliar_text)
result = self.query_xml(root, xpath, xpath2, points)
# [ boolean 타입 ]
# 1. 이텔릭체, 굵게, 밑줄 등 효과가 적용 여부에 따라
# [ITALIC] [BOLD] [UNDERLINE] 태그가 있거나 없을 수 있으므로