mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 15:48:32 -06:00
renaming modules doesnt duplicate files anymore
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace Management.Web.Shared.Components.Quiz;
|
||||
@@ -41,7 +42,14 @@ public class DroppableQuiz : ComponentBase
|
||||
);
|
||||
|
||||
var NewQuizList = currentModule.Quizzes
|
||||
.Select(q => q.Name + q.Description != Quiz.Name + Quiz.Description ? q : q with { DueAt = defaultDueTimeDate })
|
||||
.Select(q =>
|
||||
q.Name + q.Description != Quiz.Name + Quiz.Description
|
||||
? q :
|
||||
q with {
|
||||
DueAt = defaultDueTimeDate,
|
||||
LockAt = q.LockAt > defaultDueTimeDate ? q.LockAt : defaultDueTimeDate
|
||||
}
|
||||
)
|
||||
.ToArray();
|
||||
|
||||
var updatedModule = currentModule with { Quizzes = NewQuizList };
|
||||
|
||||
Reference in New Issue
Block a user