Klausur-Deckblätter als Sammel-PDF aus Vorlagen vom Typ exam-cover
Neuer Dialog "Deckblätter…" bei Klausuren, Punktetabelle als Drawing mit festen Spaltenbreiten, FLOWDRAWBOX-Attribut fit=content, Stapel-Rendering mit Seitenzahl je Datensatz, Kursbezeichnung und konfigurierbares Kürzel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f56caced32
commit
dd92128464
33 files changed
+1158
-28
No files matched your search
@@ -63,7 +63,10 @@ public static class TemplatePackage
|
||||
}
|
||||
|
||||
public sealed record InstalledTemplate(string Id, string Name, string Description, string PackagePath,
|
||||
DateTime ImportedAtUtc);
|
||||
DateTime ImportedAtUtc, string ReportType = "")
|
||||
{
|
||||
public bool IsExamCover => ReportType.Equals(TemplateReportTypes.ExamCover, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
public sealed class TemplateStore
|
||||
{
|
||||
@@ -86,7 +89,7 @@ public sealed class TemplateStore
|
||||
{
|
||||
var loaded = _loader.LoadFromPackage(path);
|
||||
result.Add(new(loaded.Manifest.Id, loaded.Manifest.Name, loaded.Manifest.Description, path,
|
||||
File.GetLastWriteTimeUtc(path)));
|
||||
File.GetLastWriteTimeUtc(path), ReportTypeOf(loaded)));
|
||||
}
|
||||
catch (Exception ex) when (ex is InvalidDataException or TemplateValidationException) { }
|
||||
}
|
||||
@@ -102,9 +105,13 @@ public sealed class TemplateStore
|
||||
var temporary = destination + ".tmp";
|
||||
File.Copy(sourcePath, temporary, overwrite: true);
|
||||
File.Move(temporary, destination, overwrite: true);
|
||||
return new(loaded.Manifest.Id, loaded.Manifest.Name, loaded.Manifest.Description, destination, DateTime.UtcNow);
|
||||
return new(loaded.Manifest.Id, loaded.Manifest.Name, loaded.Manifest.Description, destination, DateTime.UtcNow,
|
||||
ReportTypeOf(loaded));
|
||||
}
|
||||
|
||||
private static string ReportTypeOf(LoadedTemplate loaded) =>
|
||||
loaded.Manifest.Metadata.GetValueOrDefault(TemplateMetadataKeys.ReportType, "");
|
||||
|
||||
public LoadedTemplate Load(InstalledTemplate template) => _loader.LoadFromPackage(template.PackagePath);
|
||||
public void Delete(string id)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user