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

Load course syllabus and lesson content on-demand #300

Closed
10 tasks
egillespie opened this issue Dec 21, 2020 · 1 comment
Closed
10 tasks

Load course syllabus and lesson content on-demand #300

egillespie opened this issue Dec 21, 2020 · 1 comment

Comments

@egillespie
Copy link
Collaborator

When a person signs into Code Lab, all available courses and lessons are downloaded, including large text fields such as the course syllabus and lesson content. These large fields have no use until the person visits a page where the information is rendered, but it does take a noticeable amount of time to download all of the data.

Sign-in performance can be improved by loading the course syllabus and lesson content on-demand. This will also be a step in the direction of externalizing the lesson content to a git repository (#282).

Course syllabus steps:

  • Add API route /courses/:id/syllabus that returns the text/plain syllabus data
  • Add Vuex action to the Course store that downloads course syllabus if it's missing
  • Call new Course store action in beforeEnter of any /courses/:courseKey/** route
  • Remove syllabus from the Course API model
  • Create E2E test to ensure that on-demand loading of course syllabus works

Lesson content steps:

  • Add API route /lessons/:id/content that returns the text/plain content data
  • Add Vuex action to the Lesson store that downloads lesson content if it's missing
  • Call new Lesson store action in beforeEnter of any /lessons/:lessonKey/** route
  • Remove content from the Lesson API model
  • Create E2E test to ensure that on-demand loading of lesson content works
@egillespie
Copy link
Collaborator Author

Almost everything here is completed in error. The only part of this feature that isn't implemented are the text/plain routes for course syllabus and lesson content, but after thinking it through, text/plain would not help API consumers know which version of a course's syllabus (or lesson's content) they are working with.

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

No branches or pull requests

1 participant