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


  • Wed, Aug 2, 2017, 6:39 PM
    Hi there, the cp refused to upload the blocks_stash file with the following message: The file you uploaded,, contains a virus so the upload was canceled: Sanesecurity.Foxhole.Zip_fs186.UNOFFICIAL FOUND

    Thanks for any additional info. Haven't tried the filter or availability.
  • Fri, Aug 4, 2017, 10:49 AM
    Hello Maude Vuille,

    We take the security of our plugin very seriously and so would like to clear up any possible problem that has been found. Can you provide any information about the anti-virus software that you are running? The zip file is an upload of the file created by clicking the download link (and then renamed to follow plugin guidelines) provided by github. I think that it's extremely likely that the report is a false positive.
  • Wed, Aug 9, 2017, 2:02 PM
    New version just released! I will provide a video for the new changes soon.
  • Thu, Aug 10, 2017, 10:45 AM
    Hi Adrian:

    New version sounds exciting! I installed the upgraded block and filter, but then when I tried to load my course it wouldn't show up and I got an error: "This page isn’t working _____________ is currently unable to handle this request. HTTP ERROR 500". Any ideas on how to troubleshoot? I tried to turn on debugging but nothing loads and no other error messages show up.

    Thanks for your help and keep up the great work!
  • Thu, Aug 10, 2017, 10:57 AM
    Hi Joseph,

    That is disappointing to hear. Can you possibly tell me what version of Moodle and php you are using? I'll try and get it fixed today if possible.
  • Fri, Aug 11, 2017, 5:19 AM
    Hi Adrian:

    Thanks for your quick reply--talk about responsiveness!!

    Good news: your new update loads courses correctly now! Thank you!

    The Trading feature is GREAT!!!!

    Bad news: more weird bug--I can get the Stash snippet to show up when I am logged in as a teacher / admin, but when I login with a test STUDENT account the Stash does not show up!! I even forced running a cron job to see if that needed to be done to process the filter...

    This is unfortunate because then it defeats the whole purpose of using Stash!

    Any ideas?

    We are getting very close! Thanks Adrian!
  • Fri, Aug 11, 2017, 5:33 AM bad!!!!

    All is well--the Stash plugin and trading feature works PERFECTLY!

    I had forgotten I had set a test "Gold Coin" to only appear every hour, and once I went back and changed it then of course it showed up!!! This plugin is very cool for gamification and has a HUGE potential!

    Thank you Adrian and Frederic for your great work on this in time for a new school year!!
  • Sat, Aug 19, 2017, 6:58 AM
    Hi Adrian:

    Wanted to leave some positive feedback--thank you for replying so quickly to my private messages for squashing bugs....I wanted to report that with the latest Stash block, Stash snippet filter, and the Stash availability, everything works wonderful for gaming your courses!!! The Trade widget is brilliantly designed and simple to implement since it uses the same snippet filter and can be placed anywhere in your course!

    Great work Adrian and Frederic--thank you for sharing these tools to help teachers make their courses more engaging and fun for their students! Back to stashing Gold Coins and Keys in my classes!!
  • Sun, Aug 20, 2017, 11:57 AM
    Thanks Joseph, it's always nice to read that plugins are appreciated and inherently help in real-life situations! I'll have to admit that Adrian deserves all the credit for this last release, he's the one who invested hours of his time improving the plugin. Good job Adrian!
  • Thu, Aug 24, 2017, 4:05 PM
    Hi Adrian and Frederic,
    I would like to thank you first for this very great plugin.
    I encounter an error message (coming from outer space?) :

    Fatal error: Class '\availability_stash\condition' not found in /home/www/ on line 772

    Here are the conditions which lead to the problem :

    I have three separate instance of moodle 3.3.1+ (Build: 20170727), one for production (PROD), one for diffusion (DIFF) and one for development (DEV).
    I installed stash plugins (3 components : block 1.2.2-2017081000, snippets 1.1.1-2017080900, availability 1.1-2017081000 ) in DEV but not in PROD (we always test plugins in DEV for a few months and decide to install it or not in PROD).
    I backuped a module from PROD and restore it to DEV to make some tests (nothing linked to stash) : this module was never in 'contact' with stash because created in PROD.
    Restore was made OK but when entering the course, under the first section name, I got the error mentionned. Other modules worked great after the same restore process (in same conditions). I did not understand why I got a message related to stash in such a module.

    I investigated the problem and found that, by some bad manipulation I presume, the availabilty_stash plugin was deleted at an unknown date (marked 'not present' in plugin list). I reinstall it today and everything seems to be in order with the module.

    This was just to share a problem I can not explain.

    Thanks again for this plugin. Hope to see it 'customisable' (Having the possibility to change the name of the block for localised label in modules... and maybe the possibility to have items accross several modules and exchange between students. OK I stop my shopping list here wink .

  • Thu, Sep 7, 2017, 10:56 AM
    Hello Serge,

    Sorry about the late reply. I've been trying to replicate the issue that you have described, but so far I have had no luck. I did however find a bug in the restore of another plugin (block_xp, I highly recommend that plugin). If you come across any further problems then please feel free to tell us, though if you do can you please use the bug tracker url (

    I keep meaning to update stash to allow changing the name of the block. I'll try to get around to that in the next release. Your other ideas are interesting, though trading between students looks like a very big project. At the moment I am working on an atto plugin so that inserting the snippets is a lot easier.
  • Mon, Sep 18, 2017, 9:04 PM
    Thanks for all the effort, I really like this plugin and will use it in my educations.

    A nice addition would be to change the size of the dropped items. Right now I'm using coins which are displayed pretty large (50 px wide or so?). Changing the image resolution does not make a difference in how large they are displayed.

    Making them smaller and less vissible would enhance the search effort.
  • Tue, Oct 10, 2017, 5:52 AM
    Hi Adrian and Frederic:

    Just wanted to leave positive feedback that the new Stash Block, Stash Availability, and Stash snippet filter works together flawlessly and allows teachers to be quite creative with their courses (e.g. find 3 Gold Coins to trade in for a Gold Key which can than unlock an answer key or a new section of the course)....

    Quick question: I was trying to test out backing up and restoring my course between servers, and it didn't look like the Stash block supported that function yet....or I might be missing a setting...

    Any chance this is already implemented and I missed a checkbox, or can we request this as a future feature?

    Thanks for sharing all your great work with the Moodle community!
  • Tue, Oct 10, 2017, 12:05 PM
    Hi Joseph,

    Thanks for the kind messages.

    Backup should be working, we are distributing a backup of one of our demo course in the description of the plugin here above and it seemed to work whenever we tried to restore it in other sites. Note that you must have the same suite of plugins installed on the other sites.

    Could you describe a bit more what you are experiencing?
  • Wed, Oct 11, 2017, 9:08 AM
    Hi Frederic:

    Wow--thanks for your quick reply!

    I was testing out seeing if my course would restore to another server with all of my Stash items / swaps / snippets intact, and I double-checked that all 3 of the Stash plugins (block, availability, and snippet filter) were the same versions. However, after performing the restore, my Stash block shows up empty.

    This is a rather large course (over 270Mb) with over 20 Stash items and several trades, so it is pushing the limits!!! I will try again and restore only a small section of the course to a blank course to see if that makes a difference and report back....

    Thank you again for sharing your great work with the Moodle community--I don't think there is any other tool quite like Stash out there for gamification and it's adds some much needed fun to our courses!!!
Please login to post comments