This repository has been archived by the owner on Sep 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Add KPI table component #108
Open
HansenSven
wants to merge
23
commits into
develop
Choose a base branch
from
feat/kpi-table
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…TableComponentFetcher
NealGeilen
reviewed
Jun 23, 2023
Fix lint issues |
NealGeilen
suggested changes
Jun 27, 2023
# Conflicts: # Epsilon.Host.Frontend/src/views/PerformanceDashboard.vue
Comment on lines
78
to
120
foreach (var submission in course.SubmissionsConnection!.Nodes.Select(sm => sm.SubmissionsHistories.Nodes | ||
.Where(sub => sub.SubmittedAt > startDate && sub.SubmittedAt < endDate) | ||
.MaxBy(static h => h.Attempt))) | ||
{ | ||
if (submission is | ||
{ | ||
Assignment.Rubric: not null, | ||
RubricAssessments.Nodes: not null, | ||
}) | ||
{ | ||
var rubricCriteria = submission.Assignment.Rubric.Criteria?.ToArray(); | ||
|
||
if (rubricCriteria is not null) | ||
{ | ||
foreach (var outcome in GetValidOutcomes(rubricCriteria)) | ||
{ | ||
var assessmentRatings = submission.RubricAssessments.Nodes.FirstOrDefault()?.AssessmentRatings; | ||
|
||
var grade = assessmentRatings?.FirstOrDefault(ar => ar?.Criterion?.Outcome?.Id == outcome?.Id)?.Grade; | ||
|
||
if (grade != null) | ||
{ | ||
var assignmentName = submission!.Assignment!.Name!; | ||
var htmlUrl = submission.Assignment.HtmlUrl; | ||
var assessmentRating = assessmentRatings?.FirstOrDefault(ar => ar?.Criterion?.Outcome?.Id == outcome?.Id); | ||
|
||
if (assessmentRating is not null) | ||
{ | ||
|
||
if (kpiTableEntries.ContainsKey(outcome.Id)) | ||
{ | ||
UpdateKpiTableEntry(kpiTableEntries, outcome, submission.Assignment, grade); | ||
} | ||
else | ||
{ | ||
AddKpiTableEntry(kpiTableEntries, outcome, submission.Assignment, grade); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Check notice
Code scanning / CodeQL
Missed opportunity to use Where
This foreach loop [implicitly filters its target sequence](1) - consider filtering the sequence explicitly using '.Where(...)'.
NealGeilen
approved these changes
Jun 30, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.