-
Notifications
You must be signed in to change notification settings - Fork 300
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
Programming exercises
: Allow to choose preliminary feedback model
#10067
base: develop
Are you sure you want to change the base?
Programming exercises
: Allow to choose preliminary feedback model
#10067
Conversation
…odules: client side
…g-exercises/choose-preliminary-feedback-model
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. |
Programming exercises
Allow to choose preliminary feedback model
…iminary-feedback-model
…oose-preliminary-feedback-model' into feature/programming-exercises/choose-preliminary-feedback-model
Programming exercises
Allow to choose preliminary feedback modelProgramming exercises:
Allow to choose preliminary feedback model
Programming exercises:
Allow to choose preliminary feedback modelProgramming exercises
: Allow to choose preliminary feedback model
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 (1)
src/main/java/de/tum/cit/aet/artemis/modeling/service/ModelingExerciseFeedbackService.java (1)
155-155
: Consider making the boolean parameter more descriptive.
Passingtrue
directly intogetModelingFeedbackSuggestions
can reduce readability; it isn't immediately clear that this indicates preliminary feedback. Using an enum or a self-documenting boolean constant (e.g.,PRELIMINARY_FEEDBACK = true
) would clarify intent and improve maintainability.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
src/main/java/de/tum/cit/aet/artemis/athena/service/AthenaFeedbackSuggestionsService.java
(1 hunks)src/main/java/de/tum/cit/aet/artemis/modeling/service/ModelingExerciseFeedbackService.java
(1 hunks)src/main/java/de/tum/cit/aet/artemis/programming/domain/ProgrammingExercise.java
(2 hunks)src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseCodeReviewFeedbackService.java
(1 hunks)src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseImportService.java
(1 hunks)src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseExportImportResource.java
(2 hunks)src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseResource.java
(3 hunks)src/main/webapp/app/exercises/programming/manage/programming-exercise-detail.component.ts
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
- src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseExportImportResource.java
- src/main/java/de/tum/cit/aet/artemis/programming/domain/ProgrammingExercise.java
- src/main/webapp/app/exercises/programming/manage/programming-exercise-detail.component.ts
- src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseResource.java
- src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseImportService.java
🧰 Additional context used
📓 Path-based instructions (3)
src/main/java/de/tum/cit/aet/artemis/modeling/service/ModelingExerciseFeedbackService.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
src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseCodeReviewFeedbackService.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
src/main/java/de/tum/cit/aet/artemis/athena/service/AthenaFeedbackSuggestionsService.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
📓 Learnings (1)
src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseCodeReviewFeedbackService.java (1)
Learnt from: undernagruzez
PR: ls1intum/Artemis#8498
File: src/main/java/de/tum/in/www1/artemis/service/programming/ProgrammingExerciseCodeReviewFeedbackService.java:236-236
Timestamp: 2024-11-12T12:51:40.391Z
Learning: Rate limit exceptions for AI feedback requests are handled in the client app.
🔇 Additional comments (14)
src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseCodeReviewFeedbackService.java (1)
141-141
: Double-check the switch fromfalse
totrue
.
Changing the final parameter ingetProgrammingFeedbackSuggestions
fromfalse
totrue
will generate graded feedback instead of non-graded. Verify that this switch actually aligns with your intended behavior for non-graded feedback use cases.src/main/java/de/tum/cit/aet/artemis/athena/service/AthenaFeedbackSuggestionsService.java (13)
98-100
: Good clarification in the doc comment.
Explicitly naming the parameterisPreliminary
and describing it clarifies the method’s intention.
103-104
: Verify logging message for 'Non Graded' vs. 'Graded'.
Here the log will print “Non Graded” ifisPreliminary
istrue
. Confirm that this matches your intended semantics for preliminary vs. non-preliminary feedback.
112-113
: Parameter mapping to Athena.
Passing!isPreliminary
to theisGraded
field matches the requirement that Athena expects this boolean to indicate graded feedback. This is consistent with your prior clarification that “isGraded” must remain in the request.
114-117
: Duplicate comment: Ensure null checks for feedback modules.
As highlighted in past review comments, callingexercise.getPreliminaryFeedbackModule()
orexercise.getFeedbackSuggestionModule()
might riskNullPointerException
. Please ensure you validate these module references.
126-128
: Documentation alignment for programming use case.
The doc comment correctly outlines the purpose ofisPreliminary
. It matches the text exercise’s approach.
131-131
: Method signature clarity.
Introducingboolean isPreliminary
ingetProgrammingFeedbackSuggestions
increases code clarity, mirroring the text feedback method. Nicely done.
133-135
: Confirm 'Non Graded' logic in log statement.
Again, “Non Graded” is logged ifisPreliminary
istrue
. Confirm this matches the actual usage for preliminary feedback.
136-139
: Duplicate comment: Validate module references.
Ensure each module reference (getPreliminaryFeedbackModule()
orgetFeedbackSuggestionModule()
) is non-null before constructing the URL.
148-150
: Doc comment consistency for modeling.
The parameter description is consistent across text, programming, and modeling, which helps maintain clarity.
153-154
: Same logging pattern for 'Non Graded' feedback.
As in the other methods, ensure logging “Non Graded” is correct whenisPreliminary
istrue
.
161-162
: Check parameter inversion with!isPreliminary
.
As with the other methods, confirm that passing!isPreliminary
to the record’sisGraded
field is the desired approach for modeling feedback requests.
163-166
: Duplicate comment: Validate module references for modeling.
Consider adding null checks to avoid potentialNullPointerException
here if the module isn’t configured.
167-168
: Confirm final log statement for 'Non Graded' modeling feedback.
Logging “Non Graded” ifisPreliminary
istrue
is repeated throughout. Make sure it’s consistent with your intended meaning of “preliminary” feedback.
Please test only on TS1
!!! Contains database migrations !!!
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
Currently, Artemis allows only one module to be set for Athena Feedback Requests, be it for preliminary or graded feedback. This PR addresses the limitation and enables setting separate modules for each type of feedback.
Description
This PR introduces functionality that allows instructors to configure different Athena Feedback Request modules for preliminary feedback and graded feedback. Preliminary feedback can now be assigned a dedicated module without affecting the graded feedback settings.
Steps for Testing
Disclaimer:
Currently, only LLM modules support preliminary feedback. You can easily test this functionality with non-LLM modules to verify if the correct module is being used (non-LLM modules will not work).
As an instructor:
2. Navigate to the course settings.
3. Create a Programming, Text, or Modeling exercise.
4. Select a module for preliminary feedback (no due date required). For graded feedback, enable Feedback Suggestions, set a due date, and select a module(text or programming).
5. Save the changes.
As a student:
6. Open the created exercise.
7. Submit something.
8. Submit an AI feedback request.
9. Verify that the appropriate module is used based on the type of feedback.
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
Screenshots
Summary by CodeRabbit
Release Notes
New Features
ModuleType
enum withFEEDBACK_SUGGESTIONS
andPRELIMINARY_FEEDBACK
constants.Improvements
Changes
allowFeedbackRequests
toallowManualFeedbackRequests
.feedbackSuggestionModule
andpreliminaryFeedbackModule
to exercises.Localization
These changes provide more flexible and precise feedback mechanisms across different exercise types.