Course

class canvasapi.course.Course(requester, attributes)
Parameters:
  • requester (canvasapi.requester.Requester) – The requester to pass HTTP requests through.
  • attributes (dict) – The JSON object to build this object with.
add_grading_standards(title, grading_scheme_entry, **kwargs)

Create a new grading standard for the course.

Calls:

POST /api/v1/courses/:course_id/grading_standards

Parameters:
  • title (str) – The title for the Grading Standard
  • grading_scheme (list of dict) – A list of dictionaries containing keys for “name” and “value”
Return type:

canvasapi.grading_standards.GradingStandard

column_data_bulk_update(column_data, **kwargs)

Set the content of custom columns.

Calls:PUT /api/v1/courses/:course_id/custom_gradebook_column_data
Parameters:column_data (list) – Content to put into the column
Return type:canvasapi.progress.Progress
conclude(**kwargs)

Mark this course as concluded.

Calls:DELETE /api/v1/courses/:id
Returns:True if the course was concluded, False otherwise.
Return type:bool
create_assignment(assignment, **kwargs)

Create a new assignment for this course.

Note: The assignment is created in the active state.

Calls:POST /api/v1/courses/:course_id/assignments
Parameters:assignment (dict) – The attributes of the assignment
Return type:canvasapi.assignment.Assignment
create_assignment_group(**kwargs)

Create a new assignment group for this course.

Calls:POST /api/v1/courses/:course_id/assignment_groups
Return type:canvasapi.assignment.AssignmentGroup
create_assignment_overrides(assignment_overrides, **kwargs)

Create the specified overrides for each assignment.

Calls:POST /api/v1/courses/:course_id/assignments/overrides
Parameters:assignment_overrides (list) – Attributes for the new assignment overrides.
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.assignment.AssignmentOverride
create_content_migration(migration_type, **kwargs)

Create a content migration.

Calls:POST /api/v1/courses/:course_id/content_migrations
Parameters:migration_type (str or canvasapi.content_migration.Migrator) – The migrator type to use in this migration
Return type:canvasapi.content_migration.ContentMigration
create_course_section(**kwargs)

Create a new section for this course.

Calls:POST /api/v1/courses/:course_id/sections
Return type:canvasapi.course.Section
create_custom_column(column, **kwargs)

Create a custom gradebook column.

Calls:POST /api/v1/courses/:course_id/custom_gradebook_columns
Parameters:column (dict) – A dictionary representing the Custom Gradebook Column to create
Return type:canvasapi.custom_gradebook_columns.CustomGradebookColumn
create_discussion_topic(**kwargs)

Creates a new discussion topic for the course or group.

Calls:POST /api/v1/courses/:course_id/discussion_topics
Return type:canvasapi.discussion_topic.DiscussionTopic
create_epub_export(**kwargs)

Create an ePub export for a course.

Calls:POST /api/v1/courses/:course_id/epub_exports/:id
Return type:canvasapi.course_epub_export.CourseEpubExport
create_external_feed(url, **kwargs)

Create a new external feed for the course.

Calls:POST /api/v1/courses/:course_id/external_feeds
Parameters:url (str) – The url of the external rss or atom feed
Return type:canvasapi.external_feed.ExternalFeed
create_external_tool(**kwargs)

Create an external tool in the current course.

Calls:POST /api/v1/courses/:course_id/external_tools
Parameters:name (str) – The name of the tool
Return type:canvasapi.external_tool.ExternalTool
create_folder(name, **kwargs)

Creates a folder in this course.

Calls:POST /api/v1/courses/:course_id/folders
Parameters:name (str) – The name of the folder.
Return type:canvasapi.folder.Folder
create_group_category(name, **kwargs)

Create a group category.

Calls:POST /api/v1/courses/:course_id/group_categories
Parameters:name (str) – Name of the category.
Return type:canvasapi.group.GroupCategory
create_late_policy(**kwargs)

Create a late policy. If the course already has a late policy, a bad_request is returned since there can only be one late policy per course.

Calls:POST /api/v1/courses/:id/late_policy
Return type:canvasapi.course.LatePolicy
create_module(module, **kwargs)

