after removing canvas id from module

This commit is contained in:
2023-11-06 07:54:17 -07:00
parent 3252e3ca9f
commit bda13f7bec
13 changed files with 357 additions and 96 deletions

View File

@@ -27,6 +27,16 @@ public record LocalCourseSettings
var yaml = serializer.Serialize(this);
return yaml;
}
public static LocalCourseSettings ParseYaml(string rawText)
{
var deserializer = new DeserializerBuilder()
.IgnoreUnmatchedProperties()
.Build();
var settings = deserializer.Deserialize<LocalCourseSettings>(rawText);
return settings;
}
}
public record SimpleTimeOnly

View File

@@ -4,7 +4,7 @@ public record LocalModule
{
public string Name { get; init; } = string.Empty;
public string Id { get; init; } = DateTime.UtcNow.Ticks.ToString();
public ulong? CanvasId { get; set; } = null;
// public ulong? CanvasId { get; set; } = null;
public string Notes { get; set; } = string.Empty;
public IEnumerable<LocalAssignment> Assignments { get; init; } =
Enumerable.Empty<LocalAssignment>();