Blocks ::: block_stash
Maintained by Adrian Greeve, Frédéric Massart ⭐
Add an inventory of items to your course and let your students find items by exploring the activities. #game #gamification
Latest release:
1201 sites
86 fans
Current versions available: 2

The stash block is a good way to encourage more interaction with activities and is invaluable for teachers looking to gamify their course.

This plugin introduces a block that shows students items that they have picked up through the course.

The teacher can create items and then place them in activities and resources for students to find.

Items can be set to be collected once and encourages exploration of the course material. It is also possible to set an item to have an unlimited supply from a set location. This could encourage  students to return to specific areas to collect more items. 

You can also check out this video:

Quick start

We've crafted a sample course for you to try, it is the best way to see what this plugin has to offer. Please accurately follow those steps:

1/ Get your hands on a Moodle installation
2/ Install the three following plugins (without exception)
3/ Enable conditional access, named enableavailability under "Site administration > Advanced features"
4/ Restore this backup file as a new course

5/ Enrol a student in the new course
Now, login as that student and try the course

Important note

In order to make this plugin easier to use and fully featured, please also install:

They are highly recommended.


This plugin is part of sets Stash, Gamification.


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5
Screenshot #6


Adrian Greeve (Lead maintainer)
Frédéric Massart ⭐: (The real lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS


  • Sat, Sep 1, 2018, 11:18 AM
    Hi James,

    That's a good idea! We'll consider this for future versions.

    Meanwhile you can "hack" similar behaviours by using the sections as "content" and set them to be hidden until a certain item is acquired. You can also use the Trades to create a narrative whereby a user can only obtain a certain item by trading previously acquired ones. The shortcodes and/or additional options on the drops would be much though.

    Thanks for the suggestion!
  • Mon, Sep 10, 2018, 8:23 PM
    Como faço para ter um relatório do ranking de itens coletados por ordem numérica? Por quantidade de itens recolhidos e não por ordem alfabética? Urgent please?
    How can I do to give a report with number items order, not for name order?
  • Tue, Sep 11, 2018, 9:24 AM
    Hello Reny Sanches, I'm sorry but the report for stash is currently only very basic and can not be sorted by number of items collected. The current ordering is only on the name of the students.
  • Mon, Sep 17, 2018, 10:44 PM
    Hi, I need another information. Our students needs to see the ranking of the itens everybody students. How can I do? Olá meus estudantes precisam ver o ranking de itens recolhidos por todos os estudantes do curso, como posso fazer isso?
  • Mon, Feb 25, 2019, 7:48 PM
    Answering Carly Born "My problem is that I need to award different points for different items acquired. "
    What I tried to solve this issue is to make them collect the item different times, so for example if the student got an excellent grade collect 3 times a piece of gold, if only good collect 2 times...
  • Wed, May 15, 2019, 10:07 PM
    Astonishing plugin !!! Adrian and Frédéric you are genius

    Excuse my english.

    Could you please refer me,
    which table do I have to update if I wish to remove just a single item from the Stash of a student
    but without removing all of the other items ?

    thanks so much
  • Thu, May 16, 2019, 10:04 AM
    Hello Lionel,
    Thank you for your kind words.
    If you want to delete a single item from the stash of a student and not reset the ability to collect the item again, then you just delete a record from block_stash_user_items. If you want to reset the ability to collect the item again then you also need to delete a record from block_stash_drop_pickups. I would recommend looking at reset_stash_of() (and the method calls there) in blocks/stash/classes/manager.php for how the stash of a user is reset for all items for guidance on how to reset just one item.

    I'll see if I can add this functionality in the future. Unfortunately my spare time is currently very short.
  • Wed, Jun 19, 2019, 12:31 AM
    I'm wondering if it's possible to configure a Stash item to be steal-able?
  • Wed, Jun 19, 2019, 3:54 PM
    Hello, firtsly I would like to congratulate your team about this fantastic plugin. I am the IT coordinator of the school and we were thinking of updating the moodle to the newest version 3.7. Do you have any plans of updating this plugin and its extensions to the last moodle update
    ? Thank you very muc
  • Fri, Jul 5, 2019, 1:48 PM
    Hello Xavier, I have just updated the details about these plugins. They are 3.7 ready.
  • Thu, Nov 28, 2019, 12:09 PM
    Hello, I got this message "Exception - Class 'block_stash\invalid_persistent_exception' not found" on the front page.

    How to fix it? Thanks.
  • Thu, Nov 28, 2019, 3:11 PM
    Hello Thanakrit,

    Thank you for the bug report. We will have a new version by the end of this week with a fix for this message. Unfortunately I think that this message hides a deeper issue that we are unaware of at the moment. Can you tell us what message you get once you have upgraded to the new version?

    If you have access to the code then you can make the changes listed here -
  • Tue, Jun 16, 2020, 10:45 PM
    When upgrading to v1.3.3, I'm receiving the following error:

    Debug info: Unknown column 'i.amountlimit' in 'field list'
    SELECT AS itemid, i.stashid AS itemstashid, AS itemname, i.maxnumber AS itemmaxnumber, i.detail AS itemdetail, i.detailformat AS itemdetailformat, i.amountlimit AS itemamountlimit, i.currentamount AS itemcurrentamount, i.timecreated AS itemtimecreated, i.timemodified AS itemtimemodified, AS useritemid, ui.itemid AS useritemitemid, ui.userid AS useritemuserid, ui.quantity AS useritemquantity, ui.timecreated AS useritemtimecreated, ui.timemodified AS useritemtimemodified
    FROM mdl_block_stash_user_items ui
    JOIN mdl_block_stash_items i
    ON = ui.itemid
    WHERE ui.userid = ?
    AND i.stashid = ? AND ui.quantity IS NOT NULL
    [array (
    0 => '49034',
    1 => '30',

    The course is 100% inaccessible, with an "Error reading fro database" message". I'm running the latest Moodle v3.8.3+ and the latest (apparently?) version of Stash. Any assistance is appreciated.
  • Wed, Jun 17, 2020, 9:20 AM
    Hello Paul Martin,
    Were you using version 1.3.1 or earlier before upgrading to 1.3.3? I suspect that after uploading stash to the latest version, that the site hasn't run the upgrade code and that is why you are seeing this error. Please log in as the administrator (or contact the administrator) and kick off the site upgrade.

    Please let me know if that hasn't fixed your problem.
  • Sat, Aug 22, 2020, 5:45 AM
    Hello Mr. Greeve

    Your plugin is awesome, adds an interesting gamification to the courses, but now we have a problem, on a test course of our Moodle 3.8 platform. After a student pick-ups all the items, the items don't appear for other students and our admin account, only after change the config of limited item, then appear again.
Please login to post comments