Closed brian-winstead closed 1 year ago
Hello.
I found a similar problem (invalid course module id) with test activity copy, using the sharing cart.
I just attempted to reproduce this on Moodle 4.0 with Sharing Cart version 2022101400 (4.0, release 2) and it behaved as expected. The disabled module was not added to the sharing cart with other activities in the section, and copying the section somewhere else brought only the instances of the active modules. I believe this can be closed.
Hello marxjohnson.
Did you tried with all five conditions present ? (as described in https://tracker.moodle.org/browse/CONTRIB-8785) :
Recall :
course_modules.section
field) between the source course and the destination course needs to be differentI saw it fails with 2021112300.00 (4.0dev+ (Build: 20211123)).
Hi @dcadiou, I didn't try following those instructions. Perhaps it's worth filing that as a separate issue here, to avoid confusion between that and the original report in this issue?
I'm guessing this issue is resolved, from the following comment on the issue: https://github.com/donhinkelman/moodle-block_sharing_cart/issues/73#issuecomment-1296977267
If you find any errors regarding the scenarios/tests described by @dcadiou then you're welcome to create a new issue, as long as the error still occurs on Moodle 4.0+, as we will not update the sharing cart prior to Moodle 4.0 - However we do follow the Moodle releases and are willing to fix any security risks regarding this plugin. https://moodledev.io/general/releases
Kind regards, Anders Rasmussen
Praxis Team
Hello.
Thank you for investigating on this.
I tried again today with a Moodle in version 2022112801.04 (4.1.1+ (Build: 20230210)) and sharing cart plugin version 2023030900 (4.0, release 5).
Steps used to reproduce didn't generate any error. The copy is done as expected. I think this issue can now be closed.
(I updated https://tracker.moodle.org/browse/CONTRIB-8785).
DESCRIPTION When using the Sharing Cart block to copy a course section, the copy fails with an "Invalid course module ID error" if the course section contains an instance of an activity module which has been hidden.
STEPS TO REPLICATE NOTE: Steps will demonstrate the issue with an example community module and a core Moodle module.
OBSERVED BEHAVIOR: An error is received stating, "Invalid course module ID". If you refresh the page you will see that the page and assignment from the course section were added to the sharing cart as individual items, but the section as a whole was not added.
EXPECTED BEHAVIOR: The course section is added to the Sharing Cart.
REPLICATION LOCATIONS Replicated in Moodle 3.8.3 using Sharing Cart version 2020051800.