Skip to content

Conversation

@shanbady
Copy link
Contributor

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/9269

Description (What does it do?)

This PR resoolves an issue where if a canvas course does not have any modules. The ingestion process silently fails even if there are tutor problems and/or files to process as contentfiles.

How can this be tested?

  1. checkout main
  2. download the example canvas archive which is missing modules_meta.xml
  3. place the archive relative to your learn repo
  4. open a django shell and attempt to process it with the following script and see it fail:
from learning_resources.etl.canvas import run_for_canvas_archive,transform_canvas_content_files
from pathlib import Path
zipfile = Path("broken-canvas.zip")
_, run = run_for_canvas_archive(zipfile, "tmp", True)
list(transform_canvas_content_files(zipfile, run,{}, overwrite=True))
  1. checkout this branch and do the same and note that it succeeds

@shanbady shanbady added the Needs Review An open Pull Request that is ready for review label Nov 14, 2025
@shanbady shanbady marked this pull request as ready for review November 14, 2025 22:34
@abeglova abeglova self-assigned this Nov 17, 2025
Copy link
Contributor

@abeglova abeglova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@shanbady shanbady merged commit 4d89b89 into main Nov 17, 2025
13 checks passed
@shanbady shanbady deleted the shanbady/canvas-ingestion-bug branch November 17, 2025 20:24
@odlbot odlbot mentioned this pull request Nov 17, 2025
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review An open Pull Request that is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants