diff --git a/ui/src/app/enrolment/finished/exam-participation.component.html b/ui/src/app/enrolment/finished/exam-participation.component.html
index d5d096590..fd59d1ed6 100644
--- a/ui/src/app/enrolment/finished/exam-participation.component.html
+++ b/ui/src/app/enrolment/finished/exam-participation.component.html
@@ -72,8 +72,8 @@
>
{{ 'i18n_comments_open' | translate }}
{{ 'i18n_comments_hide' | translate }}
-
-
+
+
diff --git a/ui/src/app/exam/editor/sections/section-question.component.html b/ui/src/app/exam/editor/sections/section-question.component.html
index a8d252bb9..9e70f1b2f 100644
--- a/ui/src/app/exam/editor/sections/section-question.component.html
+++ b/ui/src/app/exam/editor/sections/section-question.component.html
@@ -83,16 +83,8 @@
>
{{ 'i18n_show_more' | translate }}
{{ 'i18n_hide' | translate }}
-
-
+
+
}
diff --git a/ui/src/app/examination/question/examination-question.component.html b/ui/src/app/examination/question/examination-question.component.html
index f2969440e..7f6ca1066 100644
--- a/ui/src/app/examination/question/examination-question.component.html
+++ b/ui/src/app/examination/question/examination-question.component.html
@@ -20,8 +20,21 @@
}
+
+
+
+
-
+
@if (sq.question.type !== 'ClozeTestQuestion') {
@if (expanded) {
@@ -38,18 +51,6 @@
}
-
-
@if (sq.answerInstructions && expanded) {
diff --git a/ui/src/app/examination/question/examination-question.component.ts b/ui/src/app/examination/question/examination-question.component.ts
index 779df643f..14860797d 100644
--- a/ui/src/app/examination/question/examination-question.component.ts
+++ b/ui/src/app/examination/question/examination-question.component.ts
@@ -5,7 +5,7 @@
import { NgClass, SlicePipe, UpperCasePipe } from '@angular/common';
import type { AfterViewInit } from '@angular/core';
import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core';
-import { TranslateModule } from '@ngx-translate/core';
+import { TranslateModule, TranslateService } from '@ngx-translate/core';
import type { Examination, ExaminationQuestion } from 'src/app/examination/examination.model';
import { ExaminationService } from 'src/app/examination/examination.service';
import { EssayAnswer } from 'src/app/question/question.model';
@@ -52,6 +52,7 @@ export class ExaminationQuestionComponent implements OnInit, AfterViewInit {
private cdr: ChangeDetectorRef,
private Examination: ExaminationService,
private Attachment: AttachmentService,
+ private translate: TranslateService,
) {}
ngOnInit() {
@@ -61,6 +62,27 @@ export class ExaminationQuestionComponent implements OnInit, AfterViewInit {
const { answer } = this.sq.clozeTestAnswer;
this.clozeAnswer = JSON.parse(answer);
}
+ this.questionTitle = this.removeParagraphTags(this.sq.question.question);
+ }
+
+ removeParagraphTags(input: string): string {
+ const openTag = '';
+ const closeTag = '
';
+ let result = input;
+
+ while (result.includes(openTag)) {
+ result = result.replace(openTag, '');
+ }
+
+ while (result.includes(closeTag)) {
+ result = result.replace(closeTag, '');
+ }
+
+ return result;
+ }
+
+ parseAriaLabel(expanded: string): string {
+ return `${this.translate.instant(expanded)} ${this.translate.instant('i18n_question')} ${this.questionTitle}`;
}
ngAfterViewInit() {