-
Notifications
You must be signed in to change notification settings - Fork 302
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
Adaptive learning
: Fix competency progress update for exercise and lecture unit operations
#8976
Adaptive learning
: Fix competency progress update for exercise and lecture unit operations
#8976
Conversation
…e-progress-on-delete
WalkthroughThe recent updates across various repository and service files in the project primarily focus on enhancing the handling and retrieval of competencies for different exercise types and learning objects. Key modifications include refining methods to avoid clearing competencies, introducing new methods to fetch entities with competencies, and adding dependencies and logic to manage competency progress. These enhancements aim to ensure database integrity, improve data fetching efficiency, and maintain accurate competency tracking. Changes
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (2)
Additional context usedPath-based instructions (2)
Additional comments not posted (4)
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: 6
Outside diff range comments (1)
src/main/java/de/tum/in/www1/artemis/repository/TextUnitRepository.java (1)
Line range hint
14-19
:
Add null check for robustness.Even though the
Optional
return type helps in handling null values, adding a null check with a clear error message can catch potential issues early.+ default TextUnit findByIdWithCompetenciesElseThrow(long textUnitId) { + return getValueElseThrow(findByIdWithCompetencies(textUnitId), textUnitId); + }
src/main/java/de/tum/in/www1/artemis/web/rest/programming/ProgrammingExerciseResource.java
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/repository/AttachmentUnitRepository.java
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/repository/FileUploadExerciseRepository.java
Show resolved
Hide resolved
src/test/java/de/tum/in/www1/artemis/exercise/fileupload/FileUploadExerciseIntegrationTest.java
Outdated
Show resolved
Hide resolved
src/test/java/de/tum/in/www1/artemis/lecture/VideoUnitIntegrationTest.java
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: 5
src/test/java/de/tum/in/www1/artemis/exercise/fileupload/FileUploadExerciseIntegrationTest.java
Outdated
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/repository/FileUploadExerciseRepository.java
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/web/rest/TextExerciseResource.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.
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/test/java/de/tum/in/www1/artemis/text/TextExerciseIntegrationTest.java
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: 0
Outside diff range comments (1)
src/main/java/de/tum/in/www1/artemis/service/learningpath/LearningPathRecommendationService.java (1)
[!TIP]
Codebase VerificationUpdate method calls to match the new signature
The method
getOrderOfLearningObjectsForCompetency
has been refactored to remove theUser
parameter. However, there are still occurrences in the codebase where the method is called with the old signature. These calls need to be updated to match the new method signature.
src/main/java/de/tum/in/www1/artemis/web/rest/LearningPathResource.java
- Line 1:
getOrderOfLearningObjectsForCompetency(competencyId, user)
src/main/java/de/tum/in/www1/artemis/service/learningpath/LearningPathRecommendationService.java
- Line 1:
getOrderOfLearningObjectsForCompetency(lastCompletedCompetency, user)
- Line 2:
getOrderOfLearningObjectsForCompetency(competency, user)
src/main/java/de/tum/in/www1/artemis/service/learningpath/LearningPathNavigationService.java
- Line 1:
getOrderOfLearningObjectsForCompetency(currentCompetency, learningPath.getUser())
- Line 2:
getOrderOfLearningObjectsForCompetency(competencyToSearch, user)
- Line 3:
getOrderOfLearningObjectsForCompetency(nextCompetencyToSearch, user)
- Line 4:
getOrderOfLearningObjectsForCompetency(competency, learningPathUser)
Please update these method calls to remove the
User
parameter.Analysis chain
Line range hint
410-419
: LGTM! But verify the method usage in the codebase.The removal of the
User
parameter simplifies the method signature and improves readability.However, ensure that all method calls to
getOrderOfLearningObjectsForCompetency
match the new signature.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all method calls to `getOrderOfLearningObjectsForCompetency` match the new signature. # Test: Search for the method usage. Expect: Only occurrences of the new signature. rg --type java -A 5 $'getOrderOfLearningObjectsForCompetency'Length of output: 8544
Checklist
General
Server
Motivation and Context
The competency progress was not updated correctly for different exercise and lecture operations. This could lead to wrong information shown to the student as well as wrong suggestions on the learning path.
Description
Each operation that an instructor can do regarding exercises and lecture units should now correctly update the competency progress. These operations include:
IMPORTANT: The corresponding updates are done asynchronously, so it might take a short while until the changes are noticeable.
Any operation that changes the student score (e.g. assessment or changing programming test cases) already lead to a reevaluation of competency progresses. But this is only checked every minute and then asynchronously updated, so it might take a while...
Steps for 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
Test Coverage
Server
Summary by CodeRabbit
Bug Fixes
New Features
Improvements