|
@@ -87,12 +87,15 @@ def single_parse(one_item, item_type, wordid, source="zxhx", subject="数学"):
|
|
|
if not i.replace(":", "").strip()]): # 空选项中:被当成了内容
|
|
|
return "存在选项为空,请补充完整"
|
|
|
new_item_struct["answer_type"] = "选择题"
|
|
|
- elif source in ["xue_guan", "teacher"] and subject not in ["数学", "物理"]: # 拆小题
|
|
|
+ elif ("数学" in subject or "物理" in subject) and source in ["school", "teacher", "xue_guan"]:
|
|
|
+ pass
|
|
|
+ # elif source in ["xue_guan", "teacher"] and subject not in ["数学", "物理"]: # 校本、教师、学管端不拆小题
|
|
|
+ else:
|
|
|
new_item_struct = get_slave(new_item_struct, new_item_struct["stem"], new_item_struct["parse"], new_item_struct["key"])
|
|
|
|
|
|
new_item_struct = wash_after([new_item_struct], subject)[0]
|
|
|
# 换行符替换
|
|
|
- # convert_huanhang(new_item_struct)
|
|
|
+ convert_huanhang(new_item_struct)
|
|
|
# new_item_struct["stem"] = new_item_struct["stem"].strip().replace("\n\n", "\n").replace("\n", "<br/>") # 2020/4/10 gai
|
|
|
# new_item_struct["key"] = new_item_struct["key"].strip().replace("\n\n", "\n").replace("\n", "<br/>")
|
|
|
# new_item_struct["parse"] = new_item_struct["parse"].strip().replace("\n\n", "\n").replace("\n", "<br/>")
|