mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
added quiz popup form and displaying on month
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
@using Management.Web.Shared.Components.AssignmentForm
|
||||
|
||||
@inject DragContainer dragContainer
|
||||
@inject CoursePlanner planner
|
||||
@@ -27,7 +27,8 @@
|
||||
}
|
||||
|
||||
|
||||
private IEnumerable<LocalAssignment> TodaysAssignments {
|
||||
private IEnumerable<LocalAssignment> TodaysAssignments
|
||||
{
|
||||
get
|
||||
{
|
||||
if(planner.LocalCourse == null || date == null)
|
||||
@@ -38,6 +39,19 @@
|
||||
.Where(a => a.DueAt.Date == date?.Date);
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerable<LocalQuiz> todaysQuizzes
|
||||
{
|
||||
get
|
||||
{
|
||||
if(planner.LocalCourse == null || date == null)
|
||||
return Enumerable.Empty<LocalQuiz>();
|
||||
else
|
||||
return planner.LocalCourse.Modules
|
||||
.SelectMany(m => m.Quizzes)
|
||||
.Where(q => q.DueAt.Date == date?.Date);
|
||||
}
|
||||
}
|
||||
private string calculatedClass
|
||||
{
|
||||
get
|
||||
@@ -78,7 +92,6 @@
|
||||
|
||||
void OnDrop()
|
||||
{
|
||||
@* System.Console.WriteLine("on drop"); *@
|
||||
dragging = false;
|
||||
if(dragContainer.DropCallback == null){
|
||||
System.Console.WriteLine("no drop callback set");
|
||||
@@ -105,5 +118,10 @@
|
||||
{
|
||||
<AssignmentInDay Assignment="assignment" @key="@assignment" />
|
||||
}
|
||||
|
||||
@foreach(var quiz in todaysQuizzes)
|
||||
{
|
||||
<QuizInDay Quiz="quiz" @key="@quiz" />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
29
Management.Web/Shared/Semester/Day/QuizInDay.razor
Normal file
29
Management.Web/Shared/Semester/Day/QuizInDay.razor
Normal file
@@ -0,0 +1,29 @@
|
||||
@using Management.Web.Shared.Components.Quiz
|
||||
@inject DragContainer dragContainer
|
||||
@inject CoursePlanner planner
|
||||
@inject QuizEditorContext quizContext
|
||||
|
||||
@inherits DroppableQuiz
|
||||
|
||||
@code {
|
||||
|
||||
private void HandleDragStart()
|
||||
{
|
||||
dragContainer.DropCallback = dropCallback;
|
||||
}
|
||||
|
||||
private void HandleDragEnd()
|
||||
{
|
||||
dragContainer.DropCallback = null;
|
||||
}
|
||||
}
|
||||
|
||||
<div
|
||||
draggable="true"
|
||||
@ondragstart="HandleDragStart"
|
||||
@ondragend="HandleDragEnd"
|
||||
@onclick="@(() => quizContext.Quiz = Quiz)"
|
||||
role="button"
|
||||
>
|
||||
@Quiz.Name
|
||||
</div>
|
||||
@@ -1,4 +1,5 @@
|
||||
@using System.Linq
|
||||
@using Management.Web.Shared.Semester.Day
|
||||
|
||||
@inject CoursePlanner planner
|
||||
|
||||
|
||||
Reference in New Issue
Block a user