mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
short_answer= tested and implemented; local preview works, but canvas isn't getting the answers
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user