Skip to content

Commit

Permalink
feat: ItemBankBlock (#35553)
Browse files Browse the repository at this point in the history
This is a new XBlock that presents a random subset of its children. As of this commit, the block
can only be added as an Advanced component. For Sumac, we plan to enable it as part of the
Libraries Relaunch Beta, under the name "Problem Bank (Beta)"

The block does not care if its children are from V1 library, V2 library, or the course itself.
It shares the randomization logic with LegacyLibraryContentBlock. It is also fully backwards-compatible with LegacyLibraryContentBlock. So, once V1 libraries are migrated to V2 libraries (after Teak), we eventually
could point the `library_content` entry point at ItemBankBlock.

Part of: openedx/frontend-app-authoring#1385
  • Loading branch information
kdmccormick authored Oct 22, 2024
1 parent 784b2b8 commit 08c8e9d
Show file tree
Hide file tree
Showing 7 changed files with 1,106 additions and 415 deletions.
3 changes: 2 additions & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ files =
openedx/core/djangoapps/xblock,
openedx/core/types,
openedx/core/djangoapps/content_tagging,
xmodule/util/keys.py
xmodule/util/keys.py,
xmodule/item_bank_block.py

[mypy.plugins.django-stubs]
# content_staging only works with CMS; others work with either, so we run mypy with CMS settings.
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"error = xmodule.error_block:ErrorBlock",
"hidden = xmodule.hidden_block:HiddenBlock",
"html = xmodule.html_block:HtmlBlock",
"itembank = xmodule.item_bank_block:ItemBankBlock",
"image = xmodule.template_block:TranslateCustomTagBlock",
"library = xmodule.library_root_xblock:LibraryRoot",
"library_content = xmodule.library_content_block:LegacyLibraryContentBlock",
Expand Down
Loading

0 comments on commit 08c8e9d

Please sign in to comment.