donhinkelman / moodle-block_sharing_cart

Content sharing plug-in for Moodle LMS. Now at version 4.4, release 3 (actually this is for Moodle LMS version 4.3. Requires PHP 7.4.
7 stars 38 forks source link

Badges are copied when pasting a resource from cart #127

Closed nicolasjacquemet closed 1 year ago

nicolasjacquemet commented 2 years ago

We're experiencing a bug with the plugin when used in a course with badges. When you put a resource in your cart and then paste it, all the badges from the course will be copied to the target course. Steps to reproduce :

Plugin : version 3.11, release 2 2022080202 Moodle : version 3.11.9 build 20220822

donhinkelman commented 2 years ago

Thank you Nicolas for reporting this bug and listing the steps to reproduce it. I will assign this to Praxis.

frederikmillingpytlick commented 2 years ago

Hi @nicolasjacquemet,

We are aware of the issue and as it is an issue in Moodle Core, we have created a ticket for Moodle. See: https://tracker.moodle.org/browse/MDL-43697

It seems that our patch has been merged into Moodle 4.0 and above, so upgrading should fix this behaviour.

If you would not like to upgrade to Moodle 4.0 you could try to see if the Moodle devs would merge it into Moodle 3.11 as well.

nicolasjacquemet commented 2 years ago

Thanks for your answers, but are we sure this is the same issue? In my case it has nothing to do with deleted badges or course backup restoration. In doubt, I tested it on on a Moodle 4.0.3 and the issue is still present. I copy-pasted a resource with the sharing cart plugin in a course with a badge and my test badge was duplicated :

image

So it seems to be a different issue and should be re-open.

frederikmillingpytlick commented 2 years ago

Hi @nicolasjacquemet,

We don't currently have the time to deep dive into the sharing cart at the moment, but will take a look when we get the time.

If you are looking to speed up the fixing of this issue, you are more than welcome to submit a patch for us to look at.

marxjohnson commented 1 year ago

I have followed the instructions to reproduce this on MOODLE_400_STABLE with the master branch of block_sharing_cart and was unable to do so. I backed up and restored a File resource from a course with a badge to a course with no badges. The destination course received the resource, but no badges. I have attached the .mbz file created by Sharing Cart, which does not contain the badge. Sharingcart-small files-1668172879.0094.mbz.zip

frederikmillingpytlick commented 1 year ago

This has been fixed in Moodle 4.0, closing issue