Rename MC to MultipleChoice, implement SingleChoice option, and update documentation
This commit is contained in:
@@ -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'], ''),
|
||||
|
||||
Reference in New Issue
Block a user