-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Sort copy courses list to show own courses first #3277
Conversation
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.
In this implementation, it isn't really clear why some courses are sorted first. It would be clearer if the ones where the user is admin have an additional icon as is done in the general course listing:
I'm not sure about the way the sorting is done (do we already require will_paginate/array in other pages?). Is this done at the ruby side or using a query?
@bmesuere The query order/reorder does not support custom functions like Other option is using two or three separate select statements as in #3049 (but merge them instead of duplicating the listing code as @chvp suggested) |
Updated code
|
By using |
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.
Ok for me if it is for @chvp
We generally try to keep the PR start post up to date before merging so it reflects the state of what is being merged. This usually means updating the screenshots to the final version.
This pull request changes the order a user sees the course list when he wants to copy a course. Now their own courses are displayed first. Original order is kept as secondary ordering.
Closes #1661.
Closes #3049.