Merge branch 'dev' into test/testen-voor-datalaag-#87
This commit is contained in:
commit
79393d6552
161 changed files with 9836 additions and 3751 deletions
|
@ -4,11 +4,7 @@ import { LearningObjectIdentifier } from '../../entities/content/learning-object
|
|||
import { Student } from '../../entities/users/student.entity.js';
|
||||
|
||||
export class QuestionRepository extends DwengoEntityRepository<Question> {
|
||||
public createQuestion(question: {
|
||||
loId: LearningObjectIdentifier;
|
||||
author: Student;
|
||||
content: string;
|
||||
}): Promise<Question> {
|
||||
public createQuestion(question: { loId: LearningObjectIdentifier; author: Student; content: string }): Promise<Question> {
|
||||
const questionEntity = this.create({
|
||||
learningObjectHruid: question.loId.hruid,
|
||||
learningObjectLanguage: question.loId.language,
|
||||
|
@ -24,9 +20,7 @@ export class QuestionRepository extends DwengoEntityRepository<Question> {
|
|||
questionEntity.content = question.content;
|
||||
return this.insert(questionEntity);
|
||||
}
|
||||
public findAllQuestionsAboutLearningObject(
|
||||
loId: LearningObjectIdentifier
|
||||
): Promise<Question[]> {
|
||||
public findAllQuestionsAboutLearningObject(loId: LearningObjectIdentifier): Promise<Question[]> {
|
||||
return this.findAll({
|
||||
where: {
|
||||
learningObjectHruid: loId.hruid,
|
||||
|
@ -38,10 +32,7 @@ export class QuestionRepository extends DwengoEntityRepository<Question> {
|
|||
},
|
||||
});
|
||||
}
|
||||
public removeQuestionByLearningObjectAndSequenceNumber(
|
||||
loId: LearningObjectIdentifier,
|
||||
sequenceNumber: number
|
||||
): Promise<void> {
|
||||
public removeQuestionByLearningObjectAndSequenceNumber(loId: LearningObjectIdentifier, sequenceNumber: number): Promise<void> {
|
||||
return this.deleteWhere({
|
||||
learningObjectHruid: loId.hruid,
|
||||
learningObjectLanguage: loId.language,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue