split cards

This commit is contained in:
2026-05-01 21:12:05 +02:00
parent 214dd0b6a6
commit 2b65876525
6 changed files with 171 additions and 25 deletions

View File

@@ -131,6 +131,11 @@ def get_student_context(db: Session, student_id: int) -> str:
lines.append(
f"Leçon programme sélectionnée par le professeur: {lesson['title']} ({lesson['subject']}, {lesson['grade']})."
)
first_asset = (lesson.get("assets") or [None])[0]
if first_asset:
section_titles = [section["title"] for section in first_asset.get("sections", [])]
if section_titles:
lines.append("Étapes de la première fiche: " + ", ".join(section_titles) + ".")
for mastery_row, skill in mastery:
lines.append(
f"- {skill.label}: score={mastery_row.mastery_score:.1f}, confiance={mastery_row.confidence:.2f}, preuves={mastery_row.evidence_count}"