Skip to content

feat: allow using all components of LibraryContentBlock - #31788

Merged
pkulkark merged 1 commit into
openedx:masterfrom
open-craft:agrendalath/allow_using_all_rcb_components
Feb 22, 2023
Merged

feat: allow using all components of LibraryContentBlock#31788
pkulkark merged 1 commit into
openedx:masterfrom
open-craft:agrendalath/allow_using_all_rcb_components

Conversation

@Agrendalath

Copy link
Copy Markdown
Member

Description

Setting max_count to a negative value resulted in raising an unhandled ValueError. With this change, it selects all children of the LibraryContentBlock.

Testing instructions

  1. Create a new library in Studio. It should contain at least 2 XBlocks.
  2. Add library_content to the Advanced Module List in a course.
  3. Create a Randomized Content Block in Studio and set its "Count" to -1.
  4. View the XBlock in Studio and check that it has the "Each student will be assigned {x} components drawn randomly from this list. " information ({x} should be the number of available components in the library).
  5. Check that all components are displayed in Preview.
  6. Publish the course and check that all components are displayed in LMS.

Deadline

"None"

Other information

Private-ref: BB-7062.

Setting max_count to a negative value resulted in raising an unhandled
ValueError. Currently, it selects all children of the LibraryContentBlock.
@Agrendalath
Agrendalath requested a review from pkulkark February 17, 2023 11:55
@Agrendalath Agrendalath self-assigned this Feb 17, 2023
@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core committer labels Feb 17, 2023
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @Agrendalath!

As a core committer in this repo, you can merge this once the pull request is approved per the core committer reviewer requirements and according to the agreement with your edX Champion.

@pkulkark pkulkark left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Agrendalath LGTM 👍

  • I tested this: Verified the RCB shows all the components from library when count is set to -1 as described in testing instructions.
  • I read through the code

@pkulkark
pkulkark merged commit 0d22e4e into openedx:master Feb 22, 2023
@pkulkark
pkulkark deleted the agrendalath/allow_using_all_rcb_components branch February 22, 2023 14:53
@openedx-webhooks

Copy link
Copy Markdown

@Agrendalath 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

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

Labels

core committer open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants