Module courses

Source
Expand description

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

Modulesยง

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

Structsยง

CopyCourseRequest
GetFeedbackQuery
GetSuspectedCheatersQuery

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_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?archive=true - returns all suspected cheaters related to a course instance.
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_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_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 ๐Ÿ”’
insert_threshold ๐Ÿ”’
POST /api/v0/main-frontend/courses/${course.id}/threshold - post course threshold information.
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_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_approve_suspected_cheater ๐Ÿ”’
POST /api/v0/main-frontend/courses/${course.id}/suspected-cheaters/approve/:id - UPDATE is_archived to FALSE.
teacher_archive_suspected_cheater ๐Ÿ”’
POST /api/v0/main-frontend/courses/${course.id}/suspected-cheaters/archive/:id - UPDATE is_archived to TRUE.
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