提交 f1d445ec 编写于 作者: M Mars Liu

fixed odd orders

上级 29df6344
...@@ -303,6 +303,9 @@ class TreeWalker: ...@@ -303,6 +303,9 @@ class TreeWalker:
for e in config.get("export", []): for e in config.get("export", []):
full_name = os.path.join(section_path, e) full_name = os.path.join(section_path, e)
exercise = load_json(full_name) exercise = load_json(full_name)
if "exercise_id" not in exercise: if "exercise_id" not in exercise or exercise.get("exercise_id") in id_set:
exercise["exercise_id"] = uuid.uuid4().hex eid = uuid.uuid4().hex
exercise["exercise_id"] = eid
dump_json(full_name, exercise, True, True) dump_json(full_name, exercise, True, True)
else:
id_set.add(exercise["exercise_id"])
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册