From 218f6e7d649dac71060760f2cb0cf585d64ab997 Mon Sep 17 00:00:00 2001 From: RaymondVerhoef Date: Tue, 2 Jun 2026 16:37:50 +0200 Subject: [PATCH] feat: theme-grouped pickers, theme-session content panel, theme/topic naming - Admin Topic Quizzes (was Quizzes): topics are now grouped under collapsible theme headers with per-theme counts. Topics without a theme fall into a "No theme" bucket rendered last. - /topic-test picker: eligible topics grouped by theme so learners can scan a curriculum theme and drill its topics on demand. - Fix admin Theme Content panel (was Learning Content): it was empty because content moved to the theme_sessions collection in an earlier refactor while the panel still queried the legacy per-topic content table. Rewrites ContentManager to read db.getAllThemeSessions and render the emit_theme_session schema (title, intro, topic sections, connections, key takeaways). Adds db.getAllThemeSessions and db.deleteThemeSession. - Disambiguate theme vs topic across the app: the weekly curriculum test is now "Theme Test" (nav, page heading, Dashboard card, button, explainer); the on-demand bank test stays "Topic Test". Admin nav also clarified to "Theme Content" / "Topic Quizzes". No schema changes. 85/85 tests still pass, build green. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/App.jsx | 4 +- src/components/admin/ContentManager.jsx | 298 +++++++++++++----------- src/components/admin/TestManager.jsx | 122 +++++++--- src/lib/db.js | 18 ++ src/pages/Admin/index.jsx | 12 +- src/pages/Dashboard.jsx | 16 +- src/pages/Testen.jsx | 4 +- src/pages/TopicTest.jsx | 67 ++++-- 8 files changed, 336 insertions(+), 205 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index ae08b2b..e40947a 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -50,7 +50,7 @@ const ProtectedRoute = ({ children, requireAdmin, skipEnrollmentGate }) => {
Dashboard Learn - Test + Theme Test Topic Test Leaderboard {state.currentUser.role === 'admin' && ( @@ -78,7 +78,7 @@ const ProtectedRoute = ({ children, requireAdmin, skipEnrollmentGate }) => {