Skip to main content

Module pages

Module pages 

Source
Expand description

Controllers for requests starting with /api/v0/cms/pages.

StructsΒ§

CmsPagesApiDoc πŸ”’

FunctionsΒ§

_add_routes
Add a route for each controller in this module.
get_exercises_with_submissions πŸ”’
POST /api/v0/cms/pages/:page_id/exercises-with-submissions - Given a set of exercise ids, returns the subset that has at least one existing submission. Used by the editor to warn the teacher before saving a page edit that would remove one of these exercises, since that soft-deletes it and orphans its submissions.
get_page πŸ”’
GET /api/v0/cms/pages/:page_id - Get a page with exercises and exercise tasks by id.
get_page_info πŸ”’
GET /api/v0/cms/pages/:page_id/info - Get a pages’s course id, course name, organization slug
get_page_navigation πŸ”’
GET /api/v0/cms/pages/:page_id/page-navigation - tells what’s the next page, previous page, and the chapter front page given a page id.
update_page πŸ”’
PUT /api/v0/cms/pages/:page_id - Update a page by id.