We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is the object normal users got from homework query
{ "end": 1710604800, "id": "65e2e099e55a6f38e62ee9e4", "markdown": "Homework #0.5 供同學測試使用,沒有計分,亦不佔用金牌。\n\nIf there is any question, please let us know.\n\nEmail: [[email protected]](mailto:[email protected])", "name": "HW #0.5", "problemIds": [ 562 ], "start": 1709395200, "studentStatus": { "562": { "problemStatus": null, "score": 0, "submissionIds": [] } } }
And this is what admins got
{ "end": 1710604800, "id": "65e2e099e55a6f38e62ee9e4", "markdown": "Homework #0.5 供同學測試使用,沒有計分,亦不佔用金牌。\n\nIf there is any question, please let us know.\n\nEmail: [[email protected]](mailto:[email protected])", "name": "HW #0.5", "problemIds": [ 562 ], "start": 1709395200, "studentStatus": { "40711016e": { "562": { "problemStatus": null, "score": 0, "submissionIds": [] } }, "40747008s": { "562": { "problemStatus": null, "score": 0, "submissionIds": [] } }, // and so on...... } }
Currently frontend for homework is using the admin structure for data displaying, which breaks score displaying for normal users.
I prefer user using the same structure for both roles. We should change the structure for normal user into
{ "end": 1710604800, "id": "65e2e099e55a6f38e62ee9e4", "markdown": "Homework #0.5 供同學測試使用,沒有計分,亦不佔用金牌。\n\nIf there is any question, please let us know.\n\nEmail: [[email protected]](mailto:[email protected])", "name": "HW #0.5", "problemIds": [ 562 ], "start": 1709395200, "studentStatus": { "STUDENT_ACCOUNT": { "562": { "problemStatus": null, "score": 0, "submissionIds": [] } } } }
By nesting the problems status into their relative username, we could have normal users and admins sharing the same structure for homework object.
Back-End/model/homework.py
Lines 123 to 129 in b82175a
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is the object normal users got from homework query
And this is what admins got
Currently frontend for homework is using the admin structure for data displaying, which breaks score displaying for normal users.
Proposed solution
I prefer user using the same structure for both roles.
We should change the structure for normal user into
By nesting the problems status into their relative username, we could have normal users and admins sharing the same structure for homework object.
Related code
Back-End/model/homework.py
Lines 123 to 129 in b82175a
The text was updated successfully, but these errors were encountered: