Skip to contents

This function uploads a QTI file to a specified course in Canvas LMS and initiates a content migration. It handles the process of creating the migration, uploading the file, and checking the migration status.

Usage

upload_qti_file_with_migration(
  canvas,
  course_id,
  pre_attachment_name,
  pre_attachment_size,
  file_path,
  settings = list()
)

Arguments

canvas

A list containing the 'api_key' and 'base_url' for authentication.

course_id

The ID of the course where the QTI file will be uploaded.

pre_attachment_name

The name of the file being uploaded. This is required for the file upload process.

pre_attachment_size

The size of the file being uploaded in bytes. This is required for the file upload process.

file_path

The local file path to the QTI file that needs to be uploaded.

settings

A list of additional settings for the content migration. This can include options like question bank name or overwrite settings.

Value

A confirmation message indicating that the QTI file has been uploaded and the content migration has been completed.