Skip to content

refactor: a ContentLibrary must have a LearningPackage#37499

Open
ormsbee wants to merge 6 commits intoopenedx:masterfrom
ormsbee:remove-nullable-lib-lc
Open

refactor: a ContentLibrary must have a LearningPackage#37499
ormsbee wants to merge 6 commits intoopenedx:masterfrom
ormsbee:remove-nullable-lib-lc

Conversation

@ormsbee
Copy link
Copy Markdown
Contributor

@ormsbee ormsbee commented Oct 17, 2025

Description

The learning_package of a ContentLibrary was originally made to be an
optional, nullable field for backwards compatibility. We were re-using
the same table when we transitioned from making v2 libraries be
Blockstore-based to making them Learning Core-based. Since that time,
Blockstore has been removed completely, and those prototype v2 libraries
are not functional anyway.

This commit removes those non-functional libraries and requires that all
new libraries going forward have a LearningPackage.

Note that this does not affect v1 legacy libraries that are backed by
Modulestore.

Implements #37443

The learning_package of a ContentLibrary was originally made to be an
optional, nullable field for backwards compatibility. We were re-using
the same table when we transitioned from making v2 libraries be
Blockstore-based to making them Learning Core-based. Since that time,
Blockstore has been removed completely, and those prototype v2 libraries
are not functional anyway.

This commit removes those non-functional libraries and requires that all
new libraries going forward have a LearningPackage.

Note that this does not affect v1 legacy libraries that are backed by
Modulestore.
@ormsbee
Copy link
Copy Markdown
Contributor Author

ormsbee commented Oct 17, 2025

Tested this locally on my machine:

mysql> select * from content_libraries_contentlibrary;
+----+-----------------+-----------------------+-------------------+--------+---------+---------------------+
| id | slug            | allow_public_learning | allow_public_read | org_id | license | learning_package_id |
+----+-----------------+-----------------------+-------------------+--------+---------+---------------------+
|  1 | PublishBehavior |                     0 |                 0 |      1 |         |                   1 |
|  2 | deletion-test   |                     0 |                 0 |      1 |         |                NULL |
|  3 | deletion-test2  |                     0 |                 0 |      1 |         |                NULL |
|  4 | deletion-test3  |                     0 |                 0 |      1 |         |                NULL |
+----+-----------------+-----------------------+-------------------+--------+---------+---------------------+
4 rows in set (0.00 sec)

mysql> select * from content_libraries_contentlibrary;
+----+-----------------+-----------------------+-------------------+--------+---------+---------------------+
| id | slug            | allow_public_learning | allow_public_read | org_id | license | learning_package_id |
+----+-----------------+-----------------------+-------------------+--------+---------+---------------------+
|  1 | PublishBehavior |                     0 |                 0 |      1 |         |                   1 |
+----+-----------------+-----------------------+-------------------+--------+---------+---------------------+
1 row in set (0.00 sec)

@ormsbee ormsbee requested review from kdmccormick and removed request for kdmccormick October 17, 2025 20:43
@ormsbee
Copy link
Copy Markdown
Contributor Author

ormsbee commented Oct 17, 2025

Hah, now it's running into LTI-launch tests that we never ripped out. 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant