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

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.

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.


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 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
  • Picture of Don Hinkelman
    Thu, Oct 8, 2015, 7:17 AM
    Hi Barbara, I haven't had any problems with the Sharing Cart in Moodle 2.9, so maybe your role settings are preventing you from restoring into another course. Can you restore into the same course? Have you tried checking the settings that Sonia said fixed the problem? Sorry, Sonia, I can't find the settings you refer in my Site Administration. Could you give a more precise path to where you could fix this problem?
  • Picture of barbara nance
    Thu, Oct 8, 2015, 7:26 PM
    Hi No I can not restore into the same course. I have overall admin rights for the Moodle which does mean I can do just about everything! Have checked the tick list in Site Admin>PlugIns>ManagePlugIn>Sharing cart and have ticked all the options.
    Your help appreciated
  • Picture of Don Hinkelman
    Fri, Oct 9, 2015, 6:26 AM
    Hi Barbara, Sorry, I can't reproduce your problem. Could you email me at and we can continue working on it. Check that your version number is 2015061600. Don
  • Picture of barbara nance
    Tue, Oct 13, 2015, 1:51 AM
    tks Don dropped you an email
  • Picture of Mark McKay
    Fri, Jan 1, 2016, 2:11 AM
    Hi Don. Do you plan to "certify" this for 3.0 soon? -Mark
  • Picture of Don Hinkelman
    Sat, Jan 2, 2016, 4:25 AM
    Hi Mark, Thanks for checking. We usually do Sharing Cart upgrades and testing each year in September and March. So unless we get a report that our 2.9 version works in 3.0, you will have to wait a bit longer. Sorry about that. If someone tests it and reports the results to me, that will help. Regards, Don
1 2 3
Please login to post comments