Skip to content

[BB-3710] Stop rendering Visibility and Move buttons on libraries (koa.2a) - #323

Merged
lgp171188 merged 1 commit into
opencraft-release/koa.2afrom
danielf/BB-3710-opencraft-release
Mar 22, 2021
Merged

lgp171188 merged 1 commit into
opencraft-release/koa.2afrom
danielf/BB-3710-opencraft-release

Conversation

@spokerman12

@spokerman12 spokerman12 commented Mar 2, 2021 •

Copy link
Copy Markdown

Description

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

Supporting information

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 know to happen on koa.master and open-release/juniper.3.

More on "Other information"

Testing instructions:

(Sandbox link)

  1. Create a new library
  2. Add a component
  3. Click the cogwheel button
  4. You should see this error (group configurations don't apply to Libraries because they're a particular type of XBlock that can be reused throughout its course org)
    image
  5. This fix removes the access button. You can pull this branch to your local devstack or use the sandbox link provided. the buttons shouldn't appear in the library page.

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.
image

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.

image

Other information:

From library docs

You can give other Studio users access to your library. Depending on the level of access that you give them in the library, additional library users can view and use library content in courses, edit library content, or add and manage other library users. All users to whom you give library access must be registered with Studio and have an active account.

Ensure that the new library member has an active Studio account.
On the Studio home page, select the Libraries tab and locate the library to which you are adding this user.
From the Settings menu select User Access.
On the User Access page, select Add a New User.
Enter the new user’s email address, then select ADD USER.
The new user is added to the list of library members with the User level of access.

From randomized content XBlock docs

To create randomized assignments that make use of components from content libraries, you must have at least User level access to the libraries that you want to use. If you do not have access to a library, members of your course team who have Admin access to that library can grant you access.

The libraries that you create or have access to are listed on the Libraries tab on the Studio Home page. For details about content libraries, see Working with Content Libraries.

On the error image, we see that this has to do with groups. Groups are handled by course runs, so the Edit Access button has no place in a library (which is different from the Randomized XBlock that uses the library, which does support changing its access settings)

Deadline:

None

@spokerman12
spokerman12 marked this pull request as ready for review March 3, 2021 00:27
@lgp171188

Copy link
Copy Markdown

@spokerman12, a nit that I wanted to mention: 'access settings' and 'accessibility' are two entirely different things and I think the former is the right one for this task. Can you update the description to fix it?

Also, once this is reviewed and merged, we should create a backport PR against the opencraft-release/juniper.3 branch and also an upstream PR.

@spokerman12 spokerman12 changed the title [BB-3710] Stop rendering Visibility button on libraries [BB-3710] Stop rendering Visibility button on libraries (koa.2a) Mar 8, 2021
@lgp171188

Copy link
Copy Markdown

@spokerman12, now that the upstream PR has been approved and will soon be merged, can you backport the changes (if there are any additional changes made in the upstream PR) so that @shimulch can review and approve?

@spokerman12
spokerman12 force-pushed the danielf/BB-3710-opencraft-release branch 2 times, most recently from 1f22062 to 56755ca Compare March 22, 2021 14:13
@spokerman12
spokerman12 force-pushed the danielf/BB-3710-opencraft-release branch from c63b90a to 5bad74e Compare March 22, 2021 14:19
@spokerman12 spokerman12 changed the title [BB-3710] Stop rendering Visibility button on libraries (koa.2a) [BB-3710] Stop rendering Visibility and Move buttons on libraries (koa.2a) Mar 22, 2021

@shimulch shimulch left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM 👍

  • I read through the code. It's just a backport of upstream PR.
  • [N/A] I checked for accessibility issues
  • [N/A] Includes documentation
  • [N/A] I made sure any change in configuration variables is reflected in the corresponding client's configuration-secure repository.

@lgp171188
lgp171188 merged commit 29b51ad into opencraft-release/koa.2a Mar 22, 2021
@spokerman12
spokerman12 deleted the danielf/BB-3710-opencraft-release branch March 22, 2021 20:58
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.

3 participants