reconstruit le tableau de bord du prof dans le style de /cockpit, avec les vraies données (chantier vrai cockpit, étape 1)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
78030de488
commit
0573894721
6 changed files with 302 additions and 41 deletions
|
|
@ -202,11 +202,26 @@ class VisioController extends Controller
|
|||
return $eleve->prenom.($eleve->nom ? ' '.mb_strtoupper(mb_substr($eleve->nom, 0, 1)).'.' : '');
|
||||
}
|
||||
|
||||
private function cle(Seance $seance): string
|
||||
/**
|
||||
* Lu aussi par le tableau de bord du prof (ClasseController), d'où la
|
||||
* visibilité publique de la clé et de ce compteur — jamais du contenu
|
||||
* complet de l'état (noms des élèves), seulement un chiffre.
|
||||
*/
|
||||
public static function cleEtat(Seance $seance): string
|
||||
{
|
||||
return "visio:{$seance->id}";
|
||||
}
|
||||
|
||||
public static function nombreMainsLevees(Seance $seance): int
|
||||
{
|
||||
return count((Cache::get(self::cleEtat($seance)) ?? [])['mains'] ?? []);
|
||||
}
|
||||
|
||||
private function cle(Seance $seance): string
|
||||
{
|
||||
return self::cleEtat($seance);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{mains: array<int, array{nom: string, depuis: int}>, participants: array<int, string>, presences: array<int, array{nom: string, vu: int}>}
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue