Skip to content
Snippets Groups Projects
Unverified Commit 777bb633 authored by Daniel Francis's avatar Daniel Francis Committed by GitHub
Browse files

fix: Stop rendering Visibility and Move buttons on libraries (#26885)

We're fixing an error that appears when you click the "edit access"
button on an XBlock in the library page.

Libraries in the "Add library" page shouldn't have the accessibility
config icon. Access settings for libraries are changed at the top, on
Settings > User Access. When clicking the access-button (the cog) on a
Library, an error appears. This is known to happen on koa.master and
open-release/juniper.3.

This happens due to the way XBlocks are rendered; as they get rendered
initially, the previews are unaware of whether they're part of a
library. We can confirm this by refreshing the page, this makes the
button disappear.

This fix removes the cogwheel when the XBlock is part of a library.
This doesn't affect the XBlocks imported to courses because those are
rendered on a Randomized Content XBlock, which does have its access
options.

Authored by: Daniel Francis <daniel.francis@opencraft.com>
parent 91b74b7f
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment