Rename MC to MultipleChoice, implement SingleChoice option, and update documentation

This commit is contained in:
2026-04-26 15:22:13 +02:00
parent 1ee2b265b6
commit 3b725e3096
3 changed files with 34 additions and 34 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ function extractFieldValue(field, fallback) {
}
function getTyp(question) {
return extractFieldValue(question['Typ'], 'MC').toLowerCase();
return extractFieldValue(question['Typ'], 'MultipleChoice').toLowerCase();
}
function checkFreitext(userAnswer, correctAnswer) {
@@ -134,7 +134,7 @@ function sanitizeQuestion(question) {
const sanitized = {
id: question.id,
frage: question['Frage'] || '',
typ: extractFieldValue(question['Typ'], 'MC'),
typ: extractFieldValue(question['Typ'], 'MultipleChoice'),
bild: null,
antworten: [],
kategorie: extractFieldValue(question['Kategorie'], ''),