Currently, we're sorting exercises by difficulty level and then name. The website bins displayed difficulty levels as easy, medium, and heavy. I think these correspond to levels 1 - 3, 4 - 6, and 7 - 10. By sorting on the difficulty level, the exercises are out of order.
The student sees something like this:
Hello World (EASY)
Two Fer (EASY)
Clock (EASY)
Eliuds Eggs (EASY)
So I'm proposing a two-part solution. First we take the current levels, see which band they fall under, and then replace that level with the middle of the band. So all exercises levels 1, 2, or 3 become level 2. All exercises levels 4, 5, or 6 become 5. All exercises levels 7, 8, 9, or 10 become 8. That makes implementing exercises easier since you don't need to consider the difference between individual levels. It also lets us now sort the exercises more cleanly. We have a jq one liner floating around that can sort the exercises. That makes it a cinch to sort the exercises if they ever get out of order. At the moment a few of the level 5 exercises aren't in alphabetic order. Manually fixing that becomes easier with this approach.
My earlier example when sorted this way looks like this:
Hello World (EASY)
Clock (EASY)
Eliuds Eggs (EASY)
Two FER (EASY)
Currently, we're sorting exercises by difficulty level and then name. The website bins displayed difficulty levels as easy, medium, and heavy. I think these correspond to levels 1 - 3, 4 - 6, and 7 - 10. By sorting on the difficulty level, the exercises are out of order.
The student sees something like this:
Hello World (EASY) Two Fer (EASY) Clock (EASY) Eliuds Eggs (EASY)
So I'm proposing a two-part solution. First we take the current levels, see which band they fall under, and then replace that level with the middle of the band. So all exercises levels 1, 2, or 3 become level 2. All exercises levels 4, 5, or 6 become 5. All exercises levels 7, 8, 9, or 10 become 8. That makes implementing exercises easier since you don't need to consider the difference between individual levels. It also lets us now sort the exercises more cleanly. We have a jq one liner floating around that can sort the exercises. That makes it a cinch to sort the exercises if they ever get out of order. At the moment a few of the level 5 exercises aren't in alphabetic order. Manually fixing that becomes easier with this approach.
My earlier example when sorted this way looks like this: Hello World (EASY) Clock (EASY) Eliuds Eggs (EASY) Two FER (EASY)