Files
LehrerApp/LehrerApp.Core/Models/Exam.cs
T
adminandClaude Sonnet 5 3fc506adc1 Notenschlüssel-Editor (1.3) und Einstellungen in Tabs strukturiert
- Notenschlüssel-Editor im ExamDialog: Stufen (Note/Prozentgrenze)
  bearbeitbar, Vorbelegung passend zum GradingSystem der Gruppe,
  Live-Anzeige der absoluten Punktegrenze je Stufe, Validierung
  (lückenlos, keine Dopplungen) über GradingService.ValidateGradingKey.
- Neues Modell GradingKeyTemplate + Repository: Notenschlüssel als
  Vorlage speichern/anwenden, direkt aus dem ExamDialog heraus.
- Einstellungen: Fächer / Kompetenzen / Notenschlüssel-Vorlagen sind
  jetzt eigene Tabs statt einer gemeinsam wachsenden Liste. Vorlagen
  zeigen nur noch eine kompakte Zeile; die Stufen-Bearbeitung läuft
  über ein Popup-Fenster (GradingKeyTemplateDialog).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-12 00:34:43 +02:00

53 lines
1.8 KiB
C#

namespace LehrerApp.Core.Models;
public class Exam
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid GroupId { get; set; }
public string Title { get; set; } = "";
public DateOnly Date { get; set; }
public string Subject { get; set; } = "";
public int? ExamNumber { get; set; }
public List<ExamTask> Tasks { get; set; } = [];
public List<GradingKeyEntry> GradingKey { get; set; } = [];
public ExamStatus Status { get; set; } = ExamStatus.Planned;
public DateOnly? ReturnedAt { get; set; }
public string? Notes { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
public class ExamTask
{
public int Nr { get; set; }
public string? Title { get; set; }
public double MaxPoints { get; set; }
public double Weight { get; set; } = 1.0;
public List<string> CompetencyCodes { get; set; } = [];
}
public class GradingKeyEntry
{
public string Grade { get; set; } = "";
public double MinPercent { get; set; }
}
public class GradingKeyTemplate
{
public Guid Id { get; set; } = Guid.NewGuid();
public string Name { get; set; } = "";
public GradingSystem GradingSystem { get; set; }
public List<GradingKeyEntry> Entries { get; set; } = [];
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
public class ExamResult
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid ExamId { get; set; }
public Guid StudentId { get; set; }
public List<double> Points { get; set; } = [];
public double TotalPoints { get; set; }
public string? Grade { get; set; }
public bool Absent { get; set; }
public string? Comment { get; set; }
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
public enum ExamStatus { Planned, Conducted, Graded, Returned }