-
Notifications
You must be signed in to change notification settings - Fork 109
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
String PID support #511
Closed
Closed
String PID support #511
Changes from 6 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
862c1cb
String PID support
f0e4a9e
Fix templates
70f5475
Add a space
undefined-moe 8434471
contest
undefined-moe 46a5ad0
Remove lowercase PID support as it will cause an error for /contest/{…
undefined-moe e554066
Fix template
undefined-moe 37137fd
Fix support for _id
undefined-moe 57d5312
Allow users add String PID problems.
undefined-moe ac2af5b
Add validator
undefined-moe 89aecbc
Change limit to 24
undefined-moe 5b8e8a2
Update translation
undefined-moe 9cefd5f
Add lowercase support
undefined-moe 052ca0f
-
undefined-moe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why not allowing lowercase letters and maybe other characters?
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.
It creates conflict.
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.
What conflict? Can you explain more?
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.
not this route
my fault.
this one.
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.
Emmm. Then I think we should not simply support string PIDs without changing the URL scheme. I think depending on URL case sensitivity is not a good idea.
By the way, it would be better to text instead of screenshot for code snippets. It is more friendly for more types of browsers/screen readers. For example:
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.
Some user may just collected a URL in his browser.
Changing the URL scheme will make then confused as it throws 404 error.
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.
Of course we should change the URL in a backward compatible way, and preferably still generate the same URL for numeric/objectid PIDs. This can be achieved by making multiple routes to point to the same handler.
One proposal is to use (optional) named parameter in URL. For example:
/homework/tid=xxx/pid=xxx/scoreboard
. We can also use query strings.What do you think?
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.
Scoreboard for each problem?
so weird...
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.
My bad. The example should be
/homework/tid=xxx/pid=xxx/submit
. It is just an example.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.
the submit handler can work properly.
but handlers like 'homework_edit' 'homework_scoreboard' will be handled by 'homework_problem' handler if we enables lowercase pid.