Mitarbeitsnote-Aggregation (3.2)
Neuer Dialog berechnet aus den Sitzungs-Bewertungen je Schüler eine Mitarbeitsnote (H1/H2/Gesamtjahr), mit editierbarer Aspekt-Gewichtung, Trendanzeige und Übernahme als Grade (Category=Participation).
This commit is contained in:
@@ -23,6 +23,11 @@ public partial class ParticipationTabViewModel : ObservableObject
|
||||
private string _schoolYear = "";
|
||||
private Guid? _subjectId;
|
||||
private int _gradeLevel;
|
||||
private GradingSystem _gradingSystem;
|
||||
|
||||
public Guid GroupId => _groupId;
|
||||
public string SchoolYear => _schoolYear;
|
||||
public GradingSystem GradingSystem => _gradingSystem;
|
||||
|
||||
[ObservableProperty] private ParticipationSessionItem? _selectedSession;
|
||||
[ObservableProperty] private string _noDataText = "Keine Bewertungssitzung ausgewählt.";
|
||||
@@ -41,6 +46,7 @@ public partial class ParticipationTabViewModel : ObservableObject
|
||||
|
||||
public Func<Task<ParticipationSession?>>? OnAddSession { get; set; }
|
||||
public Func<ParticipationTabViewModel, Task>? OnQuickInput { get; set; }
|
||||
public Func<ParticipationTabViewModel, Task>? OnComputeGrade { get; set; }
|
||||
|
||||
public ParticipationTabViewModel(
|
||||
IParticipationSessionRepository sessions,
|
||||
@@ -65,6 +71,7 @@ public partial class ParticipationTabViewModel : ObservableObject
|
||||
var group = _groups.GetById(groupId);
|
||||
_subjectId = group?.SubjectId;
|
||||
_gradeLevel = group?.GradeLevel ?? 0;
|
||||
_gradingSystem = group?.GradingSystem ?? GradingSystem.Grades1To6;
|
||||
|
||||
HasCompetencyCatalog = _subjectId.HasValue
|
||||
&& _competencyDomains.GetBySubjectAndGrade(_subjectId.Value, _gradeLevel).Count > 0;
|
||||
@@ -248,6 +255,13 @@ public partial class ParticipationTabViewModel : ObservableObject
|
||||
|
||||
private bool CanQuickInput() => SelectedSession is not null && StudentRows.Count > 0;
|
||||
|
||||
[RelayCommand]
|
||||
private async Task ComputeGrade()
|
||||
{
|
||||
if (OnComputeGrade is null) return;
|
||||
await OnComputeGrade(this);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void DeleteSession()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user