feat: improve WebUntis sync and competency insights
CI / build-and-test (push) Canceled after 0s

This commit is contained in:
admin committed 2026-09-20 22:17:29 +02:00
1 parent cdb4637c65
commit f0c0479bcb
22 files changed
+1099 -76

No files matched your search

@@ -108,6 +108,50 @@ public sealed class CompetencyAnalysisServiceTests
Assert.Empty(item.StudentScores);
}
[Fact]
public void Analyze_MitarbeitMitAutomatischerSchaetzung_FuelltKompetenzprofil()
{
var studentId = Guid.NewGuid();
var session = new ParticipationSession { Competencies = [Ref(K1)] };
var entry = new ParticipationEntry
{
SessionId = session.Id,
StudentId = studentId,
Ratings =
[
new AspectRating { Key = "quality", Value = 1 },
new AspectRating { Key = "quantity", Value = 2 },
],
};
var item = Assert.Single(_service.Analyze(Catalog(), [], [], [], [session], [entry],
[.. DefaultParticipationAspects.All]));
Assert.Equal(1, item.ParticipationSessionCount);
Assert.Equal(100, item.GroupScore!.Percent, 6); // Mittel 1,5 wird wie in der UI auf +2 gerundet.
Assert.Equal(1, item.GroupScore.ParticipationEvidenceCount);
Assert.Equal(100, item.StudentScores[studentId].Percent, 6);
}
[Fact]
public void Analyze_ManuelleKompetenzbewertung_UeberschreibtAutomatischeSchaetzung()
{
var studentId = Guid.NewGuid();
var session = new ParticipationSession { Competencies = [Ref(K1)] };
var entry = new ParticipationEntry
{
SessionId = session.Id,
StudentId = studentId,
Ratings = [new AspectRating { Key = "quality", Value = 2 }],
CompetencyRatings = [new CompetencyRating { ItemId = K1.Id, Value = -1 }],
};
var item = Assert.Single(_service.Analyze(Catalog(), [], [], [], [session], [entry],
[.. DefaultParticipationAspects.All]));
Assert.Equal(25, item.StudentScores[studentId].Percent, 6);
}
[Fact]
public void Analyze_GeloeschteKompetenz_BleibtMitGespeicherterMomentaufnahmeSichtbar()
{