WIP: Reset test for exam
All checks were successful
DMA-CSD-CICD/QuizSystem/pipeline/head This commit looks good
UCN/QuizSystem/pipeline/head This commit looks good

This commit is contained in:
Karsten Jeppesen
2026-04-16 14:17:54 +02:00
parent eba66b2ad2
commit 58bf14dc49
4 changed files with 19 additions and 1 deletions

View File

@@ -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.

View File

@@ -8,6 +8,7 @@ namespace Quizzer.Models
public string QuizzID { get; set; } public string QuizzID { get; set; }
public string Category { get; set; } public string Category { get; set; }
public int IsOpen { get; set; } public int IsOpen { get; set; }
public bool Anonymous { get; set; }
public int Score { get; set; } public int Score { get; set; }
public int ScoreAcc { get; set; } public int ScoreAcc { get; set; }
public string JournalJson { get; set; } public string JournalJson { get; set; }

View File

@@ -32,6 +32,7 @@
<th>Description</th> <th>Description</th>
<th>Your Score</th> <th>Your Score</th>
<th>Max Score</th> <th>Max Score</th>
<th>Reset</th>
</tr> </tr>
</thead> </thead>
@foreach (var item in Model.PageTests) @foreach (var item in Model.PageTests)
@@ -64,6 +65,17 @@
<td> <td>
@item.Journal.ScoreAcc @item.Journal.ScoreAcc
</td> </td>
<td>
@if (item.Journal.Anonymous)
{
<form asp-page="" method="post">
<input type="hidden" name="email" value="@item.Journal.PID" />
<input type="hidden" name="value" value="@item.Journal.QuizzID" />
<input type="hidden" name="action" value="resetTest" />
<button type="button" class="btn btn-warning" onclick="javascript:this.form.submit()">Reset Test</button>
</form>
}
</td>
</tr> </tr>
} }
</table> </table>
@@ -141,7 +153,8 @@
</div> </div>
} }
} }
@if (Model.PageChartConnectors != null) { @if (Model.PageChartConnectors != null)
{
@if (Model.PageChartConnectors.Count > 2) @if (Model.PageChartConnectors.Count > 2)
{ {
<div class="row"> <div class="row">

View File

@@ -142,6 +142,7 @@ namespace Quizzer.Pages
PID = UserID, PID = UserID,
QuizzID = theQuizz.QuizzId, QuizzID = theQuizz.QuizzId,
Category = theQuizz.Category, Category = theQuizz.Category,
Anonymous = theQuizz.Anonymous,
IsOpen = 1, IsOpen = 1,
Score = 0, Score = 0,
ScoreAcc = 0, ScoreAcc = 0,