Merge branch 'dev' into feat/leerpad-vragen

This commit is contained in:
Timo De Meyst 2025-04-24 21:10:15 +02:00 committed by GitHub
commit 8240059c2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
60 changed files with 10729 additions and 1042 deletions

View file

@ -63,9 +63,7 @@ export class QuestionRepository extends DwengoEntityRepository<Question> {
public async findAllByAssignment(assignment: Assignment): Promise<Question[]> {
return this.find({
inGroup: {
$contained: assignment.groups,
},
inGroup: assignment.groups.getItems(),
learningObjectHruid: assignment.learningPathHruid,
learningObjectLanguage: assignment.learningPathLanguage,
});
@ -78,6 +76,13 @@ export class QuestionRepository extends DwengoEntityRepository<Question> {
});
}
public async findAllByGroup(inGroup: Group): Promise<Question[]> {
return this.findAll({
where: { inGroup },
orderBy: { timestamp: 'DESC' },
});
}
/**
* Looks up all questions for the given learning object which were asked as part of the given assignment.
* When forStudentUsername is set, only the questions within the given user's group are shown.