-
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
Learning analytics
: Fix missing name of attachment lecture units on student dashboard
#8781
Learning analytics
: Fix missing name of attachment lecture units on student dashboard
#8781
Conversation
WalkthroughThe changes enhance the Changes
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (1)
Additional context usedPath-based instructions (1)
Additional comments not posted (2)
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: 1
SELECT new de.tum.in.www1.artemis.web.rest.dto.metrics.LectureUnitInformationDTO(lu.id, lu.lecture.id, COALESCE(lu.name, a.name), lu.releaseDate, TYPE(lu)) | ||
FROM LectureUnit lu | ||
LEFT JOIN Attachment a ON a.attachmentUnit.id = lu.id |
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.
The modified query correctly implements the left join with the Attachment
entity and uses the COALESCE
function to handle potential null values in lecture unit names. This should ensure that titles are displayed correctly on the student dashboard.
Consider reviewing the performance of this query, especially in scenarios where there are many lecture units and attachments, to ensure that it does not introduce any significant delays.
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 change looks good to me. Also tested on TS3 and the names are all visible now. Thanks for the fix 🙌.
src/main/java/de/tum/in/www1/artemis/repository/metrics/LectureUnitMetricsRepository.java
Outdated
Show resolved
Hide resolved
…eUnitMetricsRepository.java Co-authored-by: Maximilian Anzinger <44003963+MaximilianAnzinger@users.noreply.github.com>
e43e8cf
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.
Tested on TS3. Created a lecture unit with type attachment and linked it to a competency. Did not encounter any missing names.
Checklist
General
Server
Motivation and Context
The GAD course uses a lot of attachment units and the titles are missing:
Description
Use title of the attachment and include it in the DTO for display.
Steps for Testing
Prerequisites:
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Review Progress
Performance Review
Code Review
Manual Tests
Test Coverage
no change
Screenshots
Fixed:
Summary by CodeRabbit