Create a new module.

Calls:POST /api/v1/courses/:course_id/modules
Parameters:module (dict) – The attributes for the module.
Returns:The created module.
Return type:canvasapi.module.Module
create_page(wiki_page, **kwargs)

Create a new wiki page.

Calls:POST /api/v1/courses/:course_id/pages
Parameters:wiki_page (dict) – The title for the page.
Returns:The created page.
Return type:canvasapi.page.Page
create_quiz(quiz, **kwargs)

Create a new quiz in this course.

Calls:POST /api/v1/courses/:course_id/quizzes
Parameters:quiz (dict) – The attributes for the quiz.
Return type:canvasapi.quiz.Quiz
create_rubric(**kwargs)

Create a new rubric.

Calls:POST /api/v1/courses/:course_id/rubrics
Returns:Returns a dictionary with rubric and rubric association.
Return type:dict
create_rubric_association(**kwargs)

Create a new RubricAssociation.

Calls:POST /api/v1/courses/:course_id/rubric_associations
Returns:Returns a RubricAssociation.
Return type:canvasapi.rubric.RubricAssociation
delete(**kwargs)

Permanently delete this course.

Calls:DELETE /api/v1/courses/:id
Returns:True if the course was deleted, False otherwise.
Return type:bool
delete_external_feed(feed, **kwargs)

Deletes the external feed.

Calls:DELETE /api/v1/courses/:course_id/external_feeds/:external_feed_id
Parameters:feed (canvasapi.external_feed.ExternalFeed or int) – The object or ID of the feed to be deleted.
Return type:canvasapi.external_feed.ExternalFeed
edit_front_page(**kwargs)

Update the title or contents of the front page.

Calls:PUT /api/v1/courses/:course_id/front_page
Return type:canvasapi.course.Course
edit_late_policy(**kwargs)

Patch a late policy. No body is returned upon success.

Calls:PATCH /api/v1/courses/:id/late_policy
Returns:True if Late Policy was updated successfully. False otherwise.
Return type:bool
enroll_user(user, enrollment_type=None, **kwargs)

Create a new user enrollment for a course or a section.

Calls:

POST /api/v1/courses/:course_id/enrollments

Parameters:
  • user (canvasapi.user.User or int) – The object or ID of the user to enroll in this course.
  • enrollment_type (str, optional) – The type of enrollment.
Return type:

canvasapi.enrollment.Enrollment

export_content(export_type, **kwargs)

Begin a content export job for a course.

Calls:POST /api/v1/courses/:course_id/content_exports
Parameters:export_type (str) – The type of content to export.
Return type:canvasapi.content_export.ContentExport

Get all outcome links for context - BETA

Calls:GET /api/v1/courses/:course_id/outcome_group_links
Returns:Paginated List of OutcomesLinks in the context.
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.outcome.OutcomeLink
get_assignment(assignment, **kwargs)

Return the assignment with the given ID.

Calls:GET /api/v1/courses/:course_id/assignments/:id
Parameters:assignment (canvasapi.assignment.Assignment or int) – The object or ID of the assignment to retrieve.
Return type:canvasapi.assignment.Assignment
get_assignment_group(assignment_group, **kwargs)

Retrieve specified assignment group for the specified course.

Calls:GET /api/v1/courses/:course_id/assignment_groups/:assignment_group_id
Parameters:assignment_group (canvasapi.assignment.AssignmentGroup or int) – object or ID of assignment group.
Return type:canvasapi.assignment.AssignmentGroup
get_assignment_groups(**kwargs)

List assignment groups for the specified course.

Calls:GET /api/v1/courses/:course_id/assignment_groups
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.assignment.AssignmentGroup
get_assignment_overrides(assignment_overrides, **kwargs)
List the specified overrides in this course, providing they target
sections/groups/students visible to the current user.
Calls:GET /api/v1/courses/:course_id/assignments/overrides
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.assignment.AssignmentOverride
get_assignments(**kwargs)

List all of the assignments in this course.

Calls:GET /api/v1/courses/:course_id/assignments
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.assignment.Assignment
get_assignments_for_group(assignment_group, **kwargs)

