L'élève n'avait aucun moyen de voir les devoirs assignés à sa classe. Cette fonctionnalité ajoute la consultation complète : liste triée par échéance, détail avec pièces jointes, filtrage par matière, et marquage personnel « fait » en localStorage. Le dashboard élève affiche désormais les devoirs à venir avec ouverture du détail en modale, et un lien vers la page complète. L'accès API est sécurisé par vérification de la classe de l'élève (pas d'IDOR) et validation du chemin des pièces jointes (pas de path traversal).
22 lines
592 B
PHP
22 lines
592 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Scolarite\Domain\Repository;
|
|
|
|
use App\Scolarite\Domain\Model\Homework\HomeworkAttachment;
|
|
use App\Scolarite\Domain\Model\Homework\HomeworkId;
|
|
|
|
interface HomeworkAttachmentRepository
|
|
{
|
|
/** @return array<HomeworkAttachment> */
|
|
public function findByHomeworkId(HomeworkId $homeworkId): array;
|
|
|
|
/**
|
|
* @return array<string, bool> Map homeworkId => hasAttachments
|
|
*/
|
|
public function hasAttachments(HomeworkId ...$homeworkIds): array;
|
|
|
|
public function save(HomeworkId $homeworkId, HomeworkAttachment $attachment): void;
|
|
}
|