-
Notifications
You must be signed in to change notification settings - Fork 357
Quiz exercises: Fix average score calculation in quiz detail view
#10725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quiz exercises: Fix average score calculation in quiz detail view
#10725
Conversation
…ndAvgScore substituted in StatisticsService
Quiz exercises: Fix average score calculation in quiz detail view
Quiz exercises: Fix average score calculation in quiz detail viewQuiz exercises : Fix average score calculation in quiz detail view
Quiz exercises : Fix average score calculation in quiz detail viewQuiz exercises: Fix average score calculation in quiz detail view
End-to-End (E2E) Test Results Summary
|
||||||||||||||||||||||||
End-to-End (E2E) Test Results Summary |
…results-in-AvgScore
End-to-End (E2E) Test Results Summary
|
||||||||||||||||||||||||||||||
End-to-End (E2E) Test Results Summary
|
||||||||||||||||||||||||
WalkthroughThe method Changes
Suggested labels
Suggested reviewers
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
src/main/java/de/tum/cit/aet/artemis/assessment/repository/ParticipantScoreRepository.java (3)
50-55: Javadoc clarity & accuracy
- The description says “set of exercise” but should be “set of exercises.”
- The
@returntag refers to a primitivedouble, yet the method returns aDoublewhich may benullif no matching records exist. Please clarify nullable behavior or default to0.0.
56-61: Method naming consistency
Other methods usefindAverageScoreForExercise(s). To clearly indicate this operates on the rated score and to maintain uniformity, consider renaming to something likefindAverageRatedScoreForExercises.
56-61: Add unit tests forfindAvgScore
This new method isn’t covered by existing tests. Please add unit or integration tests to verify:
- Only graded results contribute (practice runs excluded).
- Correct behavior when the exercise set is empty or participants have no graded results.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/main/java/de/tum/cit/aet/artemis/assessment/repository/ParticipantScoreRepository.java(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`src/main/java/**/*.java`: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,de...
src/main/java/**/*.java: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports
src/main/java/de/tum/cit/aet/artemis/assessment/repository/ParticipantScoreRepository.java
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Codacy Static Code Analysis
HawKhiem
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on TS3. Practice quiz score doesn't affect average score as expected
marlonnienaber
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good. Tested on TS1. Behaves as expected.
alexjoham
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code lgmt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested on TS 2, students 1,2, instructor 16
I used Student 1 and Student 2. Student 1 answered all questions correctly when scoring, while Student 2 got everything wrong. After releasing practice mode, Student 2 answered all questions correctly. The average was not affected by the practice mode, but I suspect the denominator in the average calculation might be incorrect.


DenizOzturk95
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested on TS5, worked as described
|
There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions. |


Checklist
General
Server
Changes affecting Programming Exercises
Motivation and Context
The average score graphs for exercises in the instructior view should be calculated using the last graded result. Practice runs should not be used.
#9864
Description
The findAvgScore function in the ParticipantScoreRepository is adjusted to select the last rated score, not the last score in general (including possible practice runs).
Steps for Testing
Prerequisites:
Exam Mode Testing
Testserver States
You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.
Review Progress
Performance Review
Code Review
Manual Tests
Summary by CodeRabbit
Bug Fixes
Documentation