From 8312feb9e6c25f0ac320d69a5e0d1fa34e7cd60c Mon Sep 17 00:00:00 2001 From: "weiye.wang" Date: Sat, 2 Mar 2024 20:41:54 +0800 Subject: [PATCH] =?UTF-8?q?database=5Ftools.py=E4=B8=AD=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AE=8C=E6=95=B4=E7=BC=96=E8=AF=91=E7=9A=84json:=20BuildFullS?= =?UTF-8?q?cheme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 工具v2/database_tools.py | 19 +++++++++++++++++++ 工具v2/添加关联题目.py | 17 +---------------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/工具v2/database_tools.py b/工具v2/database_tools.py index a9881750..a5ed0848 100644 --- a/工具v2/database_tools.py +++ b/工具v2/database_tools.py @@ -2,6 +2,25 @@ import json,re,os,Levenshtein,fitz,time,sys import pandas as pd import pyperclip + +BuildFullScheme = { + "输出路径": "临时文件", + "教师版": True, + "字段显示设置": { + "题后空间": True, + "课时目标": True, + "题目标签": True, + "答案": True, + "解答与提示": True, + "使用记录": [3,-1], + "使用记录说明": "[a,b]表示显示最好的a个和最差b个, 有-2表示不显示, 无-2但有-1表示全部显示", + "来源": True, + "备注": True, + "届别": [] + } + } + + def GetDate(): #获得当前日期 currentdate = str(time.localtime().tm_year)+str(time.localtime().tm_mon).zfill(2)+str(time.localtime().tm_mday).zfill(2) return currentdate #返回当前日期yyyymmdd diff --git a/工具v2/添加关联题目.py b/工具v2/添加关联题目.py index ef9c34b2..1643a98c 100644 --- a/工具v2/添加关联题目.py +++ b/工具v2/添加关联题目.py @@ -23,22 +23,7 @@ class MyWindow(QWidget,Ui_Form): pro_dict = load_dict("../题库0.3/problems.json") obj_dict = load_dict("../题库0.3/LessonObj.json") pro_dict_raw_string = ReadTextFile("../题库0.3/problems.json") - configjson = { - "输出路径": "临时文件", - "教师版": True, - "字段显示设置": { - "题后空间": True, - "课时目标": True, - "题目标签": True, - "答案": True, - "解答与提示": True, - "使用记录": [3,-1], - "使用记录说明": "[a,b]表示显示最好的a个和最差b个, 有-2表示不显示, 无-2但有-1表示全部显示", - "来源": True, - "备注": True, - "届别": [] - } - } + configjson = BuildFullScheme links = CreateIDLinks(generate_number_set(old_ids),generate_number_set(NextSpareIDBlock(starting_id,pro_dict)),pro_dict)