mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
udpates
This commit is contained in:
@@ -95,7 +95,8 @@ export default function NewCourseForm() {
|
|||||||
AssignmentSubmissionType.ONLINE_UPLOAD,
|
AssignmentSubmissionType.ONLINE_UPLOAD,
|
||||||
],
|
],
|
||||||
defaultFileUploadTypes: ["pdf", "png", "jpg", "jpeg"],
|
defaultFileUploadTypes: ["pdf", "png", "jpg", "jpeg"],
|
||||||
defaultLockHoursOffset: 0
|
defaultLockHoursOffset: 0,
|
||||||
|
holidays: {}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|||||||
@@ -3,7 +3,18 @@ import { LocalQuizQuestion, QuestionType } from "../localQuizQuestion";
|
|||||||
import { LocalQuizQuestionAnswer } from "../localQuizQuestionAnswer";
|
import { LocalQuizQuestionAnswer } from "../localQuizQuestionAnswer";
|
||||||
import { quizQuestionAnswerMarkdownUtils } from "./quizQuestionAnswerMarkdownUtils";
|
import { quizQuestionAnswerMarkdownUtils } from "./quizQuestionAnswerMarkdownUtils";
|
||||||
|
|
||||||
const _validFirstAnswerDelimiters = ["*a)", "a)", "*)", ")", "[ ]", "[]", "[*]", "^"];
|
const _validFirstAnswerDelimiters = [
|
||||||
|
"*a)",
|
||||||
|
"a)",
|
||||||
|
"*)",
|
||||||
|
")",
|
||||||
|
"[ ]",
|
||||||
|
"[]",
|
||||||
|
"[*]",
|
||||||
|
"^",
|
||||||
|
];
|
||||||
|
const _multipleChoicePrefix = ["a)", "*a)", "*)", ")"];
|
||||||
|
const _multipleAnswerPrefix = ["[ ]", "[*]", "[]"];
|
||||||
|
|
||||||
const getAnswerStringsWithMultilineSupport = (
|
const getAnswerStringsWithMultilineSupport = (
|
||||||
linesWithoutPoints: string[],
|
linesWithoutPoints: string[],
|
||||||
@@ -64,13 +75,13 @@ const getQuestionType = (
|
|||||||
questionIndex
|
questionIndex
|
||||||
);
|
);
|
||||||
const firstAnswerLine = answerLines[0];
|
const firstAnswerLine = answerLines[0];
|
||||||
const isMultipleChoice = ["a)", "*a)", "*)", ")"].some((prefix) =>
|
const isMultipleChoice = _multipleChoicePrefix.some((prefix) =>
|
||||||
firstAnswerLine.startsWith(prefix)
|
firstAnswerLine.startsWith(prefix)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isMultipleChoice) return QuestionType.MULTIPLE_CHOICE;
|
if (isMultipleChoice) return QuestionType.MULTIPLE_CHOICE;
|
||||||
|
|
||||||
const isMultipleAnswer = ["[ ]", "[*]", "[]"].some((prefix) =>
|
const isMultipleAnswer = _multipleAnswerPrefix.some((prefix) =>
|
||||||
firstAnswerLine.startsWith(prefix)
|
firstAnswerLine.startsWith(prefix)
|
||||||
);
|
);
|
||||||
if (isMultipleAnswer) return QuestionType.MULTIPLE_ANSWERS;
|
if (isMultipleAnswer) return QuestionType.MULTIPLE_ANSWERS;
|
||||||
|
|||||||
Reference in New Issue
Block a user