feature: homework tool
This commit is contained in:
+26
-2
@@ -159,12 +159,35 @@ class Build:
|
||||
content = exam_template.render()
|
||||
page = self.__build_page(
|
||||
content,
|
||||
page_stylesheets=["assets/exam-simulator.css?ts=202608051415"],
|
||||
page_scripts=["assets/vue.global.prod.js", "assets/exam-simulator.js?ts=202608051500"],
|
||||
page_stylesheets=["assets/exam-simulator.css?ts=20260806"],
|
||||
page_scripts=[
|
||||
"assets/vue.global.prod.js",
|
||||
"assets/question-catalog.js?ts=20260806",
|
||||
"assets/exam-simulator.js?ts=20260806",
|
||||
],
|
||||
)
|
||||
with (self.config.p_build / "simulation.html").open("w", encoding="utf-8") as file:
|
||||
file.write(page)
|
||||
|
||||
def __build_homework_tool(self):
|
||||
toc_target = self.config.p_build_assets / "toc"
|
||||
toc_target.mkdir(parents=True, exist_ok=True)
|
||||
for edition in ("N", "NE", "NEA", "E", "EA", "A"):
|
||||
shutil.copyfile(self.config.p_data_toc / f"{edition}.json", toc_target / f"{edition}.json")
|
||||
|
||||
homework_template = self.env.get_template("html/homework.html")
|
||||
page = self.__build_page(
|
||||
homework_template.render(),
|
||||
page_stylesheets=["assets/homework.css?ts=20260806"],
|
||||
page_scripts=[
|
||||
"assets/vue.global.prod.js",
|
||||
"assets/question-catalog.js?ts=20260806",
|
||||
"assets/homework.js?ts=20260806",
|
||||
],
|
||||
)
|
||||
with (self.config.p_build / "hausaufgabe.html").open("w", encoding="utf-8") as file:
|
||||
file.write(page)
|
||||
|
||||
def __copy_picture(self, id):
|
||||
file = f"{id}.svg"
|
||||
try:
|
||||
@@ -542,6 +565,7 @@ class Build:
|
||||
self.__build_html_page(contents, "infos")
|
||||
self.__build_html_page(contents, "suche")
|
||||
self.__build_exam_simulator()
|
||||
self.__build_homework_tool()
|
||||
|
||||
def build_solutions(self):
|
||||
for solution_file in self.config.p_data_solutions.glob("*.md"):
|
||||
|
||||
Reference in New Issue
Block a user