diff --git a/Management.Web/Pages/Course.razor b/Management.Web/Pages/Course.razor
index 32916a5..79647ea 100644
--- a/Management.Web/Pages/Course.razor
+++ b/Management.Web/Pages/Course.razor
@@ -9,6 +9,7 @@
@using Management.Web.Shared.Module.Assignment
@using Management.Web.Shared.Components
+@inject YamlManager yamlManager
@inject CanvasService canvas
@inject CoursePlanner planner
@@ -16,6 +17,62 @@
[Parameter]
public string CourseName { get; set; }
+ private bool loading = true;
+
+ protected override async Task OnInitializedAsync()
+ {
+ if(planner.LocalCourse == null)
+ {
+ var courses = await yamlManager.LoadSavedCourses();
+ planner.LocalCourse = courses.First(c => c.Name == CourseName);
+ }
+ base.OnInitialized();
+ loading = false;
+ }
+
}
-@planner.LocalCourse?.Name
\ No newline at end of file
+@if(loading)
+{
+
+}
+
+@if(planner.LocalCourse != null)
+{
+
+
+
+
+
+
+
+
+ View In Canvas
+
+
+ @planner.LocalCourse.Name
+
+
+
+ @if(planner.LoadingCanvasData)
+ {
+
+ }
+
+
@@ -113,7 +114,7 @@
}
-}
+} *@
diff --git a/Management.Web/Shared/Components/Quiz/QuizForm.razor b/Management.Web/Shared/Components/Quiz/QuizForm.razor
index f922fc1..1b388e2 100644
--- a/Management.Web/Shared/Components/Quiz/QuizForm.razor
+++ b/Management.Web/Shared/Components/Quiz/QuizForm.razor
@@ -39,7 +39,8 @@
{
var newQuestion = new LocalQuizQuestion
{
- Id = Guid.NewGuid().ToString()
+ Id = Guid.NewGuid().ToString(),
+ Points = 1,
};
var newQuiz = quizContext.Quiz with
{
diff --git a/Management.Web/Shared/CurrentFiles.razor b/Management.Web/Shared/CurrentFiles.razor
index 78a9868..18a73f5 100644
--- a/Management.Web/Shared/CurrentFiles.razor
+++ b/Management.Web/Shared/CurrentFiles.razor
@@ -19,7 +19,7 @@
{
logger.LogInformation("here");
planner.LocalCourse = course;
- Navigation.NavigateTo("/course/" + course.Name);
+ Navigation.NavigateTo("/course/" + course.Name);
}
}
@@ -27,24 +27,14 @@
@if (localCourses != null)
{
-
Stored Courses
+
Stored Courses
@foreach (var course in localCourses)
{
var location = "/course/" + course.Name;
-
handleClick(e, course)"
- role='button'
- >
+ handleClick(e, course)" role='button'>
@course.Name
- @* handleClick(e, course)"
- role='button'
- >
- @course.Name
-
*@
}