feat: Calculer automatiquement les moyennes après chaque saisie de notes
Les enseignants ont besoin de moyennes à jour immédiatement après la publication ou modification des notes, sans attendre un batch nocturne. Le système recalcule via Domain Events synchrones : statistiques d'évaluation (min/max/moyenne/médiane), moyennes matières pondérées (normalisation /20), et moyenne générale par élève. Les résultats sont stockés dans des tables dénormalisées avec cache Redis (TTL 5 min). Trois endpoints API exposent les données avec contrôle d'accès par rôle. Une commande console permet le backfill des données historiques au déploiement.
This commit is contained in:
@@ -61,7 +61,7 @@ test.describe('Admin Class Detail Page [P1]', () => {
|
||||
await page.locator('#email').fill(ADMIN_EMAIL);
|
||||
await page.locator('#password').fill(ADMIN_PASSWORD);
|
||||
await Promise.all([
|
||||
page.waitForURL(/\/dashboard/, { timeout: 30000 }),
|
||||
page.waitForURL(/\/dashboard/, { timeout: 60000 }),
|
||||
page.getByRole('button', { name: /se connecter/i }).click()
|
||||
]);
|
||||
}
|
||||
@@ -168,13 +168,13 @@ test.describe('Admin Class Detail Page [P1]', () => {
|
||||
|
||||
// Go back to list and verify the new name appears (use search for pagination)
|
||||
await page.goto(`${ALPHA_URL}/admin/classes`);
|
||||
await page.waitForLoadState('networkidle');
|
||||
const searchInput = page.locator('input[type="search"]');
|
||||
if (await searchInput.isVisible()) {
|
||||
await searchInput.fill(newName);
|
||||
await page.waitForTimeout(500);
|
||||
await page.waitForLoadState('networkidle');
|
||||
}
|
||||
await expect(page.getByText(newName)).toBeVisible({ timeout: 10000 });
|
||||
await expect(page.getByText(newName)).toBeVisible({ timeout: 15000 });
|
||||
});
|
||||
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user