Skip to content

Commit

Permalink
CSCEXAM-1208 Question tag casing issue modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Matti Lupari authored and lupari committed Dec 4, 2023
1 parent 0e58000 commit 6767ba2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/controllers/QuestionController.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private Question parseFromBody(Http.Request request, User user, Question existin
}
if (tag.isEmpty()) {
Tag newTag = new Tag();
newTag.setName(tagNode.get("name").asText());
newTag.setName(tagNode.get("name").asText().toLowerCase());
newTag.setCreatorWithDate(user);
newTag.setModifier(user);
tag = Optional.of(newTag);
Expand Down
2 changes: 1 addition & 1 deletion app/util/xml/MoodleXmlImporterImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class MoodleXmlImporterImpl @Inject()(fileHandler: FileHandler) extends MoodleXm
case h :: _ => h
case _ =>
val t = new Tag
t.setName(text)
t.setName(text.toLowerCase)
t.setCreator(user)
t
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class LibraryResultsComponent implements OnInit, OnChanges {
return user;
};

printTags = (question: LibraryQuestion) => question.tags.map((t) => t.name.toUpperCase()).join(', ');
printTags = (question: LibraryQuestion) => question.tags.map((t) => t.name).join(', ');

pageSelected = (event: { page: number }) => (this.currentPage = event.page);

Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/question/tags/tag-picker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import { QuestionDraft } from '../question.service';
maxlength="30"
class="form-control col-md-8"
[(ngModel)]="tagName"
lowerCase
xmLowerCase
[ngbTypeahead]="getTags$"
(selectItem)="onTagSelect($event)"
[resultFormatter]="nameFormat"
Expand Down

0 comments on commit 6767ba2

Please sign in to comment.