Ordering is totally broken
JSmith-Aura opened this issue · comments
Environment:
- CTFd Version/Commit: 3.5.3
- Operating System: Docker/Linux
- Web Browser and Version: Chrome
What happened?
There is no way to order challenges, as per the documentation.
https://docs.ctfd.io/tutorials/challenges/sorting-challenges
What did you expect to happen?
I'd expect to be able to order my challenge categories. At the moment it appears the ordering criteria is largely arbitrary as I've tried both numbering and changing the insert order of my categories and it always ends up the same which is rather cooked.
How to reproduce your issue
Go to the themes page and see you cant define a ordering
Any associated stack traces or error logs
Considering that the categories are also ordered by points, this means if you have easy categories they'll always be at the bottom which is kind of counterintuitive And an awful experience for people.
I'm guessing you didn't actually read the help page that you linked?
Currently, custom sorting is best supported on our core-beta theme. To switch themes, check out this guide.
"Currently, custom sorting is best supported on our core-beta theme."
Does not imply "only works on this theme". Frankly I think the docs might need an update to make it clear what this is, and then the docker image that you guys provide might want to actually provide said theme.
3.5.2 and 3.5.3 were released awhile ago and 3.6.0 is due out very soon which includes core-beta in the Docker image. You have always been free to install code-beta on your own.
So the docs should read "if you want to do custom ordering, please install the core-beta theme as the default theme does not support this"
Sweet as, thanks.
There is a way to sort on the core theme but it's hard to do and not as easy as the core-beta theme so it's not mentioned. All in all just use core-beta.
Oh, what?
Is it by creating the same fields as the core-beta theme in the theme settings editor? As I did try that
So the docs are out of date
You can try to use the window.BETA_sortChallenges
function however it is not heavily used or tested.
https://github.com/CTFd/CTFd/blob/master/CTFd/themes/core/assets/js/pages/challenges.js#L285-L287
It is much easier to just use core-beta. Core is effectively deprecated.