diff --git a/nextjs/src/app/newCourse/NewCourseForm.tsx b/nextjs/src/app/newCourse/NewCourseForm.tsx index e4d67f6..5265a23 100644 --- a/nextjs/src/app/newCourse/NewCourseForm.tsx +++ b/nextjs/src/app/newCourse/NewCourseForm.tsx @@ -95,7 +95,8 @@ export default function NewCourseForm() { AssignmentSubmissionType.ONLINE_UPLOAD, ], defaultFileUploadTypes: ["pdf", "png", "jpg", "jpeg"], - defaultLockHoursOffset: 0 + defaultLockHoursOffset: 0, + holidays: {} }, }) .then(() => { diff --git a/nextjs/src/models/local/quiz/utils/quizQuestionMarkdownUtils.ts b/nextjs/src/models/local/quiz/utils/quizQuestionMarkdownUtils.ts index 4e482bc..e3a939f 100644 --- a/nextjs/src/models/local/quiz/utils/quizQuestionMarkdownUtils.ts +++ b/nextjs/src/models/local/quiz/utils/quizQuestionMarkdownUtils.ts @@ -3,7 +3,18 @@ import { LocalQuizQuestion, QuestionType } from "../localQuizQuestion"; import { LocalQuizQuestionAnswer } from "../localQuizQuestionAnswer"; import { quizQuestionAnswerMarkdownUtils } from "./quizQuestionAnswerMarkdownUtils"; -const _validFirstAnswerDelimiters = ["*a)", "a)", "*)", ")", "[ ]", "[]", "[*]", "^"]; +const _validFirstAnswerDelimiters = [ + "*a)", + "a)", + "*)", + ")", + "[ ]", + "[]", + "[*]", + "^", +]; +const _multipleChoicePrefix = ["a)", "*a)", "*)", ")"]; +const _multipleAnswerPrefix = ["[ ]", "[*]", "[]"]; const getAnswerStringsWithMultilineSupport = ( linesWithoutPoints: string[], @@ -64,13 +75,13 @@ const getQuestionType = ( questionIndex ); const firstAnswerLine = answerLines[0]; - const isMultipleChoice = ["a)", "*a)", "*)", ")"].some((prefix) => + const isMultipleChoice = _multipleChoicePrefix.some((prefix) => firstAnswerLine.startsWith(prefix) ); if (isMultipleChoice) return QuestionType.MULTIPLE_CHOICE; - const isMultipleAnswer = ["[ ]", "[*]", "[]"].some((prefix) => + const isMultipleAnswer = _multipleAnswerPrefix.some((prefix) => firstAnswerLine.startsWith(prefix) ); if (isMultipleAnswer) return QuestionType.MULTIPLE_ANSWERS;