Skip to content
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

General: Add course archive for old courses from previous semesters #9343

Merged
merged 90 commits into from
Oct 24, 2024

Conversation

edkaya
Copy link
Contributor

@edkaya edkaya commented Sep 20, 2024

Checklist

General

Server

  • I strictly followed the server coding and design guidelines.
  • I added pre-authorization annotations according to the guidelines and checked the course groups for all new REST Calls (security).
  • I documented the Java code using JavaDoc style.

Client

  • Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data (e.g. using paging).
  • I strictly followed the principle of data economy for all client-server REST calls.
  • I strictly followed the client coding and design guidelines.
  • Following the theming guidelines, I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme.
  • I added authorities to all new routes and checked the course groups for displaying navigation elements (links, buttons).
  • I documented the TypeScript code using JSDoc style.
  • I added multiple screenshots/screencasts of my UI changes.
  • I translated all newly inserted strings into English and German.

Motivation and Context

Students often want access to old or completed courses on Artemis from previous semesters in which they were enrolled. While they can technically access these courses if they remember the course link, relying on memory and attempting to access the course via the link is not practical. This PR closes #9129.

Description

  • Added new component course archive to present all previous courses in which students were enrolled, grouped by semesters, which can be collapsed by clicking on the respective accordion groups.
  • Added new course card header component, derived from the new course card design. (We are currently using the same code/styling for new course cards, therefore this component will be reused in the course cards files after we succesfully merge the new course cards)
  • Added a get request to fetch necessary courses on demand
  • Added "Looking for old courses? Click here" label to get access for the course archive page.
  • Added Search and Sort Functionality

Steps for Testing

Prerequisites:

  • 1 Admin (if you want to create your own course, if its the case, please dont forget to assign a semester, start and end date to the course (end date should be older than the current time), otherwise the page does not display the old course)
  • 1 Student
  • Some courses with a defined start/end date and an assigned semester. The student account must be also enrolled in the courses.

(I already created some old courses on TS3, and test users 1-5 are enrolled in these courses. )

  1. Log in to Artemis
  2. Navigate to Course Overview Page
  3. Scroll down, see "Looking for old courses? Click here" label and click on it
  4. Verify that the page looks good
  5. Verify that you can see the old courses, grouped by the semesters
  6. Verify that you can search for courses via search bar
  7. Verify that sort functionality works as expected (sorting semesters)
  8. Verify that you can navigate to the course by clicking on the course card headers

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.







Class/File Line Coverage Confirmation (assert/expect)
course-archive.component.ts 96.96%

Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Screenshots

Group 156

Screenshot 2024-09-20 at 15 38 21 Screenshot 2024-09-20 at 15 38 32

Summary by CodeRabbit

Release Notes

  • New Features

    • Added a new DTO structure for course archiving, enhancing data representation.
    • Introduced a method to retrieve archived courses, improving access to course data.
    • Implemented methods for managing semester collapse states in local storage.
  • User Interface Improvements

    • Enhanced layout for displaying archived courses with sorting and search functionalities.
    • Added new prompts and messages to guide users in accessing archived courses.
  • Localization Enhancements

    • Introduced German and English translations for new archive-related terms and messages, improving accessibility for users.
  • Bug Fixes

    • Improved state management for course overviews and semester visibility.
  • Tests

    • Enhanced testing capabilities for course archiving functionality, ensuring correct behavior for various user scenarios.

Copy link

@SindiBuklaji SindiBuklaji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on TS3 and it works as described. Neat feature 👍

Fyi, test user 6 is also enrolled in the courses you created.

Copy link

@zagemello zagemello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
Tested on TS3, worked as expected

Copy link

@Cathy0123456789 Cathy0123456789 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on TS3. Searching, sorting and navigating into the courses work as expected. Nice feature!

@krusche krusche changed the title General: Implement Course Archive to see old courses from previous semesters General: Add course archive for old courses from previous semesters Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Pull requests that update TypeScript code. (Added Automatically!) core Pull requests that affect the corresponding module maintainer-approved The feature maintainer has approved the PR programming Pull requests that affect the corresponding module ready to merge server Pull requests that update Java code. (Added Automatically!) tests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Students show be able to see completed / inactive course