kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Lesson Resource Preview page action button is "Add" when resource is already in Lesson

Open jonboiser opened this issue 6 years ago • 1 comments

Observed behavior

"Pim's Mother" video is already in the Lesson:

image

But when you look into the preview, the action button says "Add"

image

And clicking the "button" seems to re-add the the resource to the Lesson. Because unselecting it via checkbox will say something like "Removed 3 resources" if you e.g. clicked "Add" twice.

cc @MisRob if you have any insights on what's causing this.

Expected behavior

  1. If resource is in lesson, then the button in the preview says "Remove" and causes a remove action when clicked.

User-facing consequences

Errors and logs

…

Steps to reproduce

  1. Add a resource to a lesson
  2. Go to that resources' preview in the Manage Resources workflow
  3. See the wrong button ("Add") on the top corner

Context

0.14.1

jonboiser avatar Aug 13 '20 02:08 jonboiser

The is another issue because of this bug. When you reload the preview page, the correct remove button shows up and then if you go back to the list, nothing shows up.

bug

The above pull request fixes that also.

alexMet avatar Oct 03 '20 18:10 alexMet