Closed ghost closed 2 years ago
I agree it is useful to copy sections with no activities, only summaries or text or image labels. I will discuss this with the programmer helping with section copy.
Comments by Mo: Issue #83 about copying an empty section to cart, I believe that the current structure of the Sharing Cart does not support the existence of empty folder in a cart, therefore copying an empty section is not currently possible. Reply by Don According to the issue posting, copying an “empty” section used to be possible, but that was removed at some point. Actually, I don’t know when that was, or if it was.
I do know that many teachers spend a lot of time making information or description at the top of the section. This contains:
So is there a way to have the Sharing Cart copy a folder that is empty of activities, but only has a title and top information?
Comment by Mo: To give you some picture explaining the reason, Sharing Cart stores data in a cart like this: For example,
Hi, I have created a pull request #100 to fix this issue. This fix is trying to solve the issue without chaging database structure. It creates an empty item when an empty section is copied. This item will be invisible when rendering the cart, so the empty folders can be seen and restored to a course.
This issue has been fixed and should have been closed earlier. Thanks to Ponlawat Weerapanpisit for work on this.
We have just upgraded from
2018012400
to2020090100
on Moodle 3.9.3. Our users have raised an issue that they are no longer able to copy sections that contain no activities/resources, just a summary. This is used quite often for posting information directly within sections, that don't need an activity.This functionality appears to have been intentionally removed at some point, via a check of
$section->sequence
https://github.com/donhinkelman/moodle-block_sharing_cart/blob/master/block_sharing_cart.php#L132.Was this an intended change? If so, what is the rationale behind it? The Moodle import feature allows copying of emptying sections, however our users are used to using the sharing cart for this.