-
Notifications
You must be signed in to change notification settings - Fork 120
enhance: data pagination #50
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
base: development
Are you sure you want to change the base?
Conversation
first commit containing endpoints and DB changes new faeture
first commit containing endpoints and DB changes new faeture
- Implement methods in task_definition model for numbas data management - Implement routes in task_definition_api for numbas data managemnt - Remove unused upload API in numbas_api
Rubocop offenses are fixed as well
|
Code looks good, i tested it on my browsers, it works as its supposed to! |
…y, paginated and unpaginated
Thank you for the review, are you able to approve the changes done at this current state if you are happy with this review? @anmol-sainii |
XinHuang1112
left a comment
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.
Codes are very clear and I tested on my local machine. This really help boost webpage load times effectively.
aditya993388
left a comment
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.
I reviewed the backend functionality and observed that it handles key parameters such as page number, records per page, project ID, and limit efficiently. The offset is calculated as page - 1, which is appropriate for pagination. Overall, the backend functionality works well.
The target grade history is designed to return a maximum of 10 records per page, which helps in pagination. The backend sends correct data to the frontend. I did not find any errors in the code. I do approve this
|
Im not sure why my approval hadnt gone through earlier, just approved it again |
Make sure they are all deleted.
Also add missing TII doc details Add defaults there they are likely to be consistent.
New D2L Integration
|
LGTM. |
@aNebula This has been done: doubtfire-lms#455 :) Thank you! |
Description
Added Data Pagination
Now, instead of loading all the data histories at once, the backend just gives the data based on the webpage and a limited number or data. For example, If there are 30 records, and if the page 1 has 10 records, this will only give the 10 records in the backend with the total number of records (needed for page count).
When the user goes to page 2 for example, the next set of data will be loaded. This way, if there are 500 histories for example, everything will not be loaded at once.
This will help boost webpage load times
How Has This Been Tested?
Login as any user
Go to the dashboard (where all the target history is been shown)
Go to the inspect page in the browser.
Go to the Network tab, and see how the data is loaded every time when the user is navigated to a new page
Testing Checklist:
Checklist:
Front end - thoth-tech/doubtfire-web#270