From 2a235d9253d2571866d1a867ea747c5ee2f39a2c Mon Sep 17 00:00:00 2001 From: "Sharaf M. Mansour" Date: Sat, 18 May 2024 06:18:06 +0300 Subject: [PATCH] MAJOR FIX: Routing --- App.razor | 2 +- Pages/Home.razor | 2 +- Pages/Questions.razor | 2 +- Pages/Questions.razor.cs | 2 +- Pages/Report.razor | 2 +- Pages/Review.razor | 4 ++-- Pages/Score.razor | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/App.razor b/App.razor index 4294647..3ce603d 100644 --- a/App.razor +++ b/App.razor @@ -7,7 +7,7 @@ Not found @{ - NavigationManager.NavigateTo("/"); + NavigationManager.NavigateTo(""); } diff --git a/Pages/Home.razor b/Pages/Home.razor index fd34997..6f9dad6 100644 --- a/Pages/Home.razor +++ b/Pages/Home.razor @@ -53,6 +53,6 @@ else ExamService.SortAnswers(); ExamService.AssignNumbers(); - NavigationManager.NavigateTo("/q/1"); + NavigationManager.NavigateTo("Q/1"); } } \ No newline at end of file diff --git a/Pages/Questions.razor b/Pages/Questions.razor index 0050368..ae5c70e 100644 --- a/Pages/Questions.razor +++ b/Pages/Questions.razor @@ -17,7 +17,7 @@ - + diff --git a/Pages/Questions.razor.cs b/Pages/Questions.razor.cs index 1f654eb..e3a8d53 100644 --- a/Pages/Questions.razor.cs +++ b/Pages/Questions.razor.cs @@ -9,7 +9,7 @@ protected override void OnInitialized() { if (QNumber < 1 || QNumber > ExamService.RetrieveQeustionsCount()) - NavigationManager.NavigateTo("/", true); + NavigationManager.NavigateTo("", true); } private void RadioSelection(Answer Answer) { diff --git a/Pages/Report.razor b/Pages/Report.razor index 627f022..5d49b91 100644 --- a/Pages/Report.razor +++ b/Pages/Report.razor @@ -1,7 +1,7 @@ @page "/Download" - + @foreach (var question in ExamService.Exam.Questions) {
diff --git a/Pages/Review.razor b/Pages/Review.razor index 34b13d6..1a1325b 100644 --- a/Pages/Review.razor +++ b/Pages/Review.razor @@ -5,7 +5,7 @@ Not answered @ExamService.RetrieveNotAnsweredCount()| Marked @ExamService.RetrieveFlagCount() | Count @ExamService.RetrieveQeustionsCount()   - +

@@ -24,7 +24,7 @@ - + } diff --git a/Pages/Score.razor b/Pages/Score.razor index c8fbd38..7119736 100644 --- a/Pages/Score.razor +++ b/Pages/Score.razor @@ -4,10 +4,10 @@

You scored @ExamService.RetrieveScore() out of @ExamService.RetrieveQeustionsCount()

- -
@question.Num