Files
breakpilot-lehrer/klausur-service/backend/eh_templates_registry.py
Benjamin Admin b4613e26f3 [split-required] Split 500-850 LOC files (batch 2)
backend-lehrer (10 files):
- game/database.py (785 → 5), correction_api.py (683 → 4)
- classroom_engine/antizipation.py (676 → 5)
- llm_gateway schools/edu_search already done in prior batch

klausur-service (12 files):
- orientation_crop_api.py (694 → 5), pdf_export.py (677 → 4)
- zeugnis_crawler.py (676 → 5), grid_editor_api.py (671 → 5)
- eh_templates.py (658 → 5), mail/api.py (651 → 5)
- qdrant_service.py (638 → 5), training_api.py (625 → 4)

website (6 pages):
- middleware (696 → 8), mail (733 → 6), consent (628 → 8)
- compliance/risks (622 → 5), export (502 → 5), brandbook (629 → 7)

studio-v2 (3 components):
- B2BMigrationWizard (848 → 3), CleanupPanel (765 → 2)
- dashboard-experimental (739 → 2)

admin-lehrer (4 files):
- uebersetzungen (769 → 4), manager (670 → 2)
- ChunkBrowserQA (675 → 6), dsfa/page (674 → 5)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-25 08:24:01 +02:00

61 lines
1.6 KiB
Python

"""
Erwartungshorizont Templates — registry for template lookup.
"""
from typing import Dict, List, Optional
from eh_templates_types import EHTemplate, AUFGABENTYPEN
from eh_templates_analyse import (
get_textanalyse_template,
get_gedichtanalyse_template,
get_prosaanalyse_template,
get_dramenanalyse_template,
)
from eh_templates_eroerterung import get_eroerterung_template
TEMPLATES: Dict[str, EHTemplate] = {}
def initialize_templates():
"""Initialize all pre-defined templates."""
global TEMPLATES
TEMPLATES = {
"textanalyse_pragmatisch": get_textanalyse_template(),
"gedichtanalyse": get_gedichtanalyse_template(),
"eroerterung_textgebunden": get_eroerterung_template(),
"prosaanalyse": get_prosaanalyse_template(),
"dramenanalyse": get_dramenanalyse_template(),
}
def get_template(aufgabentyp: str) -> Optional[EHTemplate]:
"""Get a template by Aufgabentyp."""
if not TEMPLATES:
initialize_templates()
return TEMPLATES.get(aufgabentyp)
def list_templates() -> List[Dict]:
"""List all available templates."""
if not TEMPLATES:
initialize_templates()
return [
{
"aufgabentyp": typ,
"name": AUFGABENTYPEN.get(typ, {}).get("name", typ),
"description": AUFGABENTYPEN.get(typ, {}).get("description", ""),
"category": AUFGABENTYPEN.get(typ, {}).get("category", "other"),
}
for typ in TEMPLATES.keys()
]
def get_aufgabentypen() -> Dict:
"""Get all Aufgabentypen definitions."""
return AUFGABENTYPEN
# Initialize on import
initialize_templates()