Returns a paginated list of assignments for the given assignment group

Calls:GET /api/v1/courses/:course_id/assignment_groups/:assignment_group_id/assignments
Parameters:assignment_group – The object or id of the assignment group
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.assignment.Assignment
get_blueprint(template='default', **kwargs)

Return the blueprint of a given ID.

Calls:GET /api/v1/courses/:course_id/blueprint_templates/:template_id
Parameters:template (int or canvasapi.blueprint.BlueprintTemplate) – The object or ID of the blueprint template to get.
Return type:canvasapi.blueprint.BlueprintTemplate
get_collaborations(**kwargs)

Return a list of collaborations for a given course ID.

Calls:GET /api/v1/courses/:course_id/collaborations
Return type:canvasapi.collaboration.Collaboration
get_content_export(content_export, **kwargs)

Return information about a single content export.

Calls:GET /api/v1/courses/:course_id/content_exports/:id
Parameters:content_export (int or canvasapi.content_export.ContentExport) – The object or ID of the content export to show.
Return type:canvasapi.content_export.ContentExport
get_content_exports(**kwargs)

Return a paginated list of the past and pending content export jobs for a course.

Calls:GET /api/v1/courses/:course_id/content_exports
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.content_export.ContentExport
get_content_migration(content_migration, **kwargs)

Retrive a content migration by its ID

Calls:GET /api/v1/courses/:course_id/content_migrations/:id
Parameters:content_migration (int, str or canvasapi.content_migration.ContentMigration) – The object or ID of the content migration to retrieve.
Return type:canvasapi.content_migration.ContentMigration
get_content_migrations(**kwargs)

List content migrations that the current account can view or manage.

Calls:GET /api/v1/courses/:course_id/content_migrations/
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.content_migration.ContentMigration
get_course_level_assignment_data(**kwargs)

Return a list of assignments for the course sorted by due date

Calls:GET /api/v1/courses/:course_id/analytics/assignments
Return type:dict
get_course_level_participation_data(**kwargs)

Return page view hits and participation numbers grouped by day through the course’s history

Calls:GET /api/v1/courses/:course_id/analytics/activity
Return type:dict
get_course_level_student_summary_data(**kwargs)

Return a summary of per-user access information for all students in a course

Calls:GET /api/v1/courses/:course_id/analytics/student_summaries
Return type:dict
get_custom_columns(**kwargs)

List of all the custom gradebook columns for a course.

Calls:GET /api/v1/courses/:course_id/custom_gradebook_columns
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.custom_gradebook_columns.CustomGradebookColumn
get_discussion_topic(topic, **kwargs)

Return data on an individual discussion topic.

Calls:GET /api/v1/courses/:course_id/discussion_topics/:topic_id
Parameters:topic (canvasapi.discussion_topic.DiscussionTopic or int) – The object or ID of the discussion topic.
Return type:canvasapi.discussion_topic.DiscussionTopic
get_discussion_topics(**kwargs)

Returns the paginated list of discussion topics for this course or group.

Calls:GET /api/v1/courses/:course_id/discussion_topics
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.discussion_topic.DiscussionTopic
get_enabled_features(**kwargs)

Lists all enabled features in a course.

Calls:GET /api/v1/courses/:course_id/features/enabled
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.feature.Feature
get_enrollments(**kwargs)

List all of the enrollments in this course.

Calls:GET /api/v1/courses/:course_id/enrollments
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.enrollment.Enrollment
get_epub_export(epub, **kwargs)

Get information about a single epub export.

Calls:GET /api/v1/courses/:course_id/epub_exports/:id
Parameters:epub (int or canvasapi.course_epub_export.CourseEpubExport) – Object or ID of ePub Export
Return type:canvasapi.course_epub_export.CourseEpubExport
get_external_feeds(**kwargs)

Returns the list of External Feeds this course.

Calls:GET /api/v1/courses/:course_id/external_feeds
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.external_feed.ExternalFeed
get_external_tool(tool, **kwargs)
Calls:GET /api/v1/courses/:course_id/external_tools/:external_tool_id
Parameters:tool (canvasapi.external_tool.ExternalTool or int) – The object or ID of the tool to retrieve.
Return type:canvasapi.external_tool.ExternalTool
get_external_tools(**kwargs)
Calls:GET /api/v1/courses/:course_id/external_tools
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.external_tool.ExternalTool
get_feature_flag(feature, **kwargs)

