mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
ripped out lock at due date flag
This commit is contained in:
@@ -62,7 +62,7 @@ public static class CoursePlannerExtensions
|
||||
return assignment with
|
||||
{
|
||||
DueAt = dueAt,
|
||||
LockAt = assignment.LockAtDueDate ? dueAt : lockAt
|
||||
LockAt = lockAt
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,18 +140,16 @@ public static partial class AssignmentSyncronizationExtensions
|
||||
second: canvasAssignment.LockAt.Value.Second
|
||||
)
|
||||
: new DateTime();
|
||||
var localComparisonLockDate = localAssignment.LockAtDueDate
|
||||
? localComparisonDueDate
|
||||
: canvasAssignment.LockAt != null
|
||||
? new DateTime(
|
||||
year: localAssignment.LockAt?.Year ?? 0,
|
||||
month: localAssignment.LockAt?.Month ?? 0,
|
||||
day: localAssignment.LockAt?.Day ?? 0,
|
||||
hour: localAssignment.LockAt?.Hour ?? 0,
|
||||
minute: localAssignment.LockAt?.Minute ?? 0,
|
||||
second: localAssignment.LockAt?.Second ?? 0
|
||||
)
|
||||
: new DateTime();
|
||||
var localComparisonLockDate = canvasAssignment.LockAt != null
|
||||
? new DateTime(
|
||||
year: localAssignment.LockAt?.Year ?? 0,
|
||||
month: localAssignment.LockAt?.Month ?? 0,
|
||||
day: localAssignment.LockAt?.Day ?? 0,
|
||||
hour: localAssignment.LockAt?.Hour ?? 0,
|
||||
minute: localAssignment.LockAt?.Minute ?? 0,
|
||||
second: localAssignment.LockAt?.Second ?? 0
|
||||
)
|
||||
: new DateTime();
|
||||
|
||||
var dueDatesSame =
|
||||
canvasAssignment.DueAt != null && canvasComparisonDueDate == localComparisonDueDate;
|
||||
|
||||
@@ -45,7 +45,7 @@ public record LocalAssignment
|
||||
// public ulong? CanvasId { get; init; } = null;
|
||||
public string Name { get; init; } = "";
|
||||
public string Description { get; init; } = "";
|
||||
public bool LockAtDueDate { get; init; }
|
||||
// public bool LockAtDueDate { get; init; }
|
||||
public IEnumerable<RubricItem> Rubric { get; init; } = Array.Empty<RubricItem>();
|
||||
public DateTime? LockAt { get; init; }
|
||||
public DateTime DueAt { get; init; }
|
||||
|
||||
@@ -51,7 +51,7 @@ public class CanvasAssignmentService
|
||||
submission_types = localAssignment.SubmissionTypes.Select(t => t.ToString()),
|
||||
description = htmlDescription,
|
||||
due_at = localAssignment.DueAt,
|
||||
lock_at = localAssignment.LockAtDueDate ? localAssignment.DueAt : localAssignment.LockAt,
|
||||
lock_at = localAssignment.LockAt,
|
||||
points_possible = localAssignment.PointsPossible,
|
||||
assignment_group_id = canvasAssignmentGroupId,
|
||||
};
|
||||
@@ -84,7 +84,7 @@ public class CanvasAssignmentService
|
||||
submission_types = localAssignment.SubmissionTypes.Select(t => t.ToString()),
|
||||
description = localAssignment.GetDescriptionHtml(),
|
||||
due_at = localAssignment.DueAt,
|
||||
lock_at = localAssignment.LockAtDueDate ? localAssignment.DueAt : localAssignment.LockAt,
|
||||
lock_at = localAssignment.LockAt,
|
||||
points_possible = localAssignment.PointsPossible,
|
||||
assignment_group_id = canvasAssignmentGroupId,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user