Merge branch 'dev' into feat/endpoints-beschermen-met-authenticatie-#105
This commit is contained in:
commit
6edb5f144d
46 changed files with 10216 additions and 1054 deletions
|
@ -62,9 +62,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,
|
||||
});
|
||||
|
@ -77,6 +75,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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue