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

Course Playlist ordering #918

Merged
merged 1 commit into from
Jan 29, 2024
Merged

Course Playlist ordering #918

merged 1 commit into from
Jan 29, 2024

Conversation

ferishili
Copy link
Contributor

This PR fixes #873,

Description

there was no ordering when fetching list of course playlists except the one that only ordered the default playlist at the first position.

Solution

  • The FIlter class is used and is extended to have mkdate column (Playlist model uses mkdate instead of created) as accepted order parameter.
  • Upon fetching course playlist, only the filter for ordering "mkdate_asc" is passed, which does the job, and orders the list from old to new top to bottom.
  • The concept of putting default playlist is also converted into the code, simply by finding it in the array iteration, taking it out and then merge it at the first position.

To test

  • you would need to create multiple playlists in a course and add link some old ones from the workspace, then just check the ordering based on the old to new top->bottom

@ferishili ferishili added type:bug v:3 Everything related to the Stud.IP Opencast Plugin Version 3.x labels Jan 25, 2024
@ferishili ferishili requested a review from tgloeggl January 25, 2024 16:34
@ferishili ferishili self-assigned this Jan 25, 2024
@tgloeggl tgloeggl merged commit 0abffea into elan-ev:master Jan 29, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug v:3 Everything related to the Stud.IP Opencast Plugin Version 3.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Order of playlists in a course appears random
2 participants