i liked syncing more before i cared about order

This commit is contained in:
2023-08-01 22:41:10 -06:00
parent 19bbfea099
commit 56c8128ace
16 changed files with 421 additions and 101 deletions

View File

@@ -16,7 +16,6 @@
}
<div class="text-center">
@if (localCourses != null)
{
<h3 >Stored Courses</h3>

View File

@@ -31,7 +31,7 @@
private string name { get; set; } = String.Empty;
private bool lockAtDueDate { get; set; }
private IEnumerable<RubricItem> rubric { get; set; } = Enumerable.Empty<RubricItem>();
private IEnumerable<SubmissionType> submissionTypes { get; set; } = Enumerable.Empty<SubmissionType>();
private IEnumerable<string> submissionTypes { get; set; } = Enumerable.Empty<string>();
protected override void OnParametersSet()
{

View File

@@ -1,11 +1,13 @@
@using System.Reflection
@code
{
[Parameter, EditorRequired]
public IEnumerable<SubmissionType> Types { get; set; } = Enumerable.Empty<SubmissionType>();
public IEnumerable<string> Types { get; set; } = Enumerable.Empty<string>();
[Parameter, EditorRequired]
public Action<IEnumerable<SubmissionType>> SetTypes { get; set; } = (_) => {};
private string getLabel(SubmissionType type)
public Action<IEnumerable<string>> SetTypes { get; set; } = (_) => {};
private string getLabel(string type)
{
return type.ToString().Replace("_", "") + "switch";
}
@@ -14,7 +16,7 @@
<h5>Submission Types</h5>
<div class="row">
@foreach (var submissionType in (SubmissionType[])Enum.GetValues(typeof(SubmissionType)))
@foreach (var submissionType in SubmissionType.AllTypes)
{
<div class="col-4">
<div class="form-check form-switch">

View File

@@ -28,7 +28,7 @@
lock_at = null,
due_at = DateTime.Now,
points_possible = 10,
submission_types = new SubmissionType[] { SubmissionType.online_text_entry }
submission_types = new string[] { SubmissionType.online_text_entry }
};
if(planner.LocalCourse != null)

View File

@@ -6,6 +6,18 @@
[Parameter]
[EditorRequired]
public LocalAssignment Assignment { get; set; } = new();
protected override void OnInitialized()
{
planner.StateHasChanged += reload;
}
private void reload()
{
this.InvokeAsync(this.StateHasChanged);
}
public void Dispose()
{
planner.StateHasChanged -= reload;
}
private void dropOnDate(DateTime dropDate)
{