Your Moodle version

Blocks: Sharing Cart

Maintained by Picture of Tomonori Maruyama Tomonori Maruyama, Picture of Don Hinkelman Don Hinkelman
The Sharing Cart is a block that enables sharing of Moodle content (resources, activities) between multiple courses on your site. Compatible with Moodle 2.9 from June 16, 2015.
Moodle 2.3, 2.4, 2.5, 2.6, 2.7, 2.8

Note: To update the Sharing Cart to Moodle 2.9, we fixed the file /classes/controller.php by changing the term, textlib,  *twice* to core_text in both line 138 *and* in line 139.

I apologize to those who already downloaded the plugin from plugins database from June 16 to June 19, because only one of the textlib terms was changed, and therefore problems will persist until both are changed.  From June 19th the download has been corrected.

The Sharing Cart is a block for duplicating course items into a personal library and an easy way to move those Moodle resources and activities between multiple courses on your site. With just three clicks, the Sharing Cart copies and moves a single course item from one course to another. It copies without user data--similar to the "Import” function in Course Administration. From version 2.3, user content in Forums, Wikis, Glossaries and Databases can optionally be included. In addition, items can be collected and saved on the Sharing Cart indefinitely, serving as a library of frequently used course items available for duplication. The Sharing Cart is viewable only by teachers, course creators and administrators. Tested on Moodle 2.9 and earlier versions.


Screenshot #0
Screenshot #1


Picture of Tomonori Maruyama
Tomonori Maruyama (Lead maintainer)
Picture of Don Hinkelman
Don Hinkelman: Contributor
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Daniel Neis Araujo
    Wed, Oct 15, 2014, 10:44 PM

    thanks for the block!

    The link for docs is broken ;)

    Can I use this block to copy/move contents from frontpage?

    Kind regards,
  • Picture of Don Hinkelman
    Thu, Oct 16, 2014, 7:43 PM
    Hi Melissa: Yes, it works with Moodle 2.7.
    And hi Daniel, thanks for the report. Link to docs is now fixed and yes, front page copy/move is possible (add main menu block and add sharing cart block to front page).
  • Picture of Daniel Neis Araujo
    Thu, Oct 16, 2014, 10:32 PM

    thanks for your feedback!
    I've downloaded via downloaded button, and the block does not appear at front page.

    The block is missing

    'site' => true

    on the array returned by



    Kind regards,
  • Picture of Brian Rigwald
    Thu, Jun 4, 2015, 10:40 PM
    Are there any incompatibilities with Moodle 2.9?
  • Picture of Don Hinkelman
    Mon, Jun 8, 2015, 4:17 PM
    For 2.9, yes, there is an issue. So please wait, Brian. We are fixing a minor issue that prevents viewing a quiz after it is uploaded.
  • Picture of Marie CICHOCKI
    Tue, Jun 16, 2015, 4:22 PM
    Hello Don, I have tried the Sharing Cart with 2.9+. Whenever I copy any activity or ressource to the sharing cart, I do not get anything in the sharing cart. Any news vs your above post?
  • Picture of Don Hinkelman
    Tue, Jun 16, 2015, 9:22 PM
    Here is a fix for Moodle 2.9. Tested by Emma Richardson. Go to file : /blocks/sharing_cart/classes/controller.php Line: 138, 139
    [present code]
    if (\textlib::strlen($cleanname) > self::MAX_FILENAME)
    $cleanname = \textlib::substr($cleanname, 0, self::MAX_FILENAME) . '_';

    [edited code--fix for 2.9]
    if (\core_text::strlen($cleanname) > self::MAX_FILENAME)
    $cleanname = \core_text::substr($cleanname, 0, self::MAX_FILENAME) . '_';
  • Picture of Jakke Lehtonen
    Fri, Jun 19, 2015, 4:32 AM
    Is that fix for this: exception 'zip_exception' with message 'Invalid structure of the zip package' in mdeploy.php:1457
  • Picture of Blair F.
    Sat, Aug 1, 2015, 12:07 AM
    I have a situation where an instructor used Sharing Cart to copy a Quiz activity from one course to another and the NEW instance shows "24 attempts" even though there are no attempts visible (nor should there be). Has anyone else experienced this? We're using Moodle 2.8.7 with Sharing Cart 2014091200 2.6, release 1 patch 6. I will continue to scour the forums to see if I can find an answer. Thanks!
  • Picture of Blair F.
    Sat, Aug 1, 2015, 12:25 AM
    Update to the previous comment: I just repeated the exercise, myself, and the same Quiz copied just fine. So, I don't know what happened when she did it. I'll keep an eye on this to see if it can be reproduced.
  • Picture of John Provasnik
    Thu, Aug 20, 2015, 8:14 PM
    What role permissions (re: importing/exporting) are needed for a manager to use Sharing Cart. They can add to the cart, but when they go to put the activity in a new course, they get an error. I already have all the question permissions added from the Moodle Docs, but it doesn't provide any additional needed permissions. Thanks,
  • Picture of John Provasnik
    Sat, Aug 22, 2015, 3:26 AM
    Looks like the manager role on my site was adjusted to not be able to import/export between courses. once that was reset, it worked well.
  • Picture of sonia sonia
    Thu, Sep 3, 2015, 5:52 PM
    Hi, I have the same problem that Balir and John, I can copy to sharing cart but I can't copy from Sharing Cart to another course anything, I tried folders, documents,...and nothing happens, I have manager role and I want to Know whats happens. I work with Moodle 2.8.1 and sharing cart Release 2.6, release 1 patch 6.
    thanks in advance
  • Picture of sonia sonia
    Tue, Sep 8, 2015, 6:12 PM
    Hi, I solve the problem with the settings in the general backup, all it's need to be checked!

  • Picture of barbara nance
    Thu, Oct 8, 2015, 2:43 AM
    I also have the error problem, can copy a resource but not them 'paste' onto in the course area. I get a 'Unexpected Error occurred' notification, Am logged on with Admin rights on Moodle 2.9 , not sure which version it is as our IT folks do the uploading but was only installed around 4 weeks ago so would expect it to the the most recent version. We are using Clean Theme. Many thanks
1 2
Please login to post comments