Activities: Treasure Hunt

Maintained by Picture of Juan Pablo de CastroJuan Pablo de Castro
Outdoor, indoor and virtual-map treasure-chases with geolocation and QR codes. This module for Moodle allows to organize outdoor-serious-games with your students. TreasureHunt implements a browser-based play application (no need to install any native app) and a geographical editor for encoding the stages of the game. The game can be configured with a range of options that make the module to be very flexible and useful in many situations: individual/team, moving/desktop-marking, scoring from time, position, completion, etc. Languages: Chinese, English, German, Greek, Portuguese, Russian, Spanish, more to come...
996 sites
51 fans
Current versions available: 2


Go to the presentation page for graphical descriptions and tutorials. (Descripción y tutoriales disponible en la página en español).

Outdoor treasure-chases with geolocation.

This module for Moodle allows to organize outdoor-serious-games with your students. TreasureHunt implements a browser-based play application (no need to install any native app) and a geographical editor for encoding the stages of the game. The game can be configured with a range of options that makes the module to be very flexible and useful in many situations: individual/team, moving/desktop-marking, scoring from time, position, completion, etc.


  1. Install from the plugins menu or manually unzip, and copy into Moodle's /mod folder
  2. visit administration page to install module
  3. configure default settings for your site
  4. use in any course as wished


  1. create an instance of the activity
  2. create one or more roads to be followed by your "hunters"
  3. create a set of stages in each road.
  4. draw the location of the stages with the built-in GIS editor. Optionally enter or generate a QR code to be scanned to discover that location.
  5. write smart and educational clues that point to the next stage. Optionally, write a multiple-choice question to double-check the discovery of the stage
  6. select the modality of the treasure hunt: individual or grouped (you will need to create the groups and groupings of students).
  7. adjust the grading method and penalisations.
  8. let your students play the game.

Grading of the module

The module will produce a grade for every student (or team) running the hunt. The proposed schema is the following:

Choose from:

  •  Grade from time (absolute or relative): the winner of the hunt marks the best time. The grade is calculated by interpolating the finishing time being 50 the end time of the hunt and 100 the best finishing time. The players that did not finish the hunt receive a grade under 50 calculated just by the number of riddles solved.
  •  Grade from riddles: each player (or team) scores proportionally by number of riddles solved, being 100 when a road is completely solved, and 0 when no riddle is solved.
  •  Grade from position: The score is calculated by interpolating the position in the ranking, being 100 the score for the first player and 50 for the last player. The players that did not finish the hunt receive a grade under 50 calculated just by the number of riddles solved.

For all these schemas optionally it can penalize by location failures and wrong answers.

Penalization is expressed in % of the grade. Per example, if penalization is 5, a player with 3 failures will penalize his grade by 15%, that is, will receive 85% of the grade calculated by the rest of the criteria.

Releases summary

  • v1.4.0 Choice between 3 different playpage styles. New bootstrap-based play page more compatible and light-weight. Street view link from play page.
  • v1.3.0 Dates and times update in real-time. Interface pulishment. Workaround to Babel compiler conflict in player page.
  • v1.2.22 UI for QR Scanner in edit form improved. QR scanner fixed for Xiaomi Redmi S2. Player UI improved in question section.
  • v1.2.18 Fixed compatibility of GIS editor with Edge browser when using jqueryui > 1.11.
  • v1.2.17 Auto update timer in GPX tracker.
  • v1.2.15 Full compatibility of QRScanner with IOS 11 (iPhone && iPad).
  • v1.2.14 Fix camera preview sizes. Implement switching cameras.
  • v1.2.13 Change QR scanning library to fix the firefox regression.
  • v1.2.12 Fix for compatibility with Moodle 2.9.x.
  • v1.2.11 Link to online tutorial added to edit page.
  • v1.2.10 Fix support to long texts in clues. Left panel shows a truncated text.
  • v1.2.7 Compatibility with MSSQL
  • v1.2.6 Custom image maps. Validation form fixed.
  • v1.2.5 Non-geographic images as base of the game.
  • v1.2.3 Custom image maps. Support for WMS and uploaded images.
  • v1.2.1 SVG images render with vector quality.
  • v1.2.0 Custom uploaded images. Now the map can be customized in several ways:
    • Custom overlays from uploaded images or WMS layers.
    • Custom base maps from uploaded images or WMS layers.
    • Override default base maps with uploaded imgaes or WMS layers.
    • Disable geographical tools to use images not related to the terrain.
  • Release v1.1.0 includes support for QR codes. It is very useful indoor (i.e. museums).
  • Release v1.0.0 first production-ready release.

Note on QR Codes support

  • The stages can be solved by location or by scanning a QRCode. It is useful indoor or where the GPS gives a bad precission.
  • The module includes a webRTC-based code scanner that works at least in Chrome and Firefox browsers on Android. Some specific android phones may have problems with scanning codes from the browser.
  • The module includes a pre-test procedure if the game includes QRcodes.
  • You can use existent QR labels or generate your own directly from the edit-stage page.


Potential privacy issues

Upon teachers' activation the module can record the geo-location of the students during a game as a sequence of points.


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5
Screenshot #6
Screenshot #7
Screenshot #8
Screenshot #9


