feat(academy): bridge Academy with Training Engine for course generation
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 46s
CI / test-python-backend-compliance (push) Successful in 31s
CI / test-python-document-crawler (push) Successful in 25s
CI / test-python-dsms-gateway (push) Successful in 29s

- Add POST /academy/courses/generate endpoint that creates an academy
  course from a training module (with content + quiz as lessons)
- Add POST /academy/courses/generate-all to bulk-generate all courses
- Fix academy API response mapping (snake_case → camelCase)
- Fix fetchCourses/fetchCourse/fetchEnrollments/fetchStats to unwrap
  backend response wrappers ({courses:[...]}, {course:{...}})
- Add "Alle Kurse generieren" button to academy overview page
- Fix bulkResult.errors crash in training page (optional chaining)
- Add SetAcademyCourseID to training store for bidirectional linking

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-02-26 11:57:13 +01:00
parent 305a068354
commit 66988d1304
7 changed files with 488 additions and 47 deletions

View File

@@ -235,6 +235,14 @@ func (s *Store) UpdateModule(ctx context.Context, module *TrainingModule) error
return err
}
// SetAcademyCourseID links a training module to an academy course
func (s *Store) SetAcademyCourseID(ctx context.Context, moduleID, courseID uuid.UUID) error {
_, err := s.pool.Exec(ctx, `
UPDATE training_modules SET academy_course_id = $2, updated_at = $3 WHERE id = $1
`, moduleID, courseID, time.Now().UTC())
return err
}
// ============================================================================
// Matrix Operations
// ============================================================================