feat: get all submissions route toegevoegd

This commit is contained in:
Adriaan Jacquet 2025-04-01 17:02:42 +02:00
parent 7ae2f1de0c
commit 6290d3dd9b
4 changed files with 59 additions and 41 deletions

View file

@ -14,6 +14,14 @@ export class SubmissionRepository extends DwengoEntityRepository<Submission> {
});
}
public findByLearningObject(loId: LearningObjectIdentifier): Promise<Submission[]> {
return this.find({
learningObjectHruid: loId.hruid,
learningObjectLanguage: loId.language,
learningObjectVersion: loId.version,
});
}
public findMostRecentSubmissionForStudent(loId: LearningObjectIdentifier, submitter: Student): Promise<Submission | null> {
return this.findOne(
{