Skip to content

Commit

Permalink
group by fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tibitoth authored Dec 9, 2024
1 parent d08cb3a commit 5c2d617
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ public async Task<IReadOnlyCollection<FinalStudentGrade>> List(string repoPrefix
{
var items = await this.repo.ListConfirmedWithRepositoryPrefix(Normalize.RepoName(repoPrefix));
var finalResults = new List<FinalStudentGrade>();
foreach (var student in items.GroupBy(r => Normalize.Neptun(r.Neptun)))
foreach (var student in items.GroupBy(r => new { Neptun = Normalize.Neptun(r.Neptun), r.GitHubRepoName }))
{
var lastResult = student.OrderByDescending(s => s.Date).First();
finalResults.Add(new FinalStudentGrade(
neptun: student.Key,
repo: lastResult.GitHubRepoName,
neptun: student.Key.Neptun,
repo: lastResult.Key.GitHubRepoName,

Check failure on line 24 in grade-management/Ahk.GradeManagement/Functions/ListGrades/GradeListing.cs

View workflow job for this annotation

GitHub Actions / build

'StudentResult' does not contain a definition for 'Key' and no accessible extension method 'Key' accepting a first argument of type 'StudentResult' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 24 in grade-management/Ahk.GradeManagement/Functions/ListGrades/GradeListing.cs

View workflow job for this annotation

GitHub Actions / build

'StudentResult' does not contain a definition for 'Key' and no accessible extension method 'Key' accepting a first argument of type 'StudentResult' could be found (are you missing a using directive or an assembly reference?)
prUrl: lastResult.GitHubPrUrl,
points: lastResult.Points == null ? new Dictionary<string, double>() : lastResult.Points.ToDictionary(keySelector: p => p.Name, elementSelector: p => p.Point)));
}
Expand Down

0 comments on commit 5c2d617

Please sign in to comment.