-
Notifications
You must be signed in to change notification settings - Fork 301
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
Development
: Add endpoint for learning path competency graph
#8649
Development
: Add endpoint for learning path competency graph
#8649
Conversation
WalkthroughThe recent changes introduce new DTO classes for managing competency progress and learning path graphs, along with corresponding updates to the service and resource layers to support these features. Additionally, new tests have been added to ensure the integrity and functionality of the learning path competency graph feature. Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant LearningPathResource
participant LearningPathService
participant CompetencyProgressRepository
participant CompetencyRelationRepository
User->>+LearningPathResource: getLearningPathCompetencyGraph()
LearningPathResource->>+LearningPathService: generateLearningPathCompetencyGraph()
LearningPathService->>+CompetencyProgressRepository: findCompetencyProgressByUser()
CompetencyProgressRepository-->>-LearningPathService: CompetencyProgress data
LearningPathService->>+CompetencyRelationRepository: findCompetencyRelations()
CompetencyRelationRepository-->>-LearningPathService: CompetencyRelation data
LearningPathService-->>-LearningPathResource: LearningPathCompetencyGraphDTO
LearningPathResource-->>-User: LearningPathCompetencyGraphDTO
This sequence diagram illustrates the interaction flow for generating and retrieving a learning path competency graph for a user. Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (2)
Files skipped from review as they are similar to previous changes (2)
Tip Early Access Features
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: 4
src/main/java/de/tum/in/www1/artemis/repository/CompetencyProgressRepository.java
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/web/rest/LearningPathResource.java
Outdated
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/service/learningpath/LearningPathService.java
Show resolved
Hide resolved
src/test/java/de/tum/in/www1/artemis/competency/LearningPathIntegrationTest.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.
Code LGTM 👍
07e7d5f
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.
Reapprove after adding softDueDate
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.
Code looks good. One small comment
src/main/java/de/tum/in/www1/artemis/web/rest/LearningPathResource.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Patrik Zander <38403547+pzdr7@users.noreply.github.com>
44e03db
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.
Reapprove 👍
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.
Code
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.
Maintainer approved
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
public record CompetencyProgressDTO(long id, String title, ZonedDateTime softDueDate, Double progress, Double confidence, Double mastery) { | ||
|
||
public static CompetencyProgressDTO of(CompetencyProgress competencyProgress) { |
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.
public static CompetencyProgressDTO of(CompetencyProgress competencyProgress) { | |
public static CompetencyProgressDTO of(@NotNull CompetencyProgress competencyProgress) { |
?
if (authorizationCheckService.isOnlyStudentInCourse(course, user) && !user.getId().equals(learningPath.getUser().getId()) | ||
&& !authorizationCheckService.isAtLeastInstructorInCourse(course, user)) { |
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.
if (authorizationCheckService.isOnlyStudentInCourse(course, user) && !user.getId().equals(learningPath.getUser().getId()) | |
&& !authorizationCheckService.isAtLeastInstructorInCourse(course, user)) { | |
if (authorizationCheckService.isOnlyStudentInCourse(course, user) && !user.equals(learningPath.getUser())) { |
User
s implementequals()
- The third check appears unnecessary, as we already check that the user is only a student
6d7654f
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.
Reapprove
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.
Reapprove
Learning path
: Add Endpoint for Learning Path Competency GraphDevelopment
: Add endpoint for learning path competency graph
Checklist
General
Server
Motivation and Context
@JohannesWt wants a new endpoint with the following structure given the learning Path id:
Description
Added the endpoint as requested
Steps for Testing
No manual testing possible, since the end point is not yet used
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Review Progress
Performance Review
Code Review
Test Coverage
Server