diff --git a/evap/staff/templates/staff_text_answer_warnings.html b/evap/staff/templates/staff_text_answer_warnings.html index 423bbfc5249c801def46647ec288989f0c0baa8e..a8072faedb0805cef43c60d8488b4a5392d48b49 100644 --- a/evap/staff/templates/staff_text_answer_warnings.html +++ b/evap/staff/templates/staff_text_answer_warnings.html @@ -83,7 +83,7 @@ </div> <div class="col-answer col-lg-8 col-xl-7 d-flex"> <div class="vote-inputs"> - <textarea id="preview-textarea"></textarea> + <textarea id="preview-textarea" class="form-control"></textarea> </div> </div> </div> diff --git a/evap/static/ts/src/text-answer-warnings.ts b/evap/static/ts/src/text-answer-warnings.ts index aa61ffac2182e15ccaf9fef2e41df6890a489539..bafd580ef39f69c7a05fb9c56ddd59f74cfcc1ae 100644 --- a/evap/static/ts/src/text-answer-warnings.ts +++ b/evap/static/ts/src/text-answer-warnings.ts @@ -3,7 +3,7 @@ function normalize(text: string) { } function isTextMeaningless(text: string): boolean { - return text.length > 0 && ["", "ka", "na"].includes(text.replace(/\W/g, "")); + return text.length > 0 && ["", "ka", "na", "none", "keine", "keines", "keiner"].includes(text.replace(/\W/g, "")); } function doesTextContainTriggerString(text: string, triggerStrings: string[]): boolean { diff --git a/evap/static/ts/tests/unit/text-answer-warnings.ts b/evap/static/ts/tests/unit/text-answer-warnings.ts index 95adc2864fc26834a46c2aa9094ed3c0a2e21bd2..0a8a60d878dbcfcdcdbdb6c8225b5814450b1018 100644 --- a/evap/static/ts/tests/unit/text-answer-warnings.ts +++ b/evap/static/ts/tests/unit/text-answer-warnings.ts @@ -25,6 +25,7 @@ test.each([ "n/A", "k.A.", "-/-", + "none." ])("detect as meaningless: %j", text => { const normalized = testable.normalize(text); expect(testable.isTextMeaningless(normalized)).toBe(true); @@ -34,6 +35,7 @@ test.each([ "", "c", "word", + "Kanone", "I didn't understand the definition of n/A", "The abbreviation k.A. is known to me, but maybe not to all" ])("do not detect as meaningless: %j", text => { diff --git a/evap/student/templates/student_vote_questionnaire_group.html b/evap/student/templates/student_vote_questionnaire_group.html index 0998bcdc8a5090579a5d5e3984af6a915d3d2bdf..987518f38ddc0e9b3e0cbe339c3db4905b00b77e 100644 --- a/evap/student/templates/student_vote_questionnaire_group.html +++ b/evap/student/templates/student_vote_questionnaire_group.html @@ -57,7 +57,7 @@ <div class="col-answer d-flex"> <div class="vote-inputs tab-row {% if preview %} preview{% endif %}"> {{ field.errors }} - <textarea id="{{ field.id_for_label }}" class="tab-selectable" name="{{ field.name }}"{% if preview %} disabled{% endif %}>{{ field.value|default_if_none:"" }}</textarea> + <textarea id="{{ field.id_for_label }}" class="form-control tab-selectable" name="{{ field.name }}"{% if preview %} disabled{% endif %}>{{ field.value|default_if_none:"" }}</textarea> </div> <div> {% blocktrans asvar intro_text %}After publishing, this text answer can be seen by:{% endblocktrans %}