From 848772de25e70247de3b716e2b45af1519932bc3 Mon Sep 17 00:00:00 2001 From: AIIrondev Date: Wed, 26 Aug 2026 12:57:11 +0200 Subject: [PATCH] Changes to the build_module_config_string --- Website/main.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Website/main.py b/Website/main.py index 180a044..7f529b3 100644 --- a/Website/main.py +++ b/Website/main.py @@ -2182,12 +2182,21 @@ PACKAGE_MODULE_MAP = { def build_module_config_string(package_list: list) -> str: active_modules = set() + for pkg in package_list: pkg_key = pkg.strip().lower() + + # 1. Direkter Modulname if pkg_key in ALL_MODULE_KEYS: active_modules.add(pkg_key) + # 2. Exaktes Paket-Mapping elif pkg_key in PACKAGE_MODULE_MAP: active_modules.update(PACKAGE_MODULE_MAP[pkg_key]) + # 3. Fallback für Teilstrings (z.B. "startpaket" -> "starter") + elif "start" in pkg_key: + active_modules.update(["library", "inventory", "student_cards"]) + elif "advanced" in pkg_key or "komplett" in pkg_key: + active_modules.update(ALL_MODULE_KEYS) config_parts = [ f"{mod}={'on' if mod in active_modules else 'off'}"