Return the feature flag that applies to given course.

Calls:GET /api/v1/courses/:course_id/features/flags/:feature
Parameters:feature (canvasapi.feature.Feature or str) – The feature object or name of the feature to retrieve.
Return type:canvasapi.feature.FeatureFlag
get_features(**kwargs)

Lists all features of a course.

Calls:GET /api/v1/courses/:course_id/features
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.feature.Feature
get_file(file, **kwargs)

Return the standard attachment json object for a file.

Calls:GET /api/v1/courses/:course_id/files/:id
Parameters:file (canvasapi.file.File or int) – The object or ID of the file to retrieve.
Return type:canvasapi.file.File
get_file_quota(**kwargs)

Returns the total and used storage quota for the course.

Calls:GET /api/v1/courses/:course_id/files/quota
Return type:dict
get_files(**kwargs)

Returns the paginated list of files for the course.

Calls:GET /api/v1/courses/:course_id/files
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.file.File
get_folder(folder, **kwargs)

Returns the details for a course folder

Calls:GET /api/v1/courses/:course_id/folders/:id
Parameters:folder (canvasapi.folder.Folder or int) – The object or ID of the folder to retrieve.
Return type:canvasapi.folder.Folder
get_folders(**kwargs)

Returns the paginated list of all folders for the given course. This will be returned as a flat list containing all subfolders as well.

Calls:GET /api/v1/courses/:course_id/folders
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.folder.Folder
get_full_discussion_topic(topic, **kwargs)

Return a cached structure of the discussion topic.

Calls:GET /api/v1/courses/:course_id/discussion_topics/:topic_id/view
Parameters:topic (canvasapi.discussion_topic.DiscussionTopic or int) – The object or ID of the discussion topic.
Return type:dict
get_gradebook_history_dates(**kwargs)

Returns a map of dates to grader/assignment groups

Calls:GET /api/v1/courses/:course_id/gradebook_history/days
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.grading_history.Day
get_gradebook_history_details(date, **kwargs)

Returns the graders who worked on this day, along with the assignments they worked on. More details can be obtained by selecting a grader and assignment and calling the ‘submissions’ api endpoint for a given date.

Calls:GET /api/v1/courses/:course_id/gradebook_history/:date
Parameters:date (int) – The date for which you would like to see detailed information.
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.gradebook_history.Grader
get_grading_period(grading_period, **kwargs)

Return a single grading period for the associated course and id.

Calls:GET /api/v1/courses/:course_id/grading_periods/:id
Parameters:grading_period_id (int) – The ID of the rubric.
Return type:canvasapi.grading_period.GradingPeriod
get_grading_periods(**kwargs)

Return a list of grading periods for the associated course.

Calls:GET /api/v1/courses/:course_id/grading_periods
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.grading_period.GradingPeriod
get_grading_standards(**kwargs)

Get a PaginatedList of the grading standards available for the course

Calls:GET /api/v1/courses/:course_id/grading_standards
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.grading_standards.GradingStandard
get_group_categories(**kwargs)

List group categories for a context.

Calls:GET /api/v1/courses/:course_id/group_categories
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.group.GroupCategory
get_groups(**kwargs)

Return list of active groups for the specified course.

Calls:GET /api/v1/courses/:course_id/groups
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.course.Course
get_late_policy(**kwargs)

Returns the late policy for a course.

Calls:GET /api/v1/courses/:id/late_policy
Return type:canvasapi.course.LatePolicy
get_licenses(**kwargs)

Returns a paginated list of the licenses that can be applied to the files under the course scope

Calls:GET /api/v1/course/:course_id/content_licenses
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.license.License
get_migration_systems(**kwargs)

Return a list of migration systems.

Calls:GET /api/v1/courses/:course_id/content_migrations/migrators
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.content_migration.Migrator
get_module(module, **kwargs)

Retrieve a single module by ID.

Calls:GET /api/v1/courses/:course_id/modules/:id
Parameters:module (canvasapi.module.Module or int) – The object or ID of the module to retrieve.
Return type:canvasapi.module.Module
get_modules(**kwargs)

Return a list of modules in this course.

Calls:GET /api/v1/courses/:course_id/modules
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.module.Module
get_multiple_submissions(**kwargs)

List submissions for multiple assignments. Get all existing submissions for a given set of students and assignments.

Calls:GET /api/v1/courses/:course_id/students/submissions
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.submission.Submission
get_outcome_group(group, **kwargs)

Returns the details of the Outcome Group with the given id.

Calls:GET /api/v1/courses/:course_id/outcome_groups/:id
Parameters:group (canvasapi.outcome.OutcomeGroup or int) – The outcome group object or ID to return.
Returns:An outcome group object.
Return type:canvasapi.outcome.OutcomeGroup
get_outcome_groups_in_context(**kwargs)

Get all outcome groups for context - BETA

Calls:GET /api/v1/courses/:course_id/outcome_groups
Returns:Paginated List of OutcomesGroups in the context.
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.outcome.OutcomeGroups
get_outcome_import_status(outcome_import, **kwargs)

Get the status of an already created Outcome import. Pass ‘latest’ for the outcome import id for the latest import.

Calls:GET /api/v1/courses/:course_id/outcome_imports/:id
Parameters:outcome_import (canvasapi.outcome_import.OutcomeImport, int, or string: “latest”) – The outcome import object or ID to get the status of.
Return type:canvasapi.outcome_import.OutcomeImport
get_outcome_result_rollups(**kwargs)

Get all outcome result rollups for context - BETA

Calls:GET /api/v1/courses/:course_id/outcome_rollups
Returns:List of outcome result rollups in the context.
Return type:dict
get_outcome_results(**kwargs)

Get all outcome results for context - BETA

Calls:GET /api/v1/courses/:course_id/outcome_results
Returns:List of potential related outcome result dicts.
Return type:dict
get_page(url, **kwargs)

Retrieve the contents of a wiki page.

Calls:GET /api/v1/courses/:course_id/pages/:url
Parameters:url (str) – The url for the page.
Returns:The specified page.
Return type:canvasapi.page.Page
get_pages(**kwargs)

List the wiki pages associated with a course.

Calls:GET /api/v1/courses/:course_id/pages
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.page.Page
get_quiz(quiz, **kwargs)

Return the quiz with the given id.

Calls:GET /api/v1/courses/:course_id/quizzes/:id
Parameters:quiz (canvasapi.quiz.Quiz or int) – The object or ID of the quiz to retrieve.
Return type:canvasapi.quiz.Quiz
get_quiz_overrides(**kwargs)

Retrieve the actual due-at, unlock-at, and available-at dates for quizzes based on the assignment overrides active for the current API user.

Calls:GET /api/v1/courses/:course_id/quizzes/assignment_overrides
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.quiz.QuizAssignmentOverrideSet
get_quizzes(**kwargs)

Return a list of quizzes belonging to this course.

Calls:GET /api/v1/courses/:course_id/quizzes
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.quiz.Quiz
get_recent_students(**kwargs)

Return a list of students in the course ordered by how recently they have logged in.

Calls:GET /api/v1/courses/:course_id/recent_students
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.user.User
get_root_outcome_group(**kwargs)

Redirect to root outcome group for context

Calls:GET /api/v1/courses/:course_id/root_outcome_group
Returns:The OutcomeGroup of the context.
Return type:canvasapi.outcome.OutcomeGroup
get_rubric(rubric_id, **kwargs)

Get a single rubric, based on rubric id.

Calls:GET /api/v1/courses/:course_id/rubrics/:id
Parameters:rubric_id (int) – The ID of the rubric.
Return type:canvasapi.rubric.Rubric
get_rubrics(**kwargs)

Get the paginated list of active rubrics for the current course.

Calls:GET /api/v1/courses/:course_id/rubrics
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.rubric.Rubric
get_section(section, **kwargs)

Retrieve a section.

Calls:GET /api/v1/courses/:course_id/sections/:id
Parameters:section (canvasapi.section.Section or int) – The object or ID of the section to retrieve.
Return type:canvasapi.section.Section
get_sections(**kwargs)

List all sections in a course.

Calls:GET /api/v1/courses/:course_id/sections
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.section.Section
get_settings(**kwargs)

Returns this course’s settings.

Calls:GET /api/v1/courses/:course_id/settings
Return type:dict
get_single_grading_standard(grading_standard_id, **kwargs)

Get a single grading standard from the course.

Calls:GET /api/v1/courses/:course_id/grading_standards/:grading_standard_id
Parameters:grading_standard_id (int) – The grading standard id
Return type:canvasapi.grading_standards.GradingStandard
get_submission_history(date, grader_id, assignment_id, **kwargs)

Gives a nested list of submission versions.

Calls:

GET /api/v1/courses/:course_id/gradebook_history/:date/graders /:grader_id/assignments/:assignment_id/submissions

Parameters:
  • date – The date for which you would like to see submissions
  • grader_id (int) – The ID of the grader for which you want to see submissions.
  • assignment_id (int) – The ID of the assignment for which you want to see submissions
Return type:

canvasapi.paginated_list.PaginatedList of canvasapi.gradebook_history.SubmissionHistory

get_tabs(**kwargs)

List available tabs for a course. Returns a list of navigation tabs available in the current context.

Calls:GET /api/v1/courses/:course_id/tabs
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.tab.Tab
get_todo_items(**kwargs)

Returns the current user’s course-specific todo items.

Calls:GET /api/v1/courses/:course_id/todo
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.todo.Todo
get_uncollated_submissions(**kwargs)

Gives a paginated, uncollated list of submission versions for all matching submissions in the context. This SubmissionVersion objects will not include the new_grade or previous_grade keys, only the grade; same for graded_at and grader.

Calls:GET /api/v1/courses/:course_id/gradebook_history/feed
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.gradebook_history.SubmissionVersion
get_user(user, user_id_type=None, **kwargs)

Retrieve a user by their ID. user_id_type denotes which endpoint to try as there are several different ids that can pull the same user record from Canvas.

Calls:

GET /api/v1/courses/:course_id/users/:id

Parameters:
  • user (canvasapi.user.User or int) – The object or ID of the user to retrieve.
  • user_id_type (str) – The type of the ID to search for.
Return type:

canvasapi.user.User

get_user_in_a_course_level_assignment_data(user, **kwargs)

Return a list of assignments for the course sorted by due date

Calls:GET /api/v1/courses/:course_id/analytics/users/:student_id/assignments
Parameters:user (canvasapi.user.User or int) – The object or ID of the related user
Return type:dict
get_user_in_a_course_level_messaging_data(user, **kwargs)

Return messaging hits grouped by day through the entire history of the course

Calls:GET /api/v1/courses/:course_id/analytics/users/:student_id/communication
Parameters:user (canvasapi.user.User or int) – The object or ID of the related user
Return type:dict
get_user_in_a_course_level_participation_data(user, **kwargs)

Return page view hits grouped by hour and participation details through course’s history

Calls:GET /api/v1/courses/:course_id/analytics/users/:student_id/activity
Parameters:user (canvasapi.user.User or int) – The object or ID of the related user
Return type:dict
get_users(**kwargs)

List all users in a course.

Calls:GET /api/v1/courses/:course_id/search_users
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.user.User
import_outcome(attachment, **kwargs)

Import outcome into canvas.

Calls:POST /api/v1/courses/:course_id/outcome_imports
Parameters:attachment (file or str) – A file handler or path of the file to import.
Return type:canvasapi.outcome_import.OutcomeImport
list_blueprint_subscriptions(**kwargs)

Return a list of blueprint subscriptions for the given course.

Calls:GET /api/v1/courses/:course_id/blueprint_subscriptions
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.blueprint.BlueprintSubscription
preview_html(html, **kwargs)

Preview HTML content processed for this course.

Calls:POST /api/v1/courses/:course_id/preview_html
Parameters:html (str) – The HTML code to preview.
Return type:str
remove_usage_rights(**kwargs)

