diff --git a/备课组/24届/答题纸对应.json b/备课组/24届/答题纸对应.json new file mode 100644 index 00000000..85e03cd0 --- /dev/null +++ b/备课组/24届/答题纸对应.json @@ -0,0 +1,22 @@ +{ + "222816958193777036586": { + "id": "F20240515", + "idlist": [ + "023033", + "040350", + "023034", + "023035", + "023036", + "023037", + "014586", + "023038", + "999999", + "999999", + "999999", + "999999", + "023039", + "023040" + ], + "marks": [4,4,4,4,4,4,5,5,4,4] + } +} \ No newline at end of file diff --git a/工具v2/database_tools.py b/工具v2/database_tools.py index a4c35f58..d616e657 100644 --- a/工具v2/database_tools.py +++ b/工具v2/database_tools.py @@ -1498,9 +1498,12 @@ def FindPaper(xiaoxianpid, answersheetpath): #根据小闲的试卷编号和答 grade = "20"+re.findall(r"\d{2}届",dir)[0] pid = anssheetjson[xiaoxianpid]["id"] notesjson = load_dict(os.path.join(dir,"校本材料.json")) - idlist = [] - for part in anssheetjson[xiaoxianpid]["parts"]: - idlist += notesjson["notes"][pid][part].copy() + if not "idlist" in anssheetjson[xiaoxianpid]: + idlist = [] + for part in anssheetjson[xiaoxianpid]["parts"]: + idlist += notesjson["notes"][pid][part].copy() + else: + idlist = anssheetjson[xiaoxianpid]["idlist"] if "marks" in anssheetjson[xiaoxianpid]: marks = anssheetjson[xiaoxianpid]["marks"] else: @@ -1594,9 +1597,10 @@ def CalculateUsages(statsfilepathlist,statsfilename,gradename,threshold,marks,co means_out = [f"{t:.3f}" for t in means] for id in correspondence_dict: cols = correspondence_dict[id] - diffs = "\t".join([means_out[u] for u in cols]) - usages = f"{date}\t{classname}\t{diffs}" - output += f"{id}\n{usages}\n\n\n" + if not len(cols) == 0: + diffs = "\t".join([means_out[u] for u in cols]) + usages = f"{date}\t{classname}\t{diffs}" + output += f"{id}\n{usages}\n\n\n" if validflag: return output else: diff --git a/工具v2/收集使用记录.py b/工具v2/收集使用记录.py index d295d311..fcf897f6 100644 --- a/工具v2/收集使用记录.py +++ b/工具v2/收集使用记录.py @@ -1,4 +1,4 @@ -zipfilepath = r"D:\temp\222817032234165544977_G20260160选择性必修第四章数列复习_高一_数学.zip" +zipfilepath = r"D:\temp\222816958193777036586_基础赋能卷8_高三_数学.zip" # zipfilepath = r"D:\temp\222817041862672707412_控江中学2023学年第一学期高一数学期末考试_高一_数学.zip" date = "20240125" threshold = 0.75 #设置最低提交人数比例