mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
fix test
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { CanvasModuleItem } from "@/features/canvas/models/modules/canvasModuleItems";
|
||||
import { useLocalCourseSettingsQuery } from "@/features/local/course/localCoursesHooks";
|
||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { canvasModuleService } from "../services/canvasModuleService";
|
||||
|
||||
@@ -29,7 +29,10 @@ export const canvasAssignmentService = {
|
||||
) {
|
||||
console.log(`Creating assignment: ${localAssignment.name}`);
|
||||
const url = `${canvasApi}/courses/${canvasCourseId}/assignments`;
|
||||
const content = markdownToHTMLSafe(localAssignment.description, settings);
|
||||
const content = markdownToHTMLSafe({
|
||||
markdownString: localAssignment.description,
|
||||
settings,
|
||||
});
|
||||
|
||||
const contentWithClassroomLinks =
|
||||
localAssignment.githubClassroomAssignmentShareLink
|
||||
@@ -84,7 +87,10 @@ export const canvasAssignmentService = {
|
||||
allowed_extensions: localAssignment.allowedFileUploadExtensions.map(
|
||||
(e) => e.toString()
|
||||
),
|
||||
description: markdownToHTMLSafe(localAssignment.description, settings),
|
||||
description: markdownToHTMLSafe({
|
||||
markdownString: localAssignment.description,
|
||||
settings,
|
||||
}),
|
||||
due_at: getDateFromString(localAssignment.dueAt)?.toISOString(),
|
||||
lock_at:
|
||||
localAssignment.lockAt &&
|
||||
|
||||
@@ -37,7 +37,7 @@ export const canvasPageService = {
|
||||
const body = {
|
||||
wiki_page: {
|
||||
title: page.name,
|
||||
body: markdownToHTMLSafe(page.text, settings),
|
||||
body: markdownToHTMLSafe({ markdownString: page.text, settings }),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -59,7 +59,7 @@ export const canvasPageService = {
|
||||
const body = {
|
||||
wiki_page: {
|
||||
title: page.name,
|
||||
body: markdownToHTMLSafe(page.text, settings),
|
||||
body: markdownToHTMLSafe({ markdownString: page.text, settings }),
|
||||
},
|
||||
};
|
||||
await axiosClient.put(url, body);
|
||||
|
||||
@@ -30,7 +30,7 @@ export const getAnswers = (
|
||||
});
|
||||
|
||||
return question.answers.map((answer) => ({
|
||||
answer_html: markdownToHTMLSafe(answer.text, settings),
|
||||
answer_html: markdownToHTMLSafe({ markdownString: answer.text, settings }),
|
||||
answer_weight: answer.correct ? 100 : 0,
|
||||
answer_text: answer.text,
|
||||
}));
|
||||
@@ -53,7 +53,10 @@ const createQuestionOnly = async (
|
||||
|
||||
const body = {
|
||||
question: {
|
||||
question_text: markdownToHTMLSafe(question.text, settings),
|
||||
question_text: markdownToHTMLSafe({
|
||||
markdownString: question.text,
|
||||
settings,
|
||||
}),
|
||||
question_type: getQuestionType(question),
|
||||
points_possible: question.points,
|
||||
position,
|
||||
@@ -175,7 +178,10 @@ export const canvasQuizService = {
|
||||
const body = {
|
||||
quiz: {
|
||||
title: localQuiz.name,
|
||||
description: markdownToHTMLSafe(localQuiz.description, settings),
|
||||
description: markdownToHTMLSafe({
|
||||
markdownString: localQuiz.description,
|
||||
settings,
|
||||
}),
|
||||
shuffle_answers: localQuiz.shuffleAnswers,
|
||||
access_code: localQuiz.password,
|
||||
show_correct_answers: localQuiz.showCorrectAnswers,
|
||||
|
||||
Reference in New Issue
Block a user