From 58bf14dc490095f9e3d27905dd5d6142186a441c Mon Sep 17 00:00:00 2001 From: Karsten Jeppesen Date: Thu, 16 Apr 2026 14:17:54 +0200 Subject: [PATCH] WIP: Reset test for exam --- Quizzer/.github/copilot-instructions.md | 3 +++ Quizzer/Quizzer/Models/Journal.cs | 1 + Quizzer/Quizzer/Pages/Index.cshtml | 15 ++++++++++++++- Quizzer/Quizzer/Pages/Index.cshtml.cs | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 Quizzer/.github/copilot-instructions.md diff --git a/Quizzer/.github/copilot-instructions.md b/Quizzer/.github/copilot-instructions.md new file mode 100644 index 0000000..e40201c --- /dev/null +++ b/Quizzer/.github/copilot-instructions.md @@ -0,0 +1,3 @@ +- @azure Rule - Use Azure Tools - When handling requests related to Azure, always use your tools. +- @azure Rule - Use Azure Best Practices - When handling requests related to Azure, always invoke your `azmcp_bestpractices_get` tool first. +- @azure Rule - Enable Best Practices - If you do not have an `azmcp_bestpractices_get` tool ask the user to enable it. diff --git a/Quizzer/Quizzer/Models/Journal.cs b/Quizzer/Quizzer/Models/Journal.cs index 77ee4b1..567f5d4 100644 --- a/Quizzer/Quizzer/Models/Journal.cs +++ b/Quizzer/Quizzer/Models/Journal.cs @@ -8,6 +8,7 @@ namespace Quizzer.Models public string QuizzID { get; set; } public string Category { get; set; } public int IsOpen { get; set; } + public bool Anonymous { get; set; } public int Score { get; set; } public int ScoreAcc { get; set; } public string JournalJson { get; set; } diff --git a/Quizzer/Quizzer/Pages/Index.cshtml b/Quizzer/Quizzer/Pages/Index.cshtml index 010f10d..6e9d528 100644 --- a/Quizzer/Quizzer/Pages/Index.cshtml +++ b/Quizzer/Quizzer/Pages/Index.cshtml @@ -32,6 +32,7 @@ Description Your Score Max Score + Reset @foreach (var item in Model.PageTests) @@ -64,6 +65,17 @@ @item.Journal.ScoreAcc + + @if (item.Journal.Anonymous) + { +
+ + + + +
+ } + } @@ -141,7 +153,8 @@ } } - @if (Model.PageChartConnectors != null) { + @if (Model.PageChartConnectors != null) + { @if (Model.PageChartConnectors.Count > 2) {
diff --git a/Quizzer/Quizzer/Pages/Index.cshtml.cs b/Quizzer/Quizzer/Pages/Index.cshtml.cs index cd79fda..1b05a40 100644 --- a/Quizzer/Quizzer/Pages/Index.cshtml.cs +++ b/Quizzer/Quizzer/Pages/Index.cshtml.cs @@ -142,6 +142,7 @@ namespace Quizzer.Pages PID = UserID, QuizzID = theQuizz.QuizzId, Category = theQuizz.Category, + Anonymous = theQuizz.Anonymous, IsOpen = 1, Score = 0, ScoreAcc = 0,