-
Notifications
You must be signed in to change notification settings - Fork 304
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
Tutorial groups
: Allow to export information
#8707
Tutorial groups
: Allow to export information
#8707
Conversation
WalkthroughThe recent updates introduce new functionalities for exporting tutorial group data to CSV and JSON formats. This involves changes in the service classes, REST endpoints, Angular components, and associated test cases. Localized strings for export dialogs in both German and English are added for better user experience. The new functionalities enable instructors to export detailed tutorial group and student data selectively. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI as Export Button UI
participant AngularSvc as Angular Service
participant Backend as Backend Service
User->>+UI: Click "Export" Button
UI->>+UI: Open Export Dialog
User->>+UI: Select Fields and Format (CSV/JSON)
UI->>+AngularSvc: Call export method with selected fields and format
AngularSvc->>+Backend: HTTP GET "/courses/{courseId}/tutorial-groups/export/{format}?fields={fields}"
Backend-->>-AngularSvc: Return exported data
AngularSvc-->>-UI: Trigger download of exported file
UI-->>-User: File Downloaded
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: 8
src/main/java/de/tum/in/www1/artemis/service/tutorialgroups/TutorialGroupService.java
Outdated
Show resolved
Hide resolved
src/test/java/de/tum/in/www1/artemis/tutorialgroups/TutorialGroupIntegrationTest.java
Outdated
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/web/rest/tutorialgroups/TutorialGroupResource.java
Outdated
Show resolved
Hide resolved
Update german translation Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…agement/tutorial-groups/tutorial-groups-management/tutorial-groups-export-button.component/tutorial-groups-export-button.component.ts remove unnecessary import 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.
Actionable comments posted: 1
Outside diff range comments (1)
src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-management.component.spec.ts (1)
Line range hint
1-1
: What light through yonder window breaks? It is the east, and Juliet is the sun. Optimize thy imports, for they do clutter more than they enlighten!- import { ComponentFixture, TestBed } from '@angular/core/testing'; + import type { ComponentFixture, TestBed } from '@angular/core/testing';
src/main/java/de/tum/in/www1/artemis/web/rest/tutorialgroups/TutorialGroupResource.java
Outdated
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/service/tutorialgroups/TutorialGroupService.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.
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.
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.
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 looks good + tested on TS2
For future follow-up: Make "Students" in the JSON-file contain a list, not a comma separated string.
Checklist
General
Client
Motivation and Context
This PR solves the issue mentioned in: #8681
where it is mentioned why not being able to export tutorial groups is a tendious process.
Description
I added a export button which opens a modal view where a instructor can choose which information he/she wants to export to a CSV/JSON. This is done via checkboxes. A select all button was also implemented if you do not want to tick all checkboxes manually. The information on which checkboxes are crossed is then sent to the server and parsed there. After creating the CSV/JSON the response is sent back to the client where the file is then downloaded.
Before:
![image](https://private-user-images.githubusercontent.com/92953467/335672325-e35e8fed-a868-4c66-b4fb-5e2fd67ed29d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3ODEyOTEsIm5iZiI6MTczOTc4MDk5MSwicGF0aCI6Ii85Mjk1MzQ2Ny8zMzU2NzIzMjUtZTM1ZThmZWQtYTg2OC00YzY2LWI0ZmItNWUyZmQ2N2VkMjlkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE3VDA4Mjk1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ0MzRkOGYyNzEyMGMwNDY3MGIxYzQxYjQ0OTRmZTEyYTNhYWY2NjNiMTQ5YWEwOTliNjJkZWIxNDAxMjkwZjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.JO6KOTNoKSupkC-Aab7-VB0oAFxq_tzEGOaA2UFcHqE)
![image](https://private-user-images.githubusercontent.com/92953467/336483636-77e93954-70e7-4550-a338-5feb52af0450.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3ODEyOTEsIm5iZiI6MTczOTc4MDk5MSwicGF0aCI6Ii85Mjk1MzQ2Ny8zMzY0ODM2MzYtNzdlOTM5NTQtNzBlNy00NTUwLWEzMzgtNWZlYjUyYWYwNDUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTN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0In0.fTLzrphC5uyfO58Lxhs9Z6kEvBIPYEm3IsGEWpCRXVg)
After:
Steps for Testing
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
Client
Server