Transform AI toggle into Teacher Parameters with simulation type control
Backend changes (app.py): - Added _simulation_type global variable (normal/external_event) - Created /api/teacher_params GET/POST endpoints for managing both AI and simulation settings - Updated load_test_data() to load appropriate test data based on simulation type - Added support for external events test data file - Kept legacy /api/ai_status and /api/toggle_ai endpoints for backward compatibility Frontend changes (base.html): - Replaced "AI Toggle" button with "Teacher Parameters" button - Added status indicators for AI (green/red) and Simulation type (green/yellow) - Created comprehensive Teacher Parameters modal with: * Password authentication step * AI enable/disable toggle * Simulation type selection (normal vs external event) * Two-step flow: authenticate first, then configure parameters - Updated JavaScript to handle teacher parameters and status indicators - Status indicators update in real-time when parameters change Features: - Teachers can now control both AI availability and which 11th year dataset is used - Visual indicators show current state at a glance - Same password authentication as before (HorloML-AI) - Seamless UX with clear feedback on parameter changes
Loading
Please sign in to comment