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
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
FIlter
class is used and is extended to havemkdate
column (Playlist
model usesmkdate
instead ofcreated
) as accepted order parameter.To test