修正一个 教师讲义制作 中使用记录个数选择的bug

This commit is contained in:
wangweiye7840 2023-06-30 15:40:21 +08:00
parent ab8cbf6ad4
commit d32ee157e1
2 changed files with 2 additions and 2 deletions

View File

@ -759,7 +759,7 @@ def ChooseUsage(usages,topandbottomusagestuple): #生成题号对应的题目的
elif top + bottom > len(usages):
return SortUsagesbyAverage(usages) # 返回排列后的使用记录
else:
return (SortUsagesbyAverage(usages)[:top] + SortUsagesbyAverage(usages)[(-bottom):]) # 返回排序后的最前面top个和最后面bottom个
return (SortUsagesbyAverage(usages)[:top] + SortUsagesbyAverage(usages)[(len(usages)-bottom):]) # 返回排序后的最前面top个和最后面bottom个
def GenerateUsageTexCode(id,prodict,topandbottomusagestuple): #根据topandbottomusagestuple的要求生成题号为id的题目的缩减版的使用记录列表 topandbottomusagestuple表示保留得分率最高的使用记录与最低的使用记录的个数, 有负数表示不排列, 两数之和大于记录数则从高到低排列后全部展示
rawusages = prodict[id]["usages"].copy()

View File

@ -1,4 +1,4 @@
problems = ["1:50000"] #题号列表, 每个字符串表示一个分块的题目
problems = ["1:500"] #题号列表, 每个字符串表示一个分块的题目
notetitle = "测试讲义教师版" #讲义标题, 也是文件标题
sectiontitles = ["课前","课后"] #小节标题列表, 如果与题号列表长度不符则作为不设小节处理
consecutivenumbering = False #不同小节是否连续编号, True表示连续编号, False表示每小节从1开始编号