This commit is contained in:
1 parent
cdb4637c65
commit
f0c0479bcb
22 files changed
+1099
-76
No files matched your search
@@ -15,6 +15,9 @@ public partial class CompetencyOverviewTabViewModel : ObservableObject
|
||||
private readonly ICompetencyDomainRepository _catalog;
|
||||
private readonly ICompetencyCatalogVersionRepository _versions;
|
||||
private readonly IStudentRepository _students;
|
||||
private readonly IParticipationSessionRepository _participationSessions;
|
||||
private readonly IParticipationRepository _participationEntries;
|
||||
private readonly IParticipationAspectRepository _participationAspects;
|
||||
private readonly CompetencyAnalysisService _analysis;
|
||||
private LearningGroup? _group;
|
||||
|
||||
@@ -35,7 +38,9 @@ public partial class CompetencyOverviewTabViewModel : ObservableObject
|
||||
public CompetencyOverviewTabViewModel(IUnitRepository units, IExamRepository exams,
|
||||
IExamResultRepository results, ICompetencyDomainRepository catalog,
|
||||
ICompetencyCatalogVersionRepository versions,
|
||||
IStudentRepository students, CompetencyAnalysisService analysis)
|
||||
IStudentRepository students, IParticipationSessionRepository participationSessions,
|
||||
IParticipationRepository participationEntries, IParticipationAspectRepository participationAspects,
|
||||
CompetencyAnalysisService analysis)
|
||||
{
|
||||
_units = units;
|
||||
_exams = exams;
|
||||
@@ -43,6 +48,9 @@ public partial class CompetencyOverviewTabViewModel : ObservableObject
|
||||
_catalog = catalog;
|
||||
_versions = versions;
|
||||
_students = students;
|
||||
_participationSessions = participationSessions;
|
||||
_participationEntries = participationEntries;
|
||||
_participationAspects = participationAspects;
|
||||
_analysis = analysis;
|
||||
}
|
||||
|
||||
@@ -72,7 +80,12 @@ public partial class CompetencyOverviewTabViewModel : ObservableObject
|
||||
var units = _units.GetByGroup(_group.Id);
|
||||
var exams = _exams.GetByGroup(_group.Id);
|
||||
var results = exams.SelectMany(x => _results.GetByExam(x.Id)).ToList();
|
||||
var analysis = _analysis.Analyze(domains, units, exams, results);
|
||||
var sessions = _participationSessions.GetByGroup(_group.Id);
|
||||
var entries = sessions.SelectMany(x => _participationEntries.GetBySession(x.Id)).ToList();
|
||||
var aspects = _participationAspects.GetDefaults()
|
||||
.Concat(_participationAspects.GetByGroup(_group.Id)).ToList();
|
||||
if (aspects.Count == 0) aspects = [.. DefaultParticipationAspects.All];
|
||||
var analysis = _analysis.Analyze(domains, units, exams, results, sessions, entries, aspects);
|
||||
|
||||
StudentOptions.Clear();
|
||||
foreach (var student in _students.GetByGroup(_group.Id)
|
||||
@@ -130,6 +143,9 @@ public partial class CompetencyOverviewRow : ObservableObject
|
||||
public string ExamCoverage => CoverageText(
|
||||
_item.AssessedExamCount, "geprüft", _item.PlannedExamCount, "geplant");
|
||||
public string GroupResult => ScoreText(_item.GroupScore, includeParticipants: true);
|
||||
public string ParticipationCoverage => _item.ParticipationSessionCount == 0
|
||||
? "–"
|
||||
: $"{_item.ParticipationSessionCount}× bewertet";
|
||||
|
||||
public CompetencyOverviewRow(CompetencyAnalysisItem item, Guid? studentId, double threshold)
|
||||
{
|
||||
@@ -182,7 +198,18 @@ public partial class CompetencyOverviewRow : ObservableObject
|
||||
private static string ScoreText(CompetencyScore? score, bool includeParticipants)
|
||||
{
|
||||
if (score is null) return "–";
|
||||
var evidence = score.EvidenceCount == 1 ? "1 Aufgabenwert" : $"{score.EvidenceCount} Aufgabenwerte";
|
||||
var evidenceParts = new List<string>();
|
||||
if (score.ExamEvidenceCount > 0)
|
||||
evidenceParts.Add(score.ExamEvidenceCount == 1
|
||||
? "1 Aufgabenwert"
|
||||
: $"{score.ExamEvidenceCount} Aufgabenwerte");
|
||||
if (score.ParticipationEvidenceCount > 0)
|
||||
evidenceParts.Add(score.ParticipationEvidenceCount == 1
|
||||
? "1 Mitarbeitswert"
|
||||
: $"{score.ParticipationEvidenceCount} Mitarbeitswerte");
|
||||
var evidence = evidenceParts.Count > 0
|
||||
? string.Join(" · ", evidenceParts)
|
||||
: score.EvidenceCount == 1 ? "1 Wert" : $"{score.EvidenceCount} Werte";
|
||||
return includeParticipants
|
||||
? $"{score.Percent:0.#} % · {score.ParticipantCount} Schüler · {evidence}"
|
||||
: $"{score.Percent:0.#} % · {evidence}";
|
||||
|
||||
Reference in new issue
Block a user