reordering rubric

This commit is contained in:
2023-09-01 09:52:32 -06:00
parent ebb9cd4d2e
commit 5aaf474565
4 changed files with 56 additions and 20 deletions

View File

@@ -173,7 +173,9 @@
Lock At Due Date
</label>
</div>
<div class="container">
<RubricEditor />
</div>
<SubmissionTypeSelector />
}
<ConfirmationModal Label="Delete" Class="btn btn-danger" OnConfirmAsync="HandleDelete" />

View File

@@ -104,10 +104,30 @@
}
}
}
private int requiredPoints => rubric.Where(r => !r.IsExtraCredit).Select(r => r.Points).Sum();
private int extraCreditPoints => rubric.Where(r => r.IsExtraCredit).Select(r => r.Points).Sum();
}
<br>
<h5>Rubric</h5>
<div class="row">
<div class="col offset-3">
<h4 class="text-center">Rubric</h4>
</div>
<div class=" col-3 text-end my-1">
<button
@onclick:preventDefault="true"
@onclick="addItem"
type="button"
class="btn btn-outline-primary"
>
+ rubric item
</button>
</div>
</div>
<ul class="list-group">
@foreach (var rubricItem in rubric)
{
@@ -120,6 +140,17 @@
}
</ul>
<div class="row">
<div class="col">
<div>
Requred Points: @requiredPoints
</div>
<div>
Extra Credit Points @extraCreditPoints
</div>
</div>
<div class="col">
<div class="text-end my-1">
<button
@onclick:preventDefault="true"
@@ -138,3 +169,5 @@
+ rubric item
</button>
</div>
</div>
</div>

View File

@@ -56,7 +56,7 @@
@bind="label"
/>
</div>
<div class="col">
<div class="col-auto">
<label
for="rubricPoints"
class="form-label"

View File

@@ -6,6 +6,7 @@ public record RubricItem
public string Id { get; set; } = "";
public string Label { get; set; } = "";
public int Points { get; set; } = 0;
public bool IsExtraCredit => Label.Contains(extraCredit);
}
public static class SubmissionType