Picture of Juan Pablo de Castro
Juan Pablo de Castro (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Admin DBG Wiehl
    Sun, Jul 1, 2018, 11:30 PM
    Thank you for this great plugin.
    Although it is barely/not allowed to track students while hunting it is nevertheless an enrichment.
    I discovered some problems with different browsers. Chrome (v67) is working well, Safari and Edge doesn't support the interface (the icons for drawing the target locations and for saving the project are geyed out). Would be great to see this fine plugin working for all modern browser types..
  • Picture of Juan Pablo de Castro
    Thu, Jul 5, 2018, 8:18 PM
    Thank you for reporting that issue. It seems to be caused by new versions of Moodle internal libraries. I have released version 1.2.18 that addresses that issue. I can't test it with Safari but it should work like it does in Chrome, Firefox, Edge.
    Best regards.
  • Picture of Jochem Puts
    Fri, Aug 3, 2018, 5:33 AM
    Hi Juan,

    Great plug-in, can't wait to try it. Almost a shame its a vacation right now smile

    Two questions:

    -I can't seem to uncheck the "Students play in groups" option, the checkbox is disabled. Is there any reason for that and is there a way to let them play individually?

    -Is there a time limit in which a Hunt needs to be finished after they start it? Is it, for example, possible to have a quest that takes weeks to complete in which I give them a clue for the new stage every week or so?

    Thanks in advance!
  • Picture of Juan Pablo de Castro
    Mon, Aug 6, 2018, 5:10 PM
    Hi Jochem, thank you for your kind words.
    I will try to answer your questions:
    1) There is no code for disabling the checkbox "Students play in groups" so it never should be disabled, and can be checked/unchecked every time. Moreover, the default value is "play individually". Please send me a screenshot. Let me take a look to your screen and I'll try to guess what is happening. Without additional infor I'd bet for a interaction with the Theme of the page (try to change the theme and see if this changes the problem).

    2.a) The activity can be constrained in time with the fields you can find in the "Availability" group in the settings.
    2.b) You can not define a relative time, i.e. "3 weeks after you start the hunt", but you can "incentivate" this by using a grading strategy in which the score depends on the duration of the hunt.
    2.c) The clues are provided instantly when you achieve the objectives for each stage (location, QRCode, short-question or completion of any activity in Moodle). Hence, you can't control manually the times of the clues using ONLY the Treasure Hunt module. But you can control the timing of the hunt externalizing the clues or the completion or a stage to other activities of Moodle.
    In example:
    A) Each clue shown refers to pages in a book or PDFs that you publish weekly.
    B) To surpass a stage the students must "complete" an activity of Moodle (i.e. pass a quiz, post to a forum, read a document, etc). These activities can be time-controlled.

    There are many creative ways of using this module due to its integration in Moodle.

    I hope this ideas help you.

    Best regards... and happy vacations.
  • Picture of Jochem Puts
    Mon, Aug 13, 2018, 2:06 AM
    Thanks for your comment! Regarding Question #1, I changed the theme but the problem remains. I included a screenshot:

    Unfortunately the mouse cursus didn't come through in the screenshot but it changes in a little "stop" sign when I want to click it and the box is disabled....

  • Picture of Juan Pablo de Castro
    Thu, Aug 16, 2018, 6:39 PM
    Sorry but I can't reproduce the problem. Please open a new Issue at the bugtracker and try to document your environment: database, theme, messages in the browser's console, etc.
    I will try to diagnose and fix you issue as much as I can.
  • Picture of Arjun Sankirt
    Wed, Aug 22, 2018, 1:59 PM
    Hi Juan
    I have installed the latest version of Treasurehunt, my browser is also updated (Mozilla Firefox); the 'save' and 'delete' buttons do not work. they are greyed out. Is it a browser compatibility problem? do you have any plan to upgrade the plugin and solve the problem? thanks
  • Picture of Juan Pablo de Castro
    Wed, Aug 22, 2018, 3:11 PM
    Hi Arjun,
    have you select and/or modify any polygon first?
    Those buttons should be enabled after you:
    a) select a stage in the left list.
    b) press "Add" or "Edit" button on the top bar (to enter polygon edition mode).
    c) click to draw points of a new polygon or click on an existent polygon to edit it by addind or moving a vertex.

    At this point the "save" and/or "delete" buttons become clickable to allow deleting the selected polygon or to commit current changes.

    Can you check if this guide works for you? I have tested the GIS editor in Firefox and it works in my environment.

    Thank you for your time and interest.
  • Picture of Arjun Sankirt
    Thu, Aug 23, 2018, 3:05 AM
    The old version was working fine, after updating to the newer version the delete and save buttons are not clickable even when I try to edit a stage using the Add or Modify buttons as you mentioned ( 'Playing without moving' is left unchecked as default. Whenever I check 'Playing without moving' the save&delete work fine; but when unchecked the problem persists.
  • Picture of Juan Pablo de Castro
    Thu, Oct 4, 2018, 5:13 PM
    I'm sorry for your inconveniences Arjun. But I'm still not able to reproduce the problem. Could you test with another computer to see if the problem may be related to your personalized environment?
  • Picture of Juan Pablo de Castro
    Mon, Oct 7, 2019, 7:11 PM
    Hello everybody, the official stats show that more than two hundred sites are curently using Treasurehunt! Its very exciting and we are looking forward reading about your experiences. Some feedback about your usage of Treasurehunt will be very welcomed. Thank you.
  • Picture of Payal Kesarwani
    Sun, Mar 1, 2020, 4:13 AM
    Can anyone help me in setup of this model it gives an error of SQL ERROR [ mysql4 ]

    Access denied for user
  • Picture of Juan Pablo de Castro
    Sun, Mar 1, 2020, 6:39 PM
    I'll do my best to help you. Please report the issue at the bugtracker and give as most details you can about your environment (versions)
  • Picture of Strawbite Learning Team
    Tue, Mar 3, 2020, 12:03 AM
    My site stopped responding on Version 3.8, Site Administration tabs stopped working.
  • Picture of Juan Pablo de Castro
    Tue, Mar 3, 2020, 2:31 AM
    Please, update to version 1.3.1 that side-effect is fixed there. Let me know if this fix the issue.
1 2
Please login to post comments