fix: question service + refactor loID

This commit is contained in:
Gabriellvl 2025-04-06 09:45:01 +02:00
parent dbc1da741c
commit bd75ab8af9
16 changed files with 86 additions and 81 deletions

View file

@ -61,4 +61,13 @@ export class QuestionRepository extends DwengoEntityRepository<Question> {
orderBy: { timestamp: 'DESC' }, // New to old
});
}
public async findByLearningObjectAndSequenceNumber(loId: LearningObjectIdentifier, sequenceNumber: number){
return this.findOne({
learningObjectHruid: loId.hruid,
learningObjectLanguage: loId.language,
learningObjectVersion: loId.version,
sequenceNumber
});
}
}