style: fix linting issues met Prettier
This commit is contained in:
parent
b45fc47b06
commit
18e17e0133
9 changed files with 184 additions and 160 deletions
|
@ -15,7 +15,7 @@ export class AnswerRepository extends DwengoEntityRepository<Answer> {
|
|||
await this.insert(answerEntity);
|
||||
answerEntity.toQuestion = answer.toQuestion;
|
||||
answerEntity.author = answer.author;
|
||||
answerEntity.content = answer.content;
|
||||
answerEntity.content = answer.content;
|
||||
return answerEntity;
|
||||
}
|
||||
public async findAllAnswersToQuestion(question: Question): Promise<Answer[]> {
|
||||
|
|
|
@ -89,9 +89,8 @@ export async function createQuestion(loId: LearningObjectIdentifier, questionDat
|
|||
|
||||
let assignment;
|
||||
|
||||
if ((typeof questionData.inGroup.assignment === "number") && (typeof questionData.inGroup.class === "string")) {
|
||||
assignment = await fetchAssignment(questionData.inGroup.class,
|
||||
questionData.inGroup.assignment);
|
||||
if (typeof questionData.inGroup.assignment === 'number' && typeof questionData.inGroup.class === 'string') {
|
||||
assignment = await fetchAssignment(questionData.inGroup.class, questionData.inGroup.assignment);
|
||||
} else {
|
||||
// TODO check if necessary and no conflicts to delete this if
|
||||
const clazz = await getClassRepository().findById((questionData.inGroup.assignment as AssignmentDTO).within);
|
||||
|
@ -99,14 +98,14 @@ export async function createQuestion(loId: LearningObjectIdentifier, questionDat
|
|||
}
|
||||
|
||||
const inGroup = await getGroupRepository().findByAssignmentAndGroupNumber(assignment, questionData.inGroup.groupNumber);
|
||||
|
||||
|
||||
const question = await questionRepository.createQuestion({
|
||||
loId,
|
||||
author,
|
||||
inGroup: inGroup!,
|
||||
content,
|
||||
});
|
||||
|
||||
|
||||
return mapToQuestionDTO(question);
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ export function makeTestAnswers(em: EntityManager, teachers: Teacher[], question
|
|||
toQuestion: getQuestion07(),
|
||||
sequenceNumber: 1,
|
||||
timestamp: new Date(),
|
||||
content: "this is a test answer"
|
||||
content: 'this is a test answer',
|
||||
});
|
||||
|
||||
const answer05 = em.create(Answer, {
|
||||
|
@ -44,7 +44,7 @@ export function makeTestAnswers(em: EntityManager, teachers: Teacher[], question
|
|||
toQuestion: getQuestion07(),
|
||||
sequenceNumber: 2,
|
||||
timestamp: new Date(),
|
||||
content: "this is a test answer"
|
||||
content: 'this is a test answer',
|
||||
});
|
||||
|
||||
return [answer01, answer02, answer03, answer04, answer05];
|
||||
|
|
|
@ -73,7 +73,7 @@ export function makeTestQuestions(em: EntityManager, students: Student[], groups
|
|||
timestamp: new Date(),
|
||||
content: 'question',
|
||||
});
|
||||
|
||||
|
||||
question07 = em.create(Question, {
|
||||
learningObjectLanguage: Language.English,
|
||||
learningObjectVersion: 1,
|
||||
|
@ -93,7 +93,7 @@ export function makeTestQuestions(em: EntityManager, students: Student[], groups
|
|||
author: getTestleerling1(),
|
||||
inGroup: getGroup1ConditionalLearningPath(),
|
||||
timestamp: new Date(),
|
||||
content: 'this is a second test question'
|
||||
content: 'this is a second test question',
|
||||
});
|
||||
|
||||
return [question01, question02, question03, question04, question05, question06, question07, question08];
|
||||
|
@ -108,4 +108,4 @@ export function getQuestion07(): Question {
|
|||
|
||||
export function getQuestion08(): Question {
|
||||
return question08;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue