Expand description

Controllers for requests starting with /api/v0/course-material/courses.

StructsΒ§

ChaptersWithStatus
CourseMaterialCourseModule
RequestInformation πŸ”’
UserMarketingConsentPayload

FunctionsΒ§

_add_routes
Add a route for each controller in this module.
collect_course_modules πŸ”’
Combines course modules and chapters, consuming them.
derive_information_from_requester πŸ”’
Used in get_course_page_by_path for path for anonymous visitor counts
feedback
POST /api/v0/course-material/courses/:course_id/feedback - Creates new feedback.
fetch_user_marketing_consent πŸ”’
GET /api/v0/course-material/courses/:course_id/fetch-user-marketing-consent
get_all_course_language_versions πŸ”’
GET /api/v0/course-material/courses/:id/language-versions - Returns all language versions of the same course. Since this is for course material, this does not include draft courses. To make developing new courses easier, we include draft courses if the course the request for is a draft course and the teacher has a permission to access it.
get_chapters πŸ”’
GET /api/v0/course-material/courses/:course_id/chapters - Returns a list of chapters in a course.
get_course πŸ”’
GET /api/v0/course-material/courses/:course_id - Get course.
get_course_instances πŸ”’
GET /api/v0/course-material/courses/:course_id/course-instances - Returns all course instances for given course id.
get_course_page_by_path πŸ”’
GET /:course_slug/page-by-path/... - Returns a course page by path
get_current_course_instance πŸ”’
GET /api/v0/course-material/courses/:course_id/current-instance - Returns the instance of a course for the current user, if there is one.
get_custom_privacy_policy_checkbox_texts πŸ”’
GET /courses/:course_id/custom-privacy-policy-checkbox-texts - Used to get customized checkbox texts for courses that use a different privacy policy than all our other courses (e.g. the Elements of AI course). These texts are shown in the course settings dialog.
get_material_references_by_course_id πŸ”’
get_page_by_course_id_and_language_group πŸ”’
GET `/api/v0/{course_id}/pages/by-language-group-id/{page_language_group_id} - Returns a page with the given course id and language group id.
get_partners_block πŸ”’
GET /courses/:course_id/partners_blocks - Gets a partners block related to a course
get_privacy_link πŸ”’
GET /courses/:course_id/privacy_link - Gets a privacy link related to a course
get_public_course_pages πŸ”’
GET /api/v0/course-material/courses/:course_id/pages - Returns a list of public pages on a course.
get_public_top_level_pages πŸ”’
GET /api/v0/course-material/courses/:course_id/top-level-pages
get_research_form_answers_with_user_id πŸ”’
GET /api/v0/course/courses/:course_id/research-consent-form-users-answers - Fetches users answers for courses research form.
get_research_form_questions_with_course_id πŸ”’
GET /api/v0/course-material/courses/:course_id/research-consent-form-questions - Fetches courses research form questions with course id.
get_research_form_with_course_id πŸ”’
GET /api/v0/course-material/courses/:course_id/research-consent-form - Fetches courses research form with course id.
get_student_countries πŸ”’
GET `/api/v0/{course_id}/course-instances/{course_instance_id}/student-countries - Returns countries of student registered in a course.
get_student_country πŸ”’
GET `/api/v0/{course_id}/student-country - Returns country of a student registered in a course.
get_user_course_settings πŸ”’
GET /api/v0/course-material/courses/:course_id/user-settings - Returns user settings for the current course.
glossary πŸ”’
propose_edit πŸ”’
POST /api/v0/course-material/courses/:course_slug/edit - Creates a new edit proposal.
search_pages_with_phrase πŸ”’
POST /api/v0/course-material/courses/:course_id/search-pages-with-phrase - Returns a list of pages given a search query.
search_pages_with_words πŸ”’
POST /api/v0/course-material/courses/:course_id/search-pages-with-words - Returns a list of pages given a search query.
student_country πŸ”’
POST /api/v0/{course_id}/course-instances/{course_instance_id}/student-countries/{country_code} - Add a new student’s country entry.
update_marketing_consent πŸ”’
POST /api/v0/course-material/courses/:course_id/user-marketing-consent - Adds or updates user’s marketing consent for a specific course.
upsert_course_research_form_answer πŸ”’
POST /api/v0/course-material/courses/:course_id/research-consent-form-questions-answer - Upserts users consent for a courses research form question.