From 69043fa36dbe2710d2193e9c2abe3ebad936b3b4 Mon Sep 17 00:00:00 2001 From: Alex Mickelson Date: Wed, 18 Sep 2024 13:31:22 -0600 Subject: [PATCH] got help toggle --- .../Pages/QuizForm/QuizFormPage.razor | 1 + .../[moduleName]/quiz/[quizName]/EditQuiz.tsx | 77 +++++++++++++++---- nextjs/src/app/layout.tsx | 23 +++--- 3 files changed, 73 insertions(+), 28 deletions(-) diff --git a/Management.Web/Pages/QuizForm/QuizFormPage.razor b/Management.Web/Pages/QuizForm/QuizFormPage.razor index f2e9177..a95bfd3 100644 --- a/Management.Web/Pages/QuizForm/QuizFormPage.razor +++ b/Management.Web/Pages/QuizForm/QuizFormPage.razor @@ -213,6 +213,7 @@ this is a matching question toggle help +
@if (quizContext.Quiz != null) { diff --git a/nextjs/src/app/course/[courseName]/modules/[moduleName]/quiz/[quizName]/EditQuiz.tsx b/nextjs/src/app/course/[courseName]/modules/[moduleName]/quiz/[quizName]/EditQuiz.tsx index c565cba..2aa2254 100644 --- a/nextjs/src/app/course/[courseName]/modules/[moduleName]/quiz/[quizName]/EditQuiz.tsx +++ b/nextjs/src/app/course/[courseName]/modules/[moduleName]/quiz/[quizName]/EditQuiz.tsx @@ -19,6 +19,47 @@ import { getCourseUrl } from "@/services/urlUtils"; import { useCourseContext } from "@/app/course/[courseName]/context/courseContext"; import Link from "next/link"; +const helpString = `QUESTION REFERENCE +--- +Points: 2 +this is a question? +*a) correct +b) not correct +--- +points: 1 +question goes here +[*] correct +[ ] not correct +[] not correct +--- +the points default to 1? +*a) true +b) false +--- +Markdown is supported + +- like +- this +- list + +[*] true +[ ] false +--- +This is a one point essay question +essay +--- +points: 4 +this is a short answer question +short_answer +--- +points: 4 +the underscore is optional +short answer +--- +this is a matching question +^ left answer - right dropdown +^ other thing - another option`; + export default function EditQuiz({ moduleName, quizName, @@ -61,25 +102,27 @@ export default function EditQuiz({ }, [moduleName, quiz, quizName, quizText, updateQuizMutation]); return ( - <> - {showHelp &&
help here
} -
-
-
- -
-
-
{error && error}
- -
+
+
+ {showHelp && ( +
+            {helpString}
+          
+ )} +
+ +
+
+
{error && error}
+
- setShowHelp((h) => !h)} - />
- + setShowHelp((h) => !h)} + /> +
); } diff --git a/nextjs/src/app/layout.tsx b/nextjs/src/app/layout.tsx index 47210a5..2b73abb 100644 --- a/nextjs/src/app/layout.tsx +++ b/nextjs/src/app/layout.tsx @@ -23,17 +23,18 @@ export default async function RootLayout({ return ( - - - - - - - - {children} - - - + + +
+ + + + + {children} + + + +
);