Skip to main content

Module courses

Module courses 

Source
Expand description

Controllers for requests starting with /api/v0/main-frontend/courses.

ModulesΒ§

chatbots
Controllers for requests starting with /api/v0/main-frontend/{course_id}/chatbots.
stats
Controllers for requests starting with /api/v0/main-frontend/{course_id}/stats.
students
Controllers for requests starting with /api/v0/main-frontend/courses/{course_id}/students.

StructsΒ§

CopyCourseRequest
GetFeedbackQuery
GetSuspectedCheatersQuery
JoinCourseWithJoinCodePayload
MainFrontendCoursesApiDoc πŸ”’

EnumsΒ§

CopyCourseMode

FunctionsΒ§

_add_routes
Add a route for each controller in this module.
_new_term πŸ”’
add_media_for_course πŸ”’
POST /api/v0/main-frontend/courses/:course_id/upload - Uploads a media (image, audio, file) for the course from Gutenberg page edit.
add_user_to_course_with_join_code πŸ”’
POST /courses/:course_id/join-course-with-join-code - Adds the user to join_code_uses so the user gets access to the course
course_consent_form_answers_export
GET /api/v0/main-frontend/courses/${course.id}/export-course-user-consents
course_instances_export
GET /api/v0/main-frontend/courses/${course.id}/export-course-instances
create_course_copy
POST /api/v0/main-frontend/courses/:id/create-copy - Create a copy of a course with specified mode.
delete_course πŸ”’
DELETE /api/v0/main-frontend/courses/:course_id - Delete a course.
delete_material_reference_by_id πŸ”’
delete_partners_block πŸ”’
DELETE /api/v0/main-frontend/courses/:course_id - Delete a partners block in a course.
exercise_tasks_export
GET /api/v0/main-frontend/courses/${course.id}/export-exercise-tasks
get_all_course_language_versions πŸ”’
GET /api/v0/main-frontend/courses/:id/language-versions - Returns all language versions of the same course.
get_all_course_module_completions_for_user_by_course_id πŸ”’
GET /api/v0/main-frontend/courses/:course_id/course-module-completions/:user_id - Returns all course module completions for a given user for this course.
get_all_exercise_statuses_by_course_id πŸ”’
GET /api/v0/main-frontend/courses/:course_id/status-for-all-exercises/:user_id - Returns status for all exercises in the course for a given user.
get_all_exercises πŸ”’
GET /api/v0/main-frontend/courses/:id/exercises - Returns all exercises for the course.
get_all_exercises_and_count_of_answers_requiring_attention πŸ”’
GET /api/v0/main-frontend/courses/:id/exercises-and-count-of-answers-requiring-attention - Returns all exercises for the course and count of answers requiring attention in them.
get_all_suspected_cheaters πŸ”’
GET /api/v0/main-frontend/courses/${course.id}/suspected-cheaters?status=Flagged - returns the suspected cheaters in the given review state for a course.
get_all_thresholds πŸ”’
GET /api/v0/main-frontend/courses/${course.id}/thresholds - get all thresholds for all modules in a course.
get_course πŸ”’
GET /api/v0/main-frontend/courses/:course_id - Get course.
get_course_breadcrumb_info πŸ”’
GET /api/v0/main-frontend/courses/:course_id/breadcrumb-info - Get information to display breadcrumbs on the manage course pages.
get_course_default_peer_review πŸ”’
get_course_instances πŸ”’
GET /api/v0/main-frontend/courses/:id/course-instances - Returns all course instances for given course id.
get_course_structure πŸ”’
GET /api/v0/main-frontend/courses/:course_id/structure - Returns the structure of a course.
get_course_users_counts_by_exercise
GET /api/v0/main-frontend/courses/:id/course-users-counts-by-exercise - Returns the amount of users for each exercise.
get_course_with_join_code πŸ”’
GET /courses/join/:join_code - Gets the course related to join code
get_daily_submission_counts πŸ”’
GET /api/v0/main-frontend/courses/:id/daily-submission-counts - Returns submission counts grouped by day.
get_daily_user_counts_with_submissions πŸ”’
GET /api/v0/main-frontend/courses/:id/daily-users-who-have-submitted-something - Returns a count of users who have submitted something grouped by day.
get_feedback
GET /api/v0/main-frontend/courses/:id/feedback?read=true - Returns feedback for the given course.
get_feedback_count
GET /api/v0/main-frontend/courses/:id/feedback-count - Returns the amount of feedback for the given course.
get_flagged_suspected_cheaters_count πŸ”’
GET /api/v0/main-frontend/courses/${course.id}/suspected-cheaters/flagged-count - number of suspected cheaters awaiting review (status flagged). Used to show a review notification to teachers.
get_material_references_by_course_id πŸ”’
get_page_visit_datum_summary
GET /api/v0/main-frontend/courses/${course.id}/page-visit-datum-summary - Gets aggregated statistics for page visits for the course.
get_page_visit_datum_summary_by_countries
GET /api/v0/main-frontend/courses/${course.id}/page-visit-datum-summary-by-countries - Gets aggregated statistics for page visits for the course.
get_page_visit_datum_summary_by_device_types
GET /api/v0/main-frontend/courses/${course.id}/page-visit-datum-summary-by-device-types - Gets aggregated statistics for page visits for the course.
get_page_visit_datum_summary_by_pages
GET /api/v0/main-frontend/courses/${course.id}/page-visit-datum-summary-by-pages - Gets aggregated statistics for page visits for the course.
get_partners_block πŸ”’
GET /courses/:course_id/partners_blocks - Gets a partners block related to a course
get_submission_counts_by_exercise πŸ”’
GET /api/v0/main-frontend/courses/:id/submission-counts-by-exercise - Returns submission counts grouped by weekday and hour.
get_user_course_settings πŸ”’
GET /api/v0/main-frontend/courses/:course_id/user-settings/:user_id - Get current course settings for a specific user.
get_user_progress_for_course πŸ”’
GET /api/v0/main-frontend/courses/:course_id/progress/:user_id - Returns user progress for the course.
get_weekday_hour_submission_counts πŸ”’
GET /api/v0/main-frontend/courses/:id/weekday-hour-submission-counts - Returns submission counts grouped by weekday and hour.
glossary πŸ”’
insert_material_references πŸ”’
new_course_instance πŸ”’
POST /api/v0/main-frontend/courses/:id/new-course-instance
new_glossary_term πŸ”’
post_new_chapter_ordering
POST /api/v0/main-frontend/courses/:id/new-chapter-ordering - Reorders chapters based on modified chapter number.#
post_new_course πŸ”’
POST /api/v0/main-frontend/courses - Create a new course.
post_new_page_ordering
POST /api/v0/main-frontend/courses/:id/new-page-ordering - Reorders pages to the given order numbers and given chapters.
post_partners_block πŸ”’
POST /api/v0/main-frontend/courses/:course_id/partners_block - Create or updates a partners block for a course
post_reprocess_module_completions πŸ”’
POST /api/v0/main-frontend/courses/{course_id}/reprocess-completions
post_update_peer_review_queue_reviews_received πŸ”’
POST /api/v0/main-frontend/courses/${course_id}/update-peer-review-queue-reviews-received
set_join_code_for_course πŸ”’
POST /api/v0/main-frontend/courses/:course_id/generate-join-code - Generates a code that is used as a part of URL to join course
submission_export
GET /api/v0/main-frontend/courses/${courseId}/export-submissions
teacher_confirm_suspected_cheater πŸ”’
POST /api/v0/main-frontend/courses/${course.id}/suspected-cheaters/confirm/:user_id - confirms the student cheated (sets status to β€˜ConfirmedCheating’) and fails the student.
teacher_dismiss_suspected_cheater πŸ”’
POST /api/v0/main-frontend/courses/${course.id}/suspected-cheaters/dismiss/:user_id - dismisses the suspicion as a false alarm (sets status to β€˜Dismissed’).
teacher_reset_course_progress_for_everyone
DELETE /api/v0/main-frontend/courses/${course.id}/teacher-reset-course-progress-for-everyone - Can be used by teachers to reset the course progress for all students. Only works when the course is a draft and not published to students. Cannot be used to delete a course that some students have taken.
teacher_reset_course_progress_for_themselves
DELETE /api/v0/main-frontend/courses/${course.id}/teacher-reset-course-progress-for-themselves - Allows a teacher to reset the course progress for themselves. Cannot be used to reset the course for others.
update_course πŸ”’
POST /api/v0/main-frontend/courses/:course_id - Update course.
update_material_reference πŸ”’
update_modules
user_details_export
GET /api/v0/main-frontend/courses/${course.id}/export-user-details
user_exercise_states_export
GET /api/v0/main-frontend/courses/${course.id}/export-user-exercise-states