diff --git a/app/controllers/QuestionController.java b/app/controllers/QuestionController.java index 722b55fdb..f641f3d11 100644 --- a/app/controllers/QuestionController.java +++ b/app/controllers/QuestionController.java @@ -94,7 +94,7 @@ public Result getQuestions( } PathProperties pp = PathProperties.parse( "*, modifier(firstName, lastName), questionOwners(id, firstName, lastName, userIdentifier, email), " + - "attachment(id, fileName), options(defaultScore, correctOption, claimChoiceType), tags(id, name), examSectionQuestions(examSection(exam(state, examActiveEndDate, course(code)))))" + "attachment(id, fileName), options(defaultScore, correctOption, claimChoiceType), tags(id, name, creator(id)), examSectionQuestions(examSection(exam(state, examActiveEndDate, course(code)))))" ); Query query = DB.find(Question.class); pp.apply(query); diff --git a/ui/src/app/question/tags/tag-picker.component.ts b/ui/src/app/question/tags/tag-picker.component.ts index caf221c8e..e84c81a81 100644 --- a/ui/src/app/question/tags/tag-picker.component.ts +++ b/ui/src/app/question/tags/tag-picker.component.ts @@ -87,7 +87,6 @@ export class TagPickerComponent implements OnInit { newTag: Tag = { name: '', questions: [] }; ownTags: Tag[] = []; - constructor(private http: HttpClient, private Session: SessionService) {} ngOnInit() { @@ -122,7 +121,10 @@ export class TagPickerComponent implements OnInit { nameFormat = (tag: Tag) => tag.name; addTag = () => { - if (this.newTag) this.question.tags.push(this.newTag); + if (this.newTag) { + this.question.tags.push(this.newTag); + this.ownTags.push(this.newTag); + } this.newTag = { name: '', questions: [] }; this.tagName = ''; };