Skip to content

Commit

Permalink
feat: use the "published only" mode for choosing library content
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald committed Oct 22, 2024
1 parent f9139a3 commit 2c455a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def get_library_content_picker_url(course_locator) -> str:
content_picker_url = None
if libraries_v2_enabled():
mfe_base_url = get_course_authoring_url(course_locator)
content_picker_url = f'{mfe_base_url}/component-picker'
content_picker_url = f'{mfe_base_url}/component-picker?variant=published'

return content_picker_url

Expand Down
3 changes: 1 addition & 2 deletions cms/static/js/views/pages/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,7 @@ function($, _, Backbone, gettext, BasePage,
const modal = new SelectV2LibraryContent(options);
const courseAuthoringMfeUrl = this.model.attributes.course_authoring_url;
const itemBankBlockId = xblockElement.data("locator");
// TODO:: the ?parentLocator param shouldn't be necessary but is currently required by the component picker
const pickerUrl = courseAuthoringMfeUrl + '/component-picker?parentLocator=' + encodeURIComponent(itemBankBlockId);
const pickerUrl = courseAuthoringMfeUrl + '/component-picker?variant=published';

modal.showComponentPicker(pickerUrl, (selectedBlockData) => {
const createData = {
Expand Down

0 comments on commit 2c455a6

Please sign in to comment.