Der interne Klausurtitel passt nicht immer aufs Deckblatt. Das neue Feld ist mit ihm vorbelegt, ändert nur Exam.Title für diesen Druck und fällt leer gelassen auf den internen Titel zurück. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2293ddb84d
commit
24a30881f3
5 files changed
+53
-7
No files matched your search
@@ -22,9 +22,12 @@ public static class ExamCoverPlaceholderBuilder
|
||||
/// eingetragen, wenn <paramref name="fillResults"/> gesetzt und das Ergebnis korrigiert ist.</param>
|
||||
/// <param name="studentNiveau">Niveau des Schülers in dieser Lerngruppe, falls die Arbeit
|
||||
/// selbst keinem Niveau zugeordnet ist.</param>
|
||||
/// <param name="title">Titel für das Deckblatt, falls er vom internen Klausurtitel abweichen
|
||||
/// soll; null oder leer nimmt den Klausurtitel.</param>
|
||||
public static Dictionary<string, PlaceholderValue> Build(Exam exam, LearningGroup group, string subjectName,
|
||||
Student student, ExamResult? result, bool fillResults, GradingService grading, LoadedTemplate template,
|
||||
DateOnly today, Niveau? studentNiveau = null, string teacherAbbreviation = "")
|
||||
DateOnly today, Niveau? studentNiveau = null, string teacherAbbreviation = "",
|
||||
string? title = null)
|
||||
{
|
||||
var tasks = exam.Tasks.OrderBy(t => t.Nr).ToList();
|
||||
var variant = result?.Variant ?? ExamVariant.A;
|
||||
@@ -34,7 +37,7 @@ public static class ExamCoverPlaceholderBuilder
|
||||
var values = LetterPlaceholderBuilder.BuildStandardValues(student, contact: null, group, today, "", "");
|
||||
values["Group.GradeLevel"] = new TextValue(group.GradeLevel > 0 ? group.GradeLevel.ToString() : "");
|
||||
values["Subject.Name"] = new TextValue(subjectName);
|
||||
values["Exam.Title"] = new TextValue(exam.Title);
|
||||
values["Exam.Title"] = new TextValue(string.IsNullOrWhiteSpace(title) ? exam.Title : title.Trim());
|
||||
values["Exam.Date"] = new DateValue(exam.Date);
|
||||
values["Exam.Number"] = new TextValue(exam.ExamNumber?.ToString() ?? "");
|
||||
values["Exam.Kind"] = new TextValue(exam.Kind.Label());
|
||||
|
||||
Reference in new issue
Block a user