-
Notifications
You must be signed in to change notification settings - Fork 297
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
: Enable manual quiz evaluation for course quizzes
#8837
Conversation
WalkthroughThe changes involve refactoring quiz evaluation processes in an educational platform. The Changes
Sequence Diagram(s)sequenceDiagram
participant UI as User Interface
participant QERC as QuizExerciseResource
participant QRS as QuizResultService
participant QR as QuizExerciseRepository
participant SPR as StudentParticipationRepository
participant SR as SubmissionRepository
participant RR as ResultRepository
UI->>QERC: Evaluate Quiz Exercise
QERC->>QRS: evaluateQuizAndUpdateStatistics(quizExerciseId)
QRS->>QR: find(quizExerciseId)
QR-->>QRS: QuizExercise
QRS->>SPR: findByExerciseId(quizExerciseId)
SPR-->>QRS: StudentParticipations
QRS->>SR: findByExerciseId(quizExerciseId)
SR-->>QRS: Submissions
QRS->>RR: findResults(quizExerciseId)
RR-->>QRS: Results
QRS->>QERC: Calculation Complete
QERC-->>UI: Quiz Exercise Evaluated
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (2)
Files not reviewed due to errors (1)
Additional context usedPath-based instructions (2)
Learnings (1)
Additional comments not posted (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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: 7
Outside diff range comments (1)
src/main/java/de/tum/in/www1/artemis/web/rest/QuizExerciseResource.java (1)
Line range hint
156-178
: Constructor injection ofQuizResultService
.The addition of
QuizResultService
in the constructor promotes good dependency injection practices. However, the constructor is quite large, which might indicate that this class is handling too many responsibilities. Consider breaking down this class or using a factory pattern to manage dependencies better.
src/main/java/de/tum/in/www1/artemis/web/rest/QuizExerciseResource.java
Outdated
Show resolved
Hide resolved
src/test/java/de/tum/in/www1/artemis/exercise/quiz/QuizExerciseIntegrationTest.java
Show resolved
Hide resolved
src/test/java/de/tum/in/www1/artemis/exercise/quiz/QuizExerciseIntegrationTest.java
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/web/rest/QuizSubmissionResource.java
Show resolved
Hide resolved
src/main/webapp/app/exercises/quiz/manage/quiz-exercise-manage-buttons.component.ts
Show resolved
Hide resolved
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: 2
src/main/java/de/tum/in/www1/artemis/service/quiz/QuizResultService.java
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/service/quiz/QuizResultService.java
Outdated
Show resolved
Hide resolved
|
src/main/java/de/tum/in/www1/artemis/service/quiz/QuizResultService.java
Outdated
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/service/quiz/QuizResultService.java
Outdated
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/service/quiz/QuizResultService.java
Outdated
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/web/rest/QuizExerciseResource.java
Outdated
Show resolved
Hide resolved
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.
Unrelated issue
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: 2
src/main/java/de/tum/in/www1/artemis/service/quiz/QuizResultService.java
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/service/quiz/QuizResultService.java
Show resolved
Hide resolved
Quiz exercises
: Enable manual quiz evaluation for non-exam exercisesQuiz exercises
: Enable manual quiz evaluation for course quizzes
Checklist
General
Server
Client
Motivation and Context
There was a bug in production that caused the automatic quiz evaluation to fail. Therefore we need a method to evaluate the quiz manually, which is a feature that could be useful as a backup in general.
Description
This PR fixes the bug and also adds a button to the quiz detail page to evaluate the quiz. This is different from the re-evaluation, as the evaluation keeps old results and only creates new results for submissions that do not have one yet.
Steps for Testing
Prerequisites:
Go to the participants_score table and delete the entry where the last_result_id is the id of your result
Then delete the entry of your result in the results table
Exam Mode Testing
Prerequisites:
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.
Review Progress
Performance Review
Code Review
Manual Tests
Exam Mode Test
Test Coverage
TODO
Screenshots
Summary by CodeRabbit
New Features
QuizResultService
for efficient quiz evaluation and statistics management.Bug Fixes
UserRoleDTO
.Refactor
QuizExercise
as a parameter for accurate score calculation.Documentation
Tests