Removes the usage rights for specified files that are under the current course scope

Calls:DELETE /api/v1/courses/:course_id/usage_rights
Return type:dict
reorder_pinned_topics(order, **kwargs)

Puts the pinned discussion topics in the specified order. All pinned topics should be included.

Calls:POST /api/v1/courses/:course_id/discussion_topics/reorder
Parameters:order (string or iterable sequence of values) – The ids of the pinned discussion topics in the desired order. e.g. [104, 102, 103], (104, 102, 103), or “104,102,103”
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.discussion_topic.DiscussionTopic
reset(**kwargs)

Delete the current course and create a new equivalent course with no content, but all sections and users moved over.

Calls:POST /api/v1/courses/:course_id/reset_content
Return type:canvasapi.course.Course
resolve_path(full_path=None, **kwargs)

Returns the paginated list of all of the folders in the given path starting at the course root folder. Returns root folder if called with no arguments.

Calls:GET /api/v1/courses/:course_id/folders/by_path/*full_path
Parameters:full_path (string) – Full path to resolve, relative to course root.
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.folder.Folder
set_quiz_extensions(quiz_extensions, **kwargs)

Set extensions for student all quiz submissions in a course.

Calls:POST /api/v1/courses/:course_id/quizzes/:quiz_id/extensions
Parameters:quiz_extensions (list) – List of dictionaries representing extensions.
Return type:list of canvasapi.quiz.QuizExtension

Example Usage:

>>> course.set_quiz_extensions([
...     {
...         'user_id': 1,
...         'extra_time': 60,
...         'extra_attempts': 1
...     },
...     {
...         'user_id': 2,
...         'extra_attempts': 3
...     },
...     {
...         'user_id': 3,
...         'extra_time': 20
...     }
... ])
set_usage_rights(**kwargs)

Changes the usage rights for specified files that are under the current course scope

Calls:PUT /api/v1/courses/:course_id/usage_rights
Return type:canvasapi.usage_rights.UsageRights
show_front_page(**kwargs)

Retrieve the content of the front page.

Calls:GET /api/v1/courses/:course_id/front_page
Return type:canvasapi.course.Course
submissions_bulk_update(**kwargs)

Update the grading and comments on multiple student’s assignment submissions in an asynchronous job.

Calls:POST /api/v1/courses/:course_id/submissions/update_grades
Return type:canvasapi.progress.Progress
update(**kwargs)

Update this course.

Calls:PUT /api/v1/courses/:id
Returns:True if the course was updated, False otherwise.
Return type:bool
update_assignment_overrides(assignment_overrides, **kwargs)

Update a list of specified overrides for each assignment.

Note: All current overridden values must be supplied if they are to be retained.

Calls:PUT /api/v1/courses/:course_id/assignments/overrides
Parameters:assignment_overrides (list) – Attributes for the updated assignment overrides.
Return type:canvasapi.paginated_list.PaginatedList of canvasapi.assignment.AssignmentOverride
update_settings(**kwargs)

Update a course’s settings.

Calls:PUT /api/v1/courses/:course_id/settings
Return type:dict
upload(file: Union[os.PathLike, str, io.IOBase, _io.FileIO], **kwargs)

Upload a file to this course.

Calls:POST /api/v1/courses/:course_id/files
Parameters:file (file or str) – The file or path of the file to upload.
Returns:True if the file uploaded successfully, False otherwise, and the JSON response from the API.
Return type:tuple

CourseNickname

class canvasapi.course.CourseNickname(requester, attributes)
Parameters:
  • requester (canvasapi.requester.Requester) – The requester to pass HTTP requests through.
  • attributes (dict) – The JSON object to build this object with.
remove(**kwargs)

Remove the nickname for the given course. Subsequent course API calls will return the actual name for the course.

Calls:DELETE /api/v1/users/self/course_nicknames/:course_id
Return type:canvasapi.course.CourseNickname

LatePolicy

class canvasapi.course.LatePolicy(requester, attributes)
Parameters:
  • requester (canvasapi.requester.Requester) – The requester to pass HTTP requests through.
  • attributes (dict) – The JSON object to build this object with.