根据正确率选择题号功能中的年级改为班级正则表达式(拓展了功能, 原有的年级功能依然保留)
This commit is contained in:
parent
f78599c1fe
commit
c548e4a2c2
|
|
@ -2253,11 +2253,11 @@ def RefineExclude(excludejson): #将excludejson的key变为6位题号
|
|||
return newjson
|
||||
|
||||
|
||||
def ChooseIDsByUsageInterval(startdate,enddate,interval,grade,prodict): #返回根据条件选出的题号字典及对应小题, 需要留意的记录长度不一的题号, 以及所有使用过的题号
|
||||
def ChooseIDsByUsageInterval(startdate,enddate,interval,classregex,prodict): #返回根据条件选出的题号字典及对应小题, 需要留意的记录长度不一的题号, 以及所有使用过的题号
|
||||
used_problems = []
|
||||
for id in prodict:
|
||||
currentproblem = prodict[id]
|
||||
currentusages = [parseUsage(u) for u in currentproblem["usages"] if startdate <= parseUsage(u)["date"] <= enddate and grade+"届" in parseUsage(u)["classid"]]
|
||||
currentusages = [parseUsage(u) for u in currentproblem["usages"] if startdate <= parseUsage(u)["date"] <= enddate and re.findall(classregex,parseUsage(u)["classid"])!=[]]
|
||||
if not currentusages == []:
|
||||
used_problems.append((id,currentusages))
|
||||
cautionids = [] #使用记录长度不一的题目id
|
||||
|
|
|
|||
Reference in New Issue