Unverified Commit 77247238 authored by Claude's avatar Claude
Browse files

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
parent 744bce98
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment