Kompetenzen fast fertig
This commit is contained in:
@@ -206,6 +206,10 @@ public partial class GroupDetailViewModel : ObservableObject
|
||||
NotifyWriteCommands();
|
||||
}
|
||||
partial void OnShowFormerStudentsChanged(bool value) => LoadStudents();
|
||||
partial void OnActiveTabIndexChanged(int value)
|
||||
{
|
||||
if (value == 6) CompetencyOverviewTab.Refresh();
|
||||
}
|
||||
|
||||
public ObservableCollection<StudentSummary> Students { get; } = [];
|
||||
public ObservableCollection<ExamSummary> Exams { get; } = [];
|
||||
@@ -213,6 +217,7 @@ public partial class GroupDetailViewModel : ObservableObject
|
||||
public ParticipationTabViewModel ParticipationTab { get; }
|
||||
public GradeOverviewTabViewModel GradeOverviewTab { get; }
|
||||
public PlanningTabViewModel PlanningTab { get; }
|
||||
public CompetencyOverviewTabViewModel CompetencyOverviewTab { get; }
|
||||
public Func<Task<bool>>? OnAddStudent { get; set; }
|
||||
public Func<StudentSummary, Task<bool>>? OnWithdrawStudent { get; set; }
|
||||
public Func<Guid, Task<bool>>? OnAddExam { get; set; }
|
||||
@@ -227,13 +232,14 @@ public partial class GroupDetailViewModel : ObservableObject
|
||||
IGroupMembershipRepository memberships, ISubjectRepository subjects,
|
||||
IExamRepository exams, IGradeRepository grades, IWorkTaskRepository tasks,
|
||||
ParticipationTabViewModel participationTab, GradeOverviewTabViewModel gradeOverviewTab,
|
||||
PlanningTabViewModel planningTab)
|
||||
PlanningTabViewModel planningTab, CompetencyOverviewTabViewModel competencyOverviewTab)
|
||||
{
|
||||
_groups = groups; _students = students; _memberships = memberships; _subjects = subjects;
|
||||
_exams = exams; _grades = grades; _tasks = tasks;
|
||||
ParticipationTab = participationTab;
|
||||
GradeOverviewTab = gradeOverviewTab;
|
||||
PlanningTab = planningTab;
|
||||
CompetencyOverviewTab = competencyOverviewTab;
|
||||
}
|
||||
|
||||
public void LoadGroup(Guid id)
|
||||
@@ -252,6 +258,7 @@ public partial class GroupDetailViewModel : ObservableObject
|
||||
ParticipationTab.Initialize(Group.Id, Group.SchoolYear, IsReadOnly);
|
||||
GradeOverviewTab.Initialize(Group.Id, Group.GradingSystem, Group.Type, GroupTitle, Group.SchoolYear, IsReadOnly);
|
||||
PlanningTab.Initialize(Group.Id, IsReadOnly);
|
||||
CompetencyOverviewTab.Initialize(Group);
|
||||
}
|
||||
|
||||
private void ReloadExams()
|
||||
@@ -261,6 +268,7 @@ public partial class GroupDetailViewModel : ObservableObject
|
||||
Exams.Clear();
|
||||
foreach (var e in _exams.GetByGroup(Group.Id)) Exams.Add(new ExamSummary(e));
|
||||
SelectedExam = Exams.FirstOrDefault(e => e.Id == selectedId);
|
||||
CompetencyOverviewTab.Refresh();
|
||||
}
|
||||
|
||||
public void LoadStudents()
|
||||
@@ -368,6 +376,7 @@ public partial class GroupDetailViewModel : ObservableObject
|
||||
var exam = _exams.GetById(SelectedExam.Id);
|
||||
if (exam is null) return;
|
||||
await OnGradeExam(exam);
|
||||
CompetencyOverviewTab.Refresh();
|
||||
}
|
||||
|
||||
[RelayCommand(CanExecute = nameof(CanEditSelectedExam))]
|
||||
|
||||
Reference in New Issue
Block a user