Files
encoach_frontend_new_v2/frontend/src/services/adaptive-engine.service.ts
Yamen Ahmad 82ec3debcc feat: QA fixes, new APIs (assignments, rubrics, custom exams), Generation page enhancements
- Fix ELAI video generation (correct render endpoint, script splitting for 60s limit)
- Fix speaking script generation error handling and empty response display
- Add custom exam list API (GET /api/exam/custom/list)
- Add assignments REST API (list, create, get)
- Add rubrics REST API (list, create)
- Enhance Generation page: dynamic exam structures, auto-module selection, preview dialog, audio player
- Improve submit feedback with exam ID and status in toast notifications
- Fix ExamsListPage to show both custom exams and exam sessions
- Connect RubricsPage to backend API with fallback data
- Add Dockerfile, docker-compose.yml, requirements.txt for deployment
- Fix placement, grading, scoring, and auth controllers
- Add ErrorBoundary component for frontend resilience
- Add QA report and credentials documentation

Made-with: Cursor
2026-04-12 14:26:39 +04:00

31 lines
1.1 KiB
TypeScript

import { api } from "@/lib/api-client";
import type {
AdaptiveDashboardMetrics,
AdaptiveEngineStudentRow,
AdaptiveThresholdSettings,
StudentAbilityModel,
StudentAdaptiveSignal,
} from "@/types";
import type { ApiSuccessResponse } from "@/types";
export const adaptiveEngineService = {
getDashboard: () => api.get<AdaptiveDashboardMetrics>("/adaptive/dashboard"),
getStudents: (params?: { page?: number; limit?: number }) =>
api.get<{ data: AdaptiveEngineStudentRow[]; pagination?: { total: number; page: number } }>(
"/adaptive/students",
params as Record<string, string | number | boolean | undefined>,
),
getStudentSignals: (studentId: number) =>
api.get<StudentAdaptiveSignal[]>(`/adaptive/student/${studentId}/signals`),
getStudentAbility: (studentId: number) =>
api.get<StudentAbilityModel>(`/adaptive/student/${studentId}/ability`),
getSettings: () => api.get<AdaptiveThresholdSettings>("/adaptive/settings"),
updateSettings: (data: AdaptiveThresholdSettings) =>
api.put<ApiSuccessResponse>("/adaptive/settings", data),
};