Blocks: Stash

Maintained by Picture of Adrian Greeve Adrian Greeve, Picture of Frédéric Massart Frédéric Massart
Add an inventory of items to your course and let your students find items by exploring the activities. #game #gamification
265 sites
37 fans
Moodle 2.9, 3.0, 3.1, 3.2, 3.3, 3.4

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 (3.0 or newer preferred)
2/ Install the three following plugins (without exception)
3/ Enable the filter "Stash snippets" you just installed through "Site administration > Filters"
4/ Enable conditional access, named enableavailability under "Site administration > Advanced features"
5/ Restore this backup file as a new course

6/ 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


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

Comments RSS

Show comments
  • Picture of Frédéric Massart
    Wed, 17 Jan 2018, 5:16 AM
    Hi Carlos,

    Thanks for sharing your enthousiasm! I believe that Adrian and I already discussed the complexity for non-editing teachers to use the plugin. I'm confident that we will simplify this in a future release.

    Thanks for sharing your solution!
  • Picture of Joseph Liaw
    Wed, 17 Jan 2018, 10:09 PM
    Hi Frederic:

    Wanted to report and verify that Carlos solution worked for adding non-editing teachers to a course--fantastic!

    Small bug report: I tried resetting a course to get ready for a new semester, and it looks like Stash does not have Course Reset implemented yet (not clearing out the Stash items and locations, but rather clearing out old students and items acquired). Not a big deal, but something to implement as Stash is used more and more by teachers around the world!

    Thank you!
  • Picture of Adrian Greeve
    Thu, 18 Jan 2018, 8:45 AM
    Hi Joseph. The course reset is a good idea. I'll try to remember that.
    Sorry about the inaction of late. I've been extremely busy trying to prepare for the GDPR compliance required later on this year.
  • Picture of Sue Stuart
    Wed, 31 Jan 2018, 12:24 AM
    Is there a recommended pixel size for stash icons. I have added ones at 1000x1000 pixels and the same image reduced to 50x50 pixels and they are both the same size. Is there any way to reduce the size they display at?
  • Picture of Frédéric Massart
    Wed, 31 Jan 2018, 2:45 AM
    Hi Sue. We recommended between 200x200 and 100x100. The images weigh the same regardless of where they are displayed, on the display size changes. It is therefore not recommended to upload large images. Ideally, Moodle should offer a tool for resizing images but to my knowledge there isn't any yet. I hope this helps.
  • Picture of Sue Stuart
    Thu, 8 Feb 2018, 5:10 PM
    Is there a facility to change the name of the Stash block. We work with disaffected kids who have been excluded from mainstream education, and the connotation with a stash of drugs is putting us off from using the facility. The the Level Up Block can be renamed but I can't see any way to do it for this.
  • Picture of Adrian Greeve
    Fri, 9 Feb 2018, 9:09 AM
    Hello Sue. The most recent version of this plugin has the ability to change the block title via the "actions" cog. This version however is only located on github You can click the 'Clone or download' button to download a zip of this version. Alternatively you can change the string through the language customisation settings. This is located in 'Site administration > Language > Language customisation'. After loading all of the strings you can select block_stash and then look for the string 'plugin'. Changing this string will change the title of the stash block.
  • Picture of Pascal Kurosinski
    Sat, 3 Mar 2018, 1:12 AM
    Hi Frédéric,
    Thanks for this plugin - it's really cool. I would like to let the learner pick up some items automatically when they view the page. Would you have a trick to achieve that?
  • Picture of Frédéric Massart
    Sat, 3 Mar 2018, 12:41 PM
    Hi Pascal,

    That is something Adrian and I have considered since the early stage of development but never got around doing it. We had in mind that an item could be automatically found, perhaps after spending a certain amount of time on a page. Perhaps to give more incentive to students to actually read the content rather than clicking everywhere to find items.

    There might be ways to achieve this, but you'd have to play around inserting JavaScript (similar to how the plugin used to work without the filter plugin), however, see this as an advanced and error-prone approach. Let me know if you're interested in getting your hands dirty and I'll guide you through it.
  • Picture of Pascal Kurosinski
    Tue, 6 Mar 2018, 12:07 AM
    Hi Frédéric,

    Thanks. In fact, I think that your plugin can be a good alternative also to the "normal" access control in Moodle. I would like to set up a rule like "The learner has to access 80% of all content before proceeding to the exam". With the normal access control, one can define every activity to be mandatory, but not a percentage, If they would pic up an item on each page automatically, that can be easily done.

    If you can direct me, I will try. I have a bit experience in JavaScript and have done a bit of editing of Moodle plugins, but I don't know how the event listeners work. I guess the picking up is done by the function "pickup_item($itemorid, $quantity = 1, $userid = null)", but how can I trigger the event from the Moodle page if I know (only) the drop snippet?

  • Picture of Frédéric Massart
    Tue, 6 Mar 2018, 9:43 PM
    Hi Pascal,

    Here you can see the old-fashioned JavaScript snippet: In short, what you need to do is instantiate the Drop object with ID and the hash of the drop, and then call the d.pickup() method. You set the rules as to when the pickup method has to be called. You can find the ID and Hash when you go to the UI to get the snippet for your item. Note that the full hash should never be included (5 chars is enough IIRC).

    Let me know how you go.


    PS: Sorry, quick message but it's the end of the day and my brain isn't functioning any more.
  • Picture of Carly Born
    Tue, 20 Mar 2018, 4:55 AM
    I'm wondering what kind of logging this plugin does. I'm working with a professor who uses Level Up and wants to make some awards for things that happen outside of the LMS, but that can be tracked easily through student-submissions or some other mechanism. I'm curious to know if we use this plugin to stash some things at the end of submission forms or something if we could leverage the logging to add to their Level Up point values (because the Stash awards are in the logs). I know it sounds complicated, but is it do-able?
  • Picture of Adrian Greeve
    Tue, 20 Mar 2018, 8:59 AM
    Hello Carly,
    Yes block stash has an 'item_acquired' event. You can use this with Level Up to give XP to students that gain stash items.
  • Picture of Frédéric Massart
    Tue, 20 Mar 2018, 10:49 AM
    Hi Carly, to complement Adrian's answer, here is a screenshot of what the rule would look like in Level up!: [](screenshot)
  • Picture of Carly Born
    Tue, 20 Mar 2018, 9:58 PM
    Yes, I see that now. My problem is that I need to award different points for different items acquired.
1 2 3 4 5
Please login to post comments