Blocks: Stash

Maintained by Picture of Adrian GreeveAdrian 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

Stash 1.1.0 for Moodle 2.9, 3.0, 3.1, 3.2, 3.3

Note This plugin version is no longer available here in the plugins directory.

Mary Cooch
Mary Cooch
Monday, October 10, 2016, 6:29 PM
General comments

The Stash block brings gamification and motivation into a Moodle course with a slightly different take than with badges.

Once the teacher has added the block to her course, she can then upload an image representing an achievement - a coin, some treasure, a key etc.

Code is produced which the teacher can then add to various places in the course via the code icon in the Atto text editor so that when a student accesses those locations, the 'stash' object is displayed and the student can 'pick it up' and add it to their collection. Their stash objects are stored in the same block which for a teacher displays the set up and reports. The block works best when it is installed alongside the  filter plugin and the availablility plugin.


Documentation on the stash block is available as well as an introductory video so the technical side of setting up the block is well covered, although ideas for making the most of the block's potential are left to the imagination of the course teacher. One or more instances of the stash object may be placed in the course. In this example, the teacher creates a 'treasure' stash object from 'Set up' in the block and then clicks the 'Location' text to get the code needed to paste into the Atto editor:

Code for stash

The teacher then goes to wherever in the course she wants the stash/treasure to be available, clicks the code icon and pastes it in - in a book chapter for instance:

Stash code in a book

This will display for the student like so:

Stash book student display

Because the code may be added anywhere there is the Atto editor, it can also be added to HTML blocks which can then be situated in specific areas of the course, encouraging the student to explore further and work harder! Here the treasure has been added to a forum discussion thread so the student will only see it if they post or reply to a forum discussion:

Stash in forum discussion

And here the block has been added to an assignment submission page (but hidden on the main assignment screen.) The student must click to check out the assignment in order to find the treasure:

Stash when submitting an assignment

 It's vital that admins install the stash snippets filter as well because it cleans up the code which must be pasted and makes it less daunting for the teacher.

Stash doesn't rely on activity completion, as badges do and it is also possible to restrict access to an activity until one or more stash objects have been picked up, using the stash availability plugin.


The plugin was developed and is maintained by two members of Moodle HQ, Adrian Greeve and Frédéric Massart so you can expect it to be of high quality and kept up to date.