fix: Logica vragen stellen gecorrigeerd (WIP)
This commit is contained in:
		
							parent
							
								
									1d9141bab7
								
							
						
					
					
						commit
						8edd4f0225
					
				
					 5 changed files with 17 additions and 21 deletions
				
			
		|  | @ -18,13 +18,8 @@ export class QuestionRepository extends DwengoEntityRepository<Question> { | |||
|             content: question.content, | ||||
|             timestamp: new Date(), | ||||
|         }); | ||||
|         await this.insert(questionEntity); | ||||
|         questionEntity.learningObjectHruid = question.loId.hruid; | ||||
|         questionEntity.learningObjectLanguage = question.loId.language; | ||||
|         questionEntity.learningObjectVersion = question.loId.version; | ||||
|         questionEntity.author = question.author; | ||||
|         questionEntity.inGroup = question.inGroup; | ||||
|         questionEntity.content = question.content; | ||||
|         console.log(questionEntity) | ||||
|         await this.save(questionEntity, { preventOverwrite: true }); | ||||
|         return questionEntity; | ||||
|     } | ||||
|     public async findAllQuestionsAboutLearningObject(loId: LearningObjectIdentifier): Promise<Question[]> { | ||||
|  |  | |||
|  | @ -6,6 +6,9 @@ import { Group } from '../assignments/group.entity.js'; | |||
| 
 | ||||
| @Entity({ repository: () => QuestionRepository }) | ||||
| export class Question { | ||||
|     @PrimaryKey({ type: 'integer', autoincrement: true }) | ||||
|     sequenceNumber?: number; | ||||
| 
 | ||||
|     @PrimaryKey({ type: 'string' }) | ||||
|     learningObjectHruid!: string; | ||||
| 
 | ||||
|  | @ -18,9 +21,6 @@ export class Question { | |||
|     @PrimaryKey({ type: 'number' }) | ||||
|     learningObjectVersion = 1; | ||||
| 
 | ||||
|     @PrimaryKey({ type: 'integer', autoincrement: true }) | ||||
|     sequenceNumber?: number; | ||||
| 
 | ||||
|     @ManyToOne({ entity: () => Group }) | ||||
|     inGroup!: Group; | ||||
| 
 | ||||
|  |  | |||
		Reference in a new issue
	
	 Gerald Schmittinger
						Gerald Schmittinger