feat(ai-act-kompass): answer key now includes the questions themselves
The answer key is self-contained for markers: each entry shows the question text, the correct answer spelled out (letter + wording) and the explanation — no need to hold the test sheet next to it. Test updated accordingly (72 green). Claude-Session: https://claude.ai/code/session_017YjohVNx1ZGNM4MX7tHpfv
This commit is contained in:
parent
ca58f1738f
commit
c35318a240
@ -82,10 +82,17 @@ describe('KI-Kompetenztest', () => {
|
|||||||
expect(md).not.toContain('richtige Antwort'); // keine Lösungen im Testbogen
|
expect(md).not.toContain('richtige Antwort'); // keine Lösungen im Testbogen
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Lösungsbogen nennt je Frage den richtigen Buchstaben', () => {
|
it('Lösungsbogen enthält je Frage den Fragetext, die richtige Antwort im Wortlaut und die Erklärung', () => {
|
||||||
const md = answerKeyDoc(CONTENT_PACK, '2026-07-04', profile);
|
const md = answerKeyDoc(CONTENT_PACK, '2026-07-04', profile);
|
||||||
expect(md).toContain('Lösungsbogen');
|
expect(md).toContain('Lösungsbogen');
|
||||||
expect((md.match(/\| \d+ \| \*\*[ABC]\*\* \|/g) ?? []).length).toBe(12);
|
// Fragetext enthalten (selbsterklärend, ohne Testbogen daneben):
|
||||||
|
expect((md.match(/^## \d+\./gm) ?? []).length).toBe(12);
|
||||||
|
expect(md).toContain('Was macht ein KI-System');
|
||||||
|
// Richtige Antwort mit Buchstabe UND Wortlaut:
|
||||||
|
expect((md.match(/\*\*Richtige Antwort: [ABC]\)\*\*/g) ?? []).length).toBe(12);
|
||||||
|
expect(md).toContain('Nein — nur in vom Unternehmen freigegebene KI-Systeme.');
|
||||||
|
// Erklärungen enthalten:
|
||||||
|
expect((md.match(/_Erklärung:_/g) ?? []).length).toBe(12);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Schulungshandout enthält die 12 Erklärungen und ist lokalisiert', () => {
|
it('Schulungshandout enthält die 12 Erklärungen und ist lokalisiert', () => {
|
||||||
|
|||||||
@ -175,7 +175,8 @@ interface PrintStrings {
|
|||||||
readonly testFooter: string;
|
readonly testFooter: string;
|
||||||
readonly keyTitle: string;
|
readonly keyTitle: string;
|
||||||
readonly keyIntro: string;
|
readonly keyIntro: string;
|
||||||
readonly keyCols: string;
|
readonly keyCorrect: string;
|
||||||
|
readonly keyWhy: string;
|
||||||
readonly handoutTitle: string;
|
readonly handoutTitle: string;
|
||||||
readonly handoutIntro: string;
|
readonly handoutIntro: string;
|
||||||
readonly handoutFooter: string;
|
readonly handoutFooter: string;
|
||||||
@ -189,8 +190,9 @@ const PRINT: Readonly<Record<'de' | 'en', PrintStrings>> = {
|
|||||||
nameDateLine: '**Name:** ______________________________ **Datum:** ______________ **Abteilung:** ______________________________',
|
nameDateLine: '**Name:** ______________________________ **Datum:** ______________ **Abteilung:** ______________________________',
|
||||||
testFooter: 'Unterschrift Beschäftigte/r: _______________ Ausgewertet durch (Name, Unterschrift): _______________ Ergebnis: ______ / {total}',
|
testFooter: 'Unterschrift Beschäftigte/r: _______________ Ausgewertet durch (Name, Unterschrift): _______________ Ergebnis: ______ / {total}',
|
||||||
keyTitle: 'KI-Kompetenztest — Lösungsbogen (nur für Auswertende)',
|
keyTitle: 'KI-Kompetenztest — Lösungsbogen (nur für Auswertende)',
|
||||||
keyIntro: 'Richtige Antworten und Erklärungen. Bestehensgrenze: {pct} % ({min} von {total} Fragen).',
|
keyIntro: 'Alle Fragen mit richtiger Antwort und Erklärung. Bestehensgrenze: {pct} % ({min} von {total} Fragen).',
|
||||||
keyCols: '| Nr. | Richtig | Erklärung |',
|
keyCorrect: 'Richtige Antwort',
|
||||||
|
keyWhy: 'Erklärung',
|
||||||
handoutTitle: 'Schulungshandout: Die 12 wichtigsten Regeln im Umgang mit KI',
|
handoutTitle: 'Schulungshandout: Die 12 wichtigsten Regeln im Umgang mit KI',
|
||||||
handoutIntro:
|
handoutIntro:
|
||||||
'Dieses Handout fasst die Kernregeln für den Arbeitsalltag zusammen und dient als Schulungsunterlage nach Art. 4 EU-KI-VO. Es kann vor dem Kompetenztest ausgeteilt werden.',
|
'Dieses Handout fasst die Kernregeln für den Arbeitsalltag zusammen und dient als Schulungsunterlage nach Art. 4 EU-KI-VO. Es kann vor dem Kompetenztest ausgeteilt werden.',
|
||||||
@ -204,8 +206,9 @@ const PRINT: Readonly<Record<'de' | 'en', PrintStrings>> = {
|
|||||||
nameDateLine: '**Name:** ______________________________ **Date:** ______________ **Department:** ______________________________',
|
nameDateLine: '**Name:** ______________________________ **Date:** ______________ **Department:** ______________________________',
|
||||||
testFooter: 'Signature employee: _______________ Marked by (name, signature): _______________ Score: ______ / {total}',
|
testFooter: 'Signature employee: _______________ Marked by (name, signature): _______________ Score: ______ / {total}',
|
||||||
keyTitle: 'AI literacy test — answer key (for markers only)',
|
keyTitle: 'AI literacy test — answer key (for markers only)',
|
||||||
keyIntro: 'Correct answers and explanations. Pass threshold: {pct} % ({min} of {total} questions).',
|
keyIntro: 'All questions with the correct answer and explanation. Pass threshold: {pct} % ({min} of {total} questions).',
|
||||||
keyCols: '| No. | Correct | Explanation |',
|
keyCorrect: 'Correct answer',
|
||||||
|
keyWhy: 'Explanation',
|
||||||
handoutTitle: 'Training handout: the 12 most important rules for working with AI',
|
handoutTitle: 'Training handout: the 12 most important rules for working with AI',
|
||||||
handoutIntro:
|
handoutIntro:
|
||||||
'This handout summarises the core rules for everyday work and serves as training material under Art. 4 EU AI Act. It can be handed out before the literacy test.',
|
'This handout summarises the core rules for everyday work and serves as training material under Art. 4 EU AI Act. It can be handed out before the literacy test.',
|
||||||
@ -282,11 +285,16 @@ export function answerKeyDoc(
|
|||||||
'',
|
'',
|
||||||
fillIn(p.keyIntro),
|
fillIn(p.keyIntro),
|
||||||
'',
|
'',
|
||||||
p.keyCols,
|
|
||||||
'|---|---|---|',
|
|
||||||
];
|
];
|
||||||
getQuiz(locale).forEach((q, i) => {
|
getQuiz(locale).forEach((q, i) => {
|
||||||
lines.push(`| ${i + 1} | **${OPTION_LETTERS[q.correctIndex]}** | ${q.explanation} |`);
|
lines.push(
|
||||||
|
`## ${i + 1}. ${q.question}`,
|
||||||
|
'',
|
||||||
|
`**${p.keyCorrect}: ${OPTION_LETTERS[q.correctIndex]})** ${q.options[q.correctIndex]}`,
|
||||||
|
'',
|
||||||
|
`_${p.keyWhy}:_ ${q.explanation}`,
|
||||||
|
'',
|
||||||
|
);
|
||||||
});
|
});
|
||||||
return lines.join('\n');
|
return lines.join('\n');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user