Skip to content
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

Heavy course validation on front-end #2487

Closed
canstudios-nicolaw opened this issue Jan 8, 2020 · 0 comments
Closed

Heavy course validation on front-end #2487

canstudios-nicolaw opened this issue Jan 8, 2020 · 0 comments
Assignees
Labels

Comments

@canstudios-nicolaw
Copy link
Contributor

canstudios-nicolaw commented Jan 8, 2020

On every preview/export/download, the front-end is running a function called validateCourseContent. This function is looping through all pages/articles/blocks/components in a course to ensure that they all have children, each item is fetched from the back-end individually. This is inefficient as it can generate hundreds of requests and cause long delays (8+ seconds) on larger courses.

Remove the validateCourseContent function and replace it with back-end validation that happens as part of preview/export/publish. The user should still get an error modal with the same information if the course is invalid, but this should be a more efficient approach as we will have access to the db.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants