-
Notifications
You must be signed in to change notification settings - Fork 303
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
: Add learner profile
#9673
Conversation
src/main/java/de/tum/cit/aet/artemis/atlas/domain/profile/CourseLearnerProfile.java
Outdated
Show resolved
Hide resolved
src/main/java/de/tum/cit/aet/artemis/atlas/service/profile/CourseLearnerProfileService.java
Show resolved
Hide resolved
86250b1
0ee393f
to
86250b1
Compare
86250b1
to
1780a78
Compare
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: 3
🧹 Nitpick comments (1)
src/test/java/de/tum/cit/aet/artemis/atlas/profile/LearnerProfileArchitectureTest.java (1)
28-33
: Use more descriptive constant names.The constant names could be more descriptive to better convey their purpose in the test scenarios.
- private static final String TEST_PREFIX = "learningpathintegration"; - private static final int NUMBER_OF_STUDENTS = 1; - private static final String STUDENT1_OF_COURSE = TEST_PREFIX + "student1"; + private static final String LEARNING_PATH_TEST_PREFIX = "learningpathintegration"; + private static final int INITIAL_STUDENT_COUNT = 1; + private static final String ENROLLED_STUDENT_USERNAME = LEARNING_PATH_TEST_PREFIX + "student1";
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/test/java/de/tum/cit/aet/artemis/atlas/profile/LearnerProfileArchitectureTest.java
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/test/java/de/tum/cit/aet/artemis/atlas/profile/LearnerProfileArchitectureTest.java (1)
Pattern src/test/java/**/*.java
: test_naming: descriptive; test_size: small_specific; fixed_data: true; junit5_features: true; assert_use: assertThat; assert_specificity: true; archunit_use: enforce_package_rules; db_query_count_tests: track_performance; util_service_factory_pattern: true; avoid_db_access: true; mock_strategy: static_mocks; context_restart_minimize: true
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: client-style
- GitHub Check: server-tests
- GitHub Check: client-tests-selected
- GitHub Check: server-style
- GitHub Check: client-tests
- GitHub Check: Analyse
- GitHub Check: Build and Push Docker Image
- GitHub Check: Build .war artifact
src/test/java/de/tum/cit/aet/artemis/atlas/profile/LearnerProfileArchitectureTest.java
Outdated
Show resolved
Hide resolved
src/test/java/de/tum/cit/aet/artemis/atlas/profile/LearnerProfileArchitectureTest.java
Outdated
Show resolved
Hide resolved
src/test/java/de/tum/cit/aet/artemis/atlas/profile/LearnerProfileArchitectureTest.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.
Actionable comments posted: 2
🧹 Nitpick comments (2)
src/test/java/de/tum/cit/aet/artemis/atlas/profile/LearnerProfileIntegrationTest.java (2)
14-19
: Make test data prefix more specific to the test scenario.Consider renaming
TEST_PREFIX
to something more specific likeLAZY_LOADING_TEST_PREFIX
to better reflect the test scenario.
20-29
: Document test scenario and optimize user creation.The setup creates users that aren't used in the current test cases. Consider:
- Adding JavaDoc to document the test scenario.
- Creating only the users needed for the current test.
@BeforeEach +/** + * Sets up the test scenario by creating: + * - One student (STUDENT1_OF_COURSE) + * - Two additional users not in the course + * Creates learner profiles for all users with the test prefix + */ void setupTestScenario() { userUtilService.addUsers(TEST_PREFIX, NUMBER_OF_STUDENTS, 1, 1, 1);
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/test/java/de/tum/cit/aet/artemis/atlas/profile/LearnerProfileIntegrationTest.java
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/test/java/de/tum/cit/aet/artemis/atlas/profile/LearnerProfileIntegrationTest.java (1)
Pattern src/test/java/**/*.java
: test_naming: descriptive; test_size: small_specific; fixed_data: true; junit5_features: true; assert_use: assertThat; assert_specificity: true; archunit_use: enforce_package_rules; db_query_count_tests: track_performance; util_service_factory_pattern: true; avoid_db_access: true; mock_strategy: static_mocks; context_restart_minimize: true
⏰ Context from checks skipped due to timeout of 90000ms (9)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: client-tests-selected
- GitHub Check: client-style
- GitHub Check: client-tests
- GitHub Check: server-style
- GitHub Check: server-tests
- GitHub Check: Build and Push Docker Image
- GitHub Check: Analyse
- GitHub Check: Build .war artifact
🔇 Additional comments (1)
src/test/java/de/tum/cit/aet/artemis/atlas/profile/LearnerProfileIntegrationTest.java (1)
1-12
: LGTM! Class structure follows best practices.The class is well-organized with proper package placement, necessary imports, and follows the integration test naming convention.
src/test/java/de/tum/cit/aet/artemis/atlas/profile/LearnerProfileIntegrationTest.java
Outdated
Show resolved
Hide resolved
src/test/java/de/tum/cit/aet/artemis/atlas/profile/LearnerProfileIntegrationTest.java
Show resolved
Hide resolved
461973f
to
0ffecab
Compare
0ffecab
to
1f2d1e5
Compare
Warning
This PR includes a migration! Do not deploy on testservers
Checklist
General
Server
Motivation and Context
Based on #9448
Description
Added LearnerProfile and CourseLearnerProfile. Each user has a LearnerProfile and each user in an active (current semester and not a test course) course with learning paths has automatically a course learner profile.
The CourseLearnerProfile is also created when a user enrolls in a course with learning paths or learning paths get enabled. The profiles are deleted if the user unenrolls or is deleted.
This PR does not add any UI!
Steps for Testing
🚨 🚨 Local setup to verify database entries 🚨 🚨
Course with enabled learning paths and some students
Review Progress
Performance Review
Code Review
Manual Tests
Performance Tests
Test Coverage
Server
LearnerProfile.java
andCourseLearnerProfile.java
currently only represent Datastructures without any logic. Coverage will be higher after subsequent PRs introduce logic and more tests.Summary by CodeRabbit
Based on the comprehensive summary of changes, here are the updated release notes:
New Features
Improvements
Technical Enhancements
These changes introduce a more comprehensive user profile system, allowing for more personalized learning experiences and better tracking of user progress across courses.