diff --git a/Management.Web/Shared/Components/Quiz/Markdown/MarkdownQuizForm.razor b/Management.Web/Shared/Components/Quiz/Markdown/MarkdownQuizForm.razor index 2376a05..2c77bfc 100644 --- a/Management.Web/Shared/Components/Quiz/Markdown/MarkdownQuizForm.razor +++ b/Management.Web/Shared/Components/Quiz/Markdown/MarkdownQuizForm.razor @@ -22,6 +22,7 @@ var newQuiz = LocalQuiz.ParseMarkdown(_quizMarkdownInput); error = null; testQuiz = newQuiz; + quizContext.SaveQuiz(newQuiz); } catch(QuizMarkdownParseException e) { diff --git a/Management/Models/Local/LocalQuizQuestion.cs b/Management/Models/Local/LocalQuizQuestion.cs index a13f936..5878fd7 100644 --- a/Management/Models/Local/LocalQuizQuestion.cs +++ b/Management/Models/Local/LocalQuizQuestion.cs @@ -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)", "[ ]", "[*]" };