short_answer= tested and implemented; local preview works, but canvas isn't getting the answers

This commit is contained in:
Adam Teichert
2025-01-15 17:42:39 -07:00
parent ade3f4dca4
commit 5f11fe76f1
4 changed files with 131 additions and 23 deletions

View File

@@ -28,6 +28,12 @@ const getAnswers = (
}));
};
export const getQuestionType = (
question: LocalQuizQuestion
) => {
return `${question.questionType.replace("=", "")}_question`;
}
const createQuestionOnly = async (
canvasCourseId: number,
canvasQuizId: number,
@@ -41,7 +47,7 @@ const createQuestionOnly = async (
const body = {
question: {
question_text: markdownToHTMLSafe(question.text, settings),
question_type: `${question.questionType}_question`,
question_type: getQuestionType(question),
points_possible: question.points,
position,
answers: getAnswers(question, settings),