-
Notifications
You must be signed in to change notification settings - Fork 289
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
Integrated code lifecycle
: Add editing of auxiliary repositories for instructors
#9585
base: develop
Are you sure you want to change the base?
Integrated code lifecycle
: Add editing of auxiliary repositories for instructors
#9585
Conversation
WalkthroughThe pull request introduces enhancements to the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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 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: 5
🧹 Outside diff range and nitpick comments (3)
src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-instructor-and-editor-container.component.html (1)
84-97
: Consider adding translations and improving disabled state feedback.The implementation is solid and follows the new Angular syntax guidelines correctly. However, there are two potential improvements:
- Add translation support for consistency with other repository buttons
- Enhance the disabled state feedback
Apply these changes to improve the implementation:
@for (auxiliaryRepository of exercise.auxiliaryRepositories; track exercise.auxiliaryRepositories; let i = $index) { @if (auxiliaryRepository.id) { <button - [disabled]="!exercise" + [disabled]="!exercise || !auxiliaryRepository.repositoryUrl" (click)="selectAuxiliaryRepository(auxiliaryRepository.id)" ngbDropdownItem [style.background-color]=" selectedRepository === REPOSITORY.AUXILIARY && selectedRepositoryId === auxiliaryRepository.id ? '#3e8acc' : 'transparent' " > - {{ auxiliaryRepository.name }} + <span [jhiTranslate]="'artemisApp.editor.repoSelect.auxiliaryRepo'" [translateValues]="{ name: auxiliaryRepository.name }"></span> </button> } }Add this translation key to your i18n files:
{ "artemisApp.editor.repoSelect.auxiliaryRepo": "Auxiliary Repository: {{name}}" }src/main/java/de/tum/cit/aet/artemis/programming/repository/ProgrammingExerciseRepository.java (1)
779-782
: LGTM, but consider refactoring the "dark hack".The changes correctly integrate auxiliary repositories into the data retrieval. However, as noted in the TODO comment, this method uses a hack to load participations separately.
Consider refactoring this into a service layer that properly handles the data loading in a more maintainable way:
- ProgrammingExercise programmingExerciseWithAuxiliaryRepositories = findByIdWithAuxiliaryRepositoriesElseThrow(programmingExerciseId); - - programmingExerciseWithTemplate.setAuxiliaryRepositories(programmingExerciseWithAuxiliaryRepositories.getAuxiliaryRepositories()); + // Move to ProgrammingExerciseService + @Transactional(readOnly = true) + public ProgrammingExercise getProgrammingExerciseWithAllParticipations(Long exerciseId) { + ProgrammingExercise exercise = programmingExerciseRepository + .findWithTemplateParticipationLatestResultFeedbackTestCasesById(exerciseId) + .orElseThrow(() -> new EntityNotFoundException("Programming exercise not found")); + + // Load solution participation and auxiliary repositories in a single query + ProgrammingExercise exerciseWithSolutionAndAuxRepos = programmingExerciseRepository + .findWithSolutionParticipationAndAuxiliaryRepositoriesById(exerciseId) + .orElseThrow(() -> new EntityNotFoundException("Programming exercise not found")); + + exercise.setSolutionParticipation(exerciseWithSolutionAndAuxRepos.getSolutionParticipation()); + exercise.setAuxiliaryRepositories(exerciseWithSolutionAndAuxRepos.getAuxiliaryRepositories()); + + return exercise; + }src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-instructor-base-container.component.ts (1)
31-31
: Consider using PascalCase for enum membersThe
REPOSITORY
enum uses uppercase naming for its members. According to the coding guidelines, enums should use PascalCase. Renaming the enum members to PascalCase will improve consistency.Apply this diff to update the enum member names:
export enum REPOSITORY { - ASSIGNMENT = 'ASSIGNMENT', - TEMPLATE = 'TEMPLATE', - SOLUTION = 'SOLUTION', - TEST = 'TEST', - AUXILIARY = 'AUXILIARY', + Assignment = 'ASSIGNMENT', + Template = 'TEMPLATE', + Solution = 'SOLUTION', + Test = 'TEST', + Auxiliary = 'AUXILIARY', }Ensure to update all references to these enum members throughout the codebase to reflect the changes.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (6)
- src/main/java/de/tum/cit/aet/artemis/programming/repository/ProgrammingExerciseRepository.java (1 hunks)
- src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-instructor-and-editor-container.component.html (2 hunks)
- src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-instructor-and-editor-container.component.ts (1 hunks)
- src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-instructor-and-editor-container.scss (1 hunks)
- src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-instructor-base-container.component.ts (6 hunks)
- src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-management-routing.module.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
- src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-instructor-and-editor-container.scss
🧰 Additional context used
📓 Path-based instructions (5)
src/main/java/de/tum/cit/aet/artemis/programming/repository/ProgrammingExerciseRepository.java (1)
Pattern
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_importssrc/main/webapp/app/exercises/programming/manage/code-editor/code-editor-instructor-and-editor-container.component.html (1)
Pattern
src/main/webapp/**/*.html
: @if and @for are new and valid Angular syntax replacing *ngIf and *ngFor. They should always be used over the old style.src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-instructor-and-editor-container.component.ts (1)
src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-instructor-base-container.component.ts (1)
src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-management-routing.module.ts (1)
🔇 Additional comments (5)
src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-instructor-and-editor-container.component.ts (2)
20-20
: LGTM! The styleUrl addition follows Angular best practices.The addition of the styleUrl property follows Angular's component styling best practices and adheres to the coding guidelines.
Line range hint
1-50
: Verify auxiliary repository handling implementation.Given that this PR's main objective is to add support for auxiliary repositories editing, we should verify that this functionality is properly implemented, either in this component or its parent class.
Let's verify the implementation:
✅ Verification successful
Let me gather more information about the auxiliary repository implementation by checking the base component and related files:
Based on the comprehensive evidence from the shell script outputs, I can now provide the final response:
Auxiliary repository support is properly implemented in this component and its parent class
The implementation includes:
- Proper routing setup for auxiliary repositories via
auxiliary/:repositoryId
path- Complete UI integration in the repository dropdown menu
- Full handling in the base component including:
- Repository selection logic
- Domain change management
- Navigation methods
- State management for auxiliary repositories
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for auxiliary repository handling in the base component and related files # Check base component implementation echo "Checking base component for auxiliary repository handling..." rg -A 5 "auxiliary.*repository" "src/main/webapp/app/exercises/programming/manage/code-editor/" # Check for route configuration echo "Checking route configuration for auxiliary repository..." rg -A 5 "auxiliary/:repositoryId" "src/main/webapp/app/exercises/programming/" # Check for related service methods echo "Checking service implementations..." ast-grep --pattern 'class $_ { $$$ auxiliary$_($$$) { $$$ } $$$ }'Length of output: 5135
Script:
#!/bin/bash # Check the base component implementation echo "Checking CodeEditorInstructorBaseContainerComponent..." cat src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-instructor-base-container.component.ts # Check for auxiliary repository related models and interfaces echo -e "\nChecking for auxiliary repository models..." rg -l "auxiliaryRepositories?" src/main/webapp/app/exercises/programming/ # Check for auxiliary repository related template echo -e "\nChecking template for auxiliary repository UI..." cat src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-instructor-and-editor-container.component.htmlLength of output: 28924
src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-management-routing.module.ts (1)
57-68
: LGTM! Route configuration follows established patterns.The new route for auxiliary repositories maintains consistency with existing routes in terms of:
- Authorization controls
- Cache configuration
- Component reuse
- Data structure
src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-instructor-and-editor-container.component.html (1)
40-42
: LGTM: Repository selection button implementation is clean and functional.The button text dynamically updates to show either the auxiliary repository name or the selected repository type, providing clear visual feedback to users.
src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-instructor-base-container.component.ts (1)
68-69
: Properties are correctly named using camelCaseThe new properties
selectedRepositoryId
andselectedAuxiliaryRepositoryName
follow the camelCase naming convention, adhering to the coding guidelines.
...webapp/app/exercises/programming/manage/code-editor/code-editor-management-routing.module.ts
Show resolved
Hide resolved
.../exercises/programming/manage/code-editor/code-editor-instructor-base-container.component.ts
Show resolved
Hide resolved
.../exercises/programming/manage/code-editor/code-editor-instructor-base-container.component.ts
Show resolved
Hide resolved
.../exercises/programming/manage/code-editor/code-editor-instructor-base-container.component.ts
Show resolved
Hide resolved
.../exercises/programming/manage/code-editor/code-editor-instructor-base-container.component.ts
Outdated
Show resolved
Hide resolved
…ode-editor-instructor-base-container.component.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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.
src/main/java/de/tum/cit/aet/artemis/programming/repository/ProgrammingExerciseRepository.java
Show resolved
Hide resolved
...es/programming/manage/code-editor/code-editor-instructor-and-editor-container.component.html
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: 1
🧹 Outside diff range and nitpick comments (1)
src/test/java/de/tum/cit/aet/artemis/programming/ProgrammingExerciseGitIntegrationTest.java (1)
Line range hint
73-119
: Consider splittingtestRepositoryMethods
into separate test methods.The current test method contains multiple assertions testing different repository methods. To improve test specificity and maintainability, consider splitting it into separate test methods, each focusing on a specific repository method. This aligns with the test size and specificity guidelines.
Here's a suggested refactor:
- @Test - @WithMockUser(username = TEST_PREFIX + "student3") - void testRepositoryMethods() { - assertThatExceptionOfType(EntityNotFoundException.class).isThrownBy(() -> programmingExerciseRepository.findByIdElseThrow(Long.MAX_VALUE)); - - assertThatExceptionOfType(EntityNotFoundException.class).isThrownBy(() -> programmingExerciseRepository.findByIdWithAuxiliaryRepositoriesElseThrow(Long.MAX_VALUE)); - - assertThatExceptionOfType(EntityNotFoundException.class) - .isThrownBy(() -> programmingExerciseRepository.findByIdWithStudentParticipationsAndLegalSubmissionsElseThrow(Long.MAX_VALUE)); - - assertThatExceptionOfType(EntityNotFoundException.class).isThrownBy(() -> programmingExerciseRepository.findByIdWithSubmissionPolicyElseThrow(Long.MAX_VALUE)); - - assertThatExceptionOfType(EntityNotFoundException.class) - .isThrownBy(() -> programmingExerciseRepository.findByIdWithTemplateAndSolutionParticipationElseThrow(Long.MAX_VALUE)); - - assertThatExceptionOfType(EntityNotFoundException.class).isThrownBy( - () -> programmingExerciseRepository.findByIdWithTemplateAndSolutionParticipationAndAuxiliaryReposAndLatestResultFeedbackTestCasesElseThrow(Long.MAX_VALUE)); - - assertThatExceptionOfType(EntityNotFoundException.class) - .isThrownBy(() -> programmingExerciseRepository.findByIdWithTemplateAndSolutionParticipationTeamAssignmentConfigCategoriesElseThrow(Long.MAX_VALUE)); - } + @Test + @WithMockUser(username = TEST_PREFIX + "student3") + void shouldThrowEntityNotFoundExceptionWhenFindingNonExistentExerciseById() { + assertThatExceptionOfType(EntityNotFoundException.class) + .isThrownBy(() -> programmingExerciseRepository.findByIdElseThrow(Long.MAX_VALUE)); + } + + @Test + @WithMockUser(username = TEST_PREFIX + "student3") + void shouldThrowEntityNotFoundExceptionWhenFindingNonExistentExerciseWithAuxiliaryRepositories() { + assertThatExceptionOfType(EntityNotFoundException.class) + .isThrownBy(() -> programmingExerciseRepository.findByIdWithAuxiliaryRepositoriesElseThrow(Long.MAX_VALUE)); + } + + @Test + @WithMockUser(username = TEST_PREFIX + "student3") + void shouldThrowEntityNotFoundExceptionWhenFindingNonExistentExerciseWithStudentParticipations() { + assertThatExceptionOfType(EntityNotFoundException.class) + .isThrownBy(() -> programmingExerciseRepository.findByIdWithStudentParticipationsAndLegalSubmissionsElseThrow(Long.MAX_VALUE)); + } + + @Test + @WithMockUser(username = TEST_PREFIX + "student3") + void shouldThrowEntityNotFoundExceptionWhenFindingNonExistentExerciseWithSubmissionPolicy() { + assertThatExceptionOfType(EntityNotFoundException.class) + .isThrownBy(() -> programmingExerciseRepository.findByIdWithSubmissionPolicyElseThrow(Long.MAX_VALUE)); + } + + @Test + @WithMockUser(username = TEST_PREFIX + "student3") + void shouldThrowEntityNotFoundExceptionWhenFindingNonExistentExerciseWithTemplateAndSolutionParticipation() { + assertThatExceptionOfType(EntityNotFoundException.class) + .isThrownBy(() -> programmingExerciseRepository.findByIdWithTemplateAndSolutionParticipationElseThrow(Long.MAX_VALUE)); + } + + @Test + @WithMockUser(username = TEST_PREFIX + "student3") + void shouldThrowEntityNotFoundExceptionWhenFindingNonExistentExerciseWithTemplateAndSolutionParticipationAndAuxiliaryRepos() { + assertThatExceptionOfType(EntityNotFoundException.class) + .isThrownBy(() -> programmingExerciseRepository.findByIdWithTemplateAndSolutionParticipationAndAuxiliaryReposAndLatestResultFeedbackTestCasesElseThrow(Long.MAX_VALUE)); + } + + @Test + @WithMockUser(username = TEST_PREFIX + "student3") + void shouldThrowEntityNotFoundExceptionWhenFindingNonExistentExerciseWithTemplateAndSolutionParticipationTeamAssignment() { + assertThatExceptionOfType(EntityNotFoundException.class) + .isThrownBy(() -> programmingExerciseRepository.findByIdWithTemplateAndSolutionParticipationTeamAssignmentConfigCategoriesElseThrow(Long.MAX_VALUE)); + }Benefits of this refactor:
- Each test method has a clear, specific purpose
- Test failures are easier to diagnose
- Test names clearly describe the expected behavior
- Follows the test size and specificity guidelines
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (5)
- src/main/java/de/tum/cit/aet/artemis/programming/repository/ProgrammingExerciseRepository.java (1 hunks)
- src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseResource.java (1 hunks)
- src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-instructor-and-editor-container.component.html (4 hunks)
- src/test/java/de/tum/cit/aet/artemis/programming/ProgrammingExerciseGitIntegrationTest.java (1 hunks)
- src/test/java/de/tum/cit/aet/artemis/programming/ProgrammingExerciseGradingServiceTest.java (8 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/main/webapp/app/exercises/programming/manage/code-editor/code-editor-instructor-and-editor-container.component.html
🧰 Additional context used
📓 Path-based instructions (4)
src/main/java/de/tum/cit/aet/artemis/programming/repository/ProgrammingExerciseRepository.java (1)
Pattern
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_importssrc/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseResource.java (1)
Pattern
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_importssrc/test/java/de/tum/cit/aet/artemis/programming/ProgrammingExerciseGitIntegrationTest.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: truesrc/test/java/de/tum/cit/aet/artemis/programming/ProgrammingExerciseGradingServiceTest.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
📓 Learnings (1)
src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseResource.java (3)
Learnt from: Hialus PR: ls1intum/Artemis#8607 File: src/main/java/de/tum/in/www1/artemis/web/rest/programming/ProgrammingExerciseResource.java:64-64 Timestamp: 2024-06-15T20:04:18.637Z Learning: For the Artemis project, import statements are automatically managed by formatters and should not be commented on.
Learnt from: Hialus PR: ls1intum/Artemis#8607 File: src/main/java/de/tum/in/www1/artemis/web/rest/programming/ProgrammingExerciseResource.java:64-64 Timestamp: 2024-10-08T15:35:42.972Z Learning: For the Artemis project, import statements are automatically managed by formatters and should not be commented on.
Learnt from: Hialus PR: ls1intum/Artemis#8607 File: src/main/java/de/tum/in/www1/artemis/web/rest/programming/ProgrammingExerciseResource.java:64-64 Timestamp: 2024-10-08T15:35:48.767Z Learning: For the Artemis project, import statements are automatically managed by formatters and should not be commented on.
🔇 Additional comments (4)
src/test/java/de/tum/cit/aet/artemis/programming/ProgrammingExerciseGitIntegrationTest.java (1)
116-117
: LGTM! The assertion correctly tests the new repository method.The updated assertion properly verifies that the new repository method
findByIdWithTemplateAndSolutionParticipationAndAuxiliaryReposAndLatestResultFeedbackTestCasesElseThrow
throws anEntityNotFoundException
when the entity is not found.src/main/java/de/tum/cit/aet/artemis/programming/repository/ProgrammingExerciseRepository.java (2)
773-774
: LGTM: Method name accurately reflects the new functionality.The method name has been updated to include "AndAuxiliaryRepos" which clearly indicates its enhanced capability to fetch auxiliary repositories.
780-783
: Consider optimizing the database queries.The current implementation makes multiple separate database calls which could impact performance:
- One for template participation
- One for solution participation
- One for auxiliary repositories
Consider refactoring this to use a single optimized query that fetches all required data at once.
Let's analyze the query patterns:
src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseResource.java (1)
509-509
: LGTM! Method name updated to include auxiliary repositories.The change correctly updates the repository method call to include auxiliary repositories in the response, which aligns with the PR's objective to support auxiliary repository editing in the "edit in editor" view.
Let's verify that this is the only occurrence of the old method name that needed to be updated:
✅ Verification successful
Method name correctly updated to include auxiliary repositories
The change is correct and consistent with the codebase. The repository interface shows that this is a new method name that aligns with the PR's objective to support auxiliary repositories in the "edit in editor" view. The old method name does not exist anywhere in the codebase, indicating this is a clean update.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Search for any remaining occurrences of the old method name # Test: Expect no matches as all occurrences should have been updated rg "findByIdWithTemplateAndSolutionParticipationLatestResultFeedbackTestCasesElseThrow"Length of output: 87
Script:
#!/bin/bash # Let's verify both the interface definition and implementation # 1. Search for the repository interface fd "ProgrammingExerciseRepository" --type f # 2. After finding the repository, let's check its content ast-grep --pattern 'interface ProgrammingExerciseRepository { $$$ findByIdWithTemplate$$$ElseThrow($$$) { $$$ } $$$ }' # 3. Let's also check for any test files that might use this method fd "ProgrammingExerciseResource.*Test" --type f # 4. Let's verify the implementation class if it exists fd "ProgrammingExerciseRepositoryImpl" --type fLength of output: 687
Script:
#!/bin/bash # Let's check the repository interface content directly using cat cat src/main/java/de/tum/cit/aet/artemis/programming/repository/ProgrammingExerciseRepository.java # Also check the service class that might use this method cat src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseRepositoryService.java # And the test file cat src/test/java/de/tum/cit/aet/artemis/programming/ProgrammingExerciseRepositoryServiceTest.javaLength of output: 117312
src/test/java/de/tum/cit/aet/artemis/programming/ProgrammingExerciseGradingServiceTest.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.
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.
Tested on TS4, still works fine. Re-approve
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: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
- src/main/java/de/tum/cit/aet/artemis/programming/repository/ProgrammingExerciseRepository.java (1 hunks)
- src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseResource.java (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseResource.java
🧰 Additional context used
📓 Path-based instructions (1)
src/main/java/de/tum/cit/aet/artemis/programming/repository/ProgrammingExerciseRepository.java (1)
Pattern
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
🔇 Additional comments (1)
src/main/java/de/tum/cit/aet/artemis/programming/repository/ProgrammingExerciseRepository.java (1)
791-792
: Method name change looks good.The method name now accurately reflects that it includes auxiliary repositories in the fetched data.
Checklist
General
Server
Client
authorities
to all new routes and checked the course groups for displaying navigation elements (links, buttons).Changes affecting Programming Exercises
Motivation and Context
Instructors can edit Template, Assignment, Solution and Test repositories in Artemis, by using the "edit in editor" view.
This is not yet possible for auxiliary repositories.
Description
This PR adds support for auxiliary repositories in the edit in editor view.
Also fixes a small UI bug, where the text on the drop-down button was not readable, when not hovering.
Steps for Testing
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
Performance Tests
Test Coverage
Screenshots
small Bugfix:
vs.
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Style
Chores