Leading 0 in group number
In URLs, group numbers < 10 do not have a leading 0, e.g. https://xdat09.ce.chalmers.se/2016/lp3/afp/admin/labs/1/submissions/group6
.
When downloading all submissions, folders in the archive for these groups do contain a leading 0, e.g. group06
. It is unimportant, but it would be nice these two things matched.
Comments (9)
-
-
reporter The awkward sorting is mildly inconvenient, but I don't like the idea of fixing an arbitrary upper limit on the number of groups (9, 99, 999...). So my vote is that we get rid of the leading zeros everywhere.
-
What is the problem with having different strings? do you use a script that needs to link a group to the URL?
-
reporter No I don't use a script, it's just that I often type both the URLs and the file paths manually, and I always need to remember when to include a leading 0 or not.
-
You can add a 0 to the URL if you want, it shouldn't matter. I.e. the following are equivalent:
-
reporter Ok it's nice that the URLs are flexible. But then what about the downloaded archives? Is the number of leading zeros decided based on the total number of groups? Or is it always 1?
-
I think right now it is at most one, meaning you'll get
group03
group33
butgroup333
. I agree that it would be nicer if it was a function of the max. group number. -
- changed component to group
-
- changed component to groups
- Log in to comment
So the question is: how many leading zeroes should the group number have? Some courses have less than 10 groups, others may have more than a 100 (e.g. 202 students in pairs). And, even if the total number of groups varies during the existence of the course, we do not want URLs to suddenly become invalid.
On the other hand, if we remove the leading zeroes in the folder names, they will be sorted awkwardly by some file browsers (i.e. group1, group 10, group, 11, group2, group20, …).
Do you have a specific solution in mind?