mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
can update stored quiz with markdown editor
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
var newQuiz = LocalQuiz.ParseMarkdown(_quizMarkdownInput);
|
||||
error = null;
|
||||
testQuiz = newQuiz;
|
||||
quizContext.SaveQuiz(newQuiz);
|
||||
}
|
||||
catch(QuizMarkdownParseException e)
|
||||
{
|
||||
|
||||
@@ -30,10 +30,12 @@ public record LocalQuizQuestion
|
||||
return $"{questionTypeIndicator}{textWithSpecificNewline}";
|
||||
});
|
||||
var answersText = string.Join(Environment.NewLine, answerArray);
|
||||
var questionTypeIndicator = QuestionType == "essay" || QuestionType == "short_answer" ? QuestionType : "";
|
||||
|
||||
return $@"Points: {Points}
|
||||
{Text}
|
||||
{answersText}";
|
||||
{answersText}
|
||||
{questionTypeIndicator}";
|
||||
}
|
||||
|
||||
private static readonly string[] validFirstAnswerDelimiters = new string[] { "*a)", "a)", "[ ]", "[*]" };
|
||||
|
||||
Reference in New Issue
Block a user