Skip to content

Commit

Permalink
FULL support for open ended questions
Browse files Browse the repository at this point in the history
  • Loading branch information
orn8 authored Mar 23, 2024
1 parent 8921be9 commit 2966cee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ <h1>KahootFetcher</h1>
alert('Question ' + (i + 1) + ': ' + jumbleAnswer);
} else if (question.type === 'survey') {
alert('Question ' + (i + 1) + ': This question is a poll');
} else if (question.type === 'open_ended') {
const openEndedAnswers = question.choices.map(choice => choice.answer).join(' OR ');
alert('Question ' + (i + 1) + ': ' + openEndedAnswers);
} else {
alert('Question ' + (i + 1) + ': ' + '[' + (correctIndex + 1) + '] ' + color + answerDisplay);
}
Expand Down
4 changes: 4 additions & 0 deletions lite/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,13 @@
alert('Question ' + (i + 1) + ': ' + jumbleAnswer);
} else if (question.type === 'survey') {
alert('Question ' + (i + 1) + ': This question is a poll');
} else if (question.type === 'open_ended') {
const openEndedAnswers = question.choices.map(choice => choice.answer).join(' OR ');
alert('Question ' + (i + 1) + ': ' + openEndedAnswers);
} else {
alert('Question ' + (i + 1) + ': ' + '[' + (correctIndex + 1) + '] ' + color + answerDisplay);
}
}
});
})();
Expand Down

0 comments on commit 2966cee

Please sign in to comment.