mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
removed assignment id from edit and delete workflow
This commit is contained in:
@@ -61,16 +61,14 @@
|
||||
.LocalCourse
|
||||
.Modules
|
||||
.First(m =>
|
||||
m.Assignments
|
||||
.Select(a => a.Id)
|
||||
.Contains(assignment.Id)
|
||||
m.Assignments.Contains(assignment)
|
||||
) ?? throw new Exception("handling assignment delete, could not find module");
|
||||
|
||||
var newModules = planner.LocalCourse.Modules.Select(m =>
|
||||
m.Name == currentModule.Name
|
||||
? m with
|
||||
{
|
||||
Assignments = m.Assignments.Where(a => a.Id != assignment.Id).ToArray()
|
||||
Assignments = m.Assignments.Where(a => a != assignment).ToArray()
|
||||
}
|
||||
: m
|
||||
).ToArray();
|
||||
|
||||
Reference in New Issue
Block a user