General plugins

Treasurehunt activity: Outdoor treasure-chases with geolocation.

 
Picture of Juan Pablo de Castro
Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

We at EdUValab have proudly released the plugin https://moodle.org/plugins/mod_treasurehunt for Moodle.

This module 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.

Feel free to let me know about any bugs or improvements (preferably via the Bugs & Issues link, on the page linked above).

 
Average of ratings: Useful (1)
Picture of Kees Koopman
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Hi,

A great plugin! Thanks.

Something works not good; i get errors.

Sincerely, Kees

 
Average of ratings: -
Picture of Juan Pablo de Castro
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

I'm sorry about hearing that. Please give us details and we will fix the errors as soon as possible.

You can use this forum, the bug tracker at https://github.com/juacas/moodle-mod_treasurehunt/issues or directly to my email.

 
Average of ratings: -
Picture of Kees Koopman
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Hi Juan Pablo,

Thank you very much for the great plug-in TreasureHunt! It is great!

I'm having a problem. If I say to a stage that I want a restriction (Completed Activitity) and I choose a quiz, then it goes wrong. If I do the quiz and thereby meet the conditions (get a grade), TreasureHunt does not accept that.

Thanks for the effort.
Sincerely,
Kees Koopman.

 
Average of ratings: -
Picture of Juan Pablo de Castro
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

In version 1.1.5 this bug if fixed.

 
Average of ratings: -
Picture of Kees Koopman
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Hi Juan Pablo,

The text of the question and the answers to any random stage is almost white on white (white letters on white background).

Is that only with my smartphone (Samsung S8 +) or is it another problem?

Regards, Kees.

 
Average of ratings: -
Picture of Juan Pablo de Castro
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Please, can you send a screenshot of your problem?

As a check list:

  • Check that the text of your question have no color markup. View the HTML code in the Moodle editor using the button "<>". Send it to me if you want.
  • Check the Theme. It will be useful to know details about the theme installed on your Moodle server. Maybe, it could interfere with the Style Sheets of the player app.

Regards.


 
Average of ratings: Useful (1)
Picture of Kees Koopman
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

The HTML-code:

.


The Result (in theme Essential):

.

The Result (in theme Boost):

.

 
Average of ratings: -
Picture of Juan Pablo de Castro
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

You have version v1.1.3 of the Treasurehunt published with this issue solved.

It was a conflict between styles in your theme. Thank you for find it out!

 
Average of ratings: -
Picture of Kees Koopman
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Hi Juan Pablo,


Request

If you use TreasureHunt as an outdoor experience, you can uncheck the location through your GPS location, optionally supplemented with a QR code.

You can also choose "without moving".


I would also like to choose for only QR codes, so without a GPS location.

This can work well within a building, museum etc.

Now, next to QR, you can also check the GPS location. But if the places are 10 meters apart, GPS will always be good. And that's not the intention smile.


Sincerely,

Kees.

 
Average of ratings: -
Picture of Juan Pablo de Castro
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 
By design, the GPS check is very restrictive, that is, only if the position is "fully inside" the marked area the stage is checked.

This implies that if your polygons are small (indicating the actual place of the QR mark) the probability of a random GPS coordinate being inside is nearly negligible.

Hence, the sentence "But if the places are 10 meters apart, GPS will always be good" seems to be against the designed behaviour.

If you can redraw your polygons that way, the GPS position indoor becomes practically useless.

Please, can you verify that the polygons you drew in your stages do not overlap nor are larger than needed?



 
Average of ratings: -
Picture of Kees Koopman
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Hi Juan Pablo,

Thanks for your quick response.

If I make the polygons very small, then the student is indeed required to use the QR code. Problem solved.

I will try the QR codes this week.

Thanks for all the effort!

Regards, Kees.

 
Average of ratings: -
Picture of Juan Pablo de Castro
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Actually, it is not needed to make artificially-tiny polygons. Just represent the actual area in which you want your students to be.

Please note that reading QRCodes is a feature not very stable in web apps. We have experienced a quite inconsistent behaviour from device to device. Let us know if your device works correctly.

NOTA: Be aware that ehen drawing areas outdoor you should draw an extra buffer around the areas to hold 10 or 20 meters of error in the GPS signals (unavoidable by software).

 
Average of ratings: -
Picture of Kees Koopman
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Hi Juan Paulo,

Thank you for your response.

When I did a first test with QR codes, I noticed that I could choose to confirm with QR code and also with GPS.

You write: "Actually, it is not necessary to make artificially-tiny polygons. Just represent the actual area in which you want your students to be."

But if I place two QR codes in one area, then it will not work. I then click on GPS and that choice is always good.

QR codes on smartphones are not always good, as you already indicated. That was also one of the problems I was facing.

Thank you for all the input and help! It will be a happy plug-in!

Sincerely,

Kees.

 
Average of ratings: -
Picture of Kees Koopman
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Hi Juan Pablo,

There he is again smile.

I made a TreasureHunt with four points.

1. Without moving

2. QR code

3. QR code

4. Without moving

The QR code is scanned and accepted (I can continue the hunt) but ... the confirmation will not be saved!

Below are some screenshots.

Success!

Kees.

.

nr. 5 --> Stage 2 QR code
nr. 6 --> Stage 3 QR code


.

-----------------------------------

.

Nrs. 2 en 3 are the QR codes 2 en 3

 
Average of ratings: -
Picture of Juan Pablo de Castro
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Thank you for your feedback. It seems to be a problem with the text of the report.

Can I suppose that every thing else is working ok? (The hunt can continue normally).

 
Average of ratings: -
Picture of Juan Pablo de Castro
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Please check v1.1.4 for a fix to this issue.

Let me know if it's ok.

 
Average of ratings: -
Picture of Kees Koopman
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Hi Juan Pablo,

Although the QR info is not saved, I can continue.

I have submitted the update request (to 1.1.4) with our Moodle provider. As soon as I know more, I'll be back here.

Thank you very much for all the patience and effort!


Regards, Kees.

 
Average of ratings: -
Picture of Juan Pablo de Castro
New version v1.2.0 with "custom maps"
 

Release v1.2.0 includes custom maps (among other fixes).

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.
As an example, you can create a natural-sciences treasure-hunt over a human body looking for organs of diseases.

Tell us if you find it useful.


 
Average of ratings: Useful (1)
Picture of Peter Loeffler
Re: New version v1.2.0 with "custom maps"
 

Hi Juan Pablo

first: thats a GREAT plugin and adding custom map support is a VERY GOOD idea!


but: I have problems with hunts, that I created in the previous version. without entering correct custom-map data (WMs-Server and positions) it does not show anything and the edit-page of the plugin is not save-able


could you please provide any documentation on howto use e.g. OSM in the plugin?


thanks

peter 



 
Average of ratings: -
Picture of Juan Pablo de Castro
Re: New version v1.2.0 with "custom maps"
 

Thank you for your kind words... and I'm very sorry you have problems using Treasurehunt.

I'm afraid I don't understand your issue. Do you mean that a previously working Hunt is no longer usable after the update?

Are you trying to use a custom WMS server for your activity?  In this case, please post your configuration fields here to analyse them.

About OSM: by default Treasurehunt uses Open Street Map as base layer. Hence, you need to do nothing to use OSM. Moreover, OSM is not a WMS service, hence it can't be added as a custom WMS map.

I hope this clues help you in narrowing the problem you are facing.


Best regards.


PD: It could be very useful to take a look to that faulty edit-page. Can you post a screenshot? The content of the errors in the Javascript console would be very handy also (opened usually with F12).

 
Average of ratings: -
Picture of Peter Loeffler
Re: New version v1.2.0 with "custom maps"
 

the error occures, when I open the settings of the hunt, change anything in description or so and click on "save".
the fileds "custom layer" and all 4 lat/long fields get red indicationg they need an entry. saving is not done


 
Average of ratings: -
Picture of Juan Pablo de Castro
Re: New version v1.2.0 with "custom maps"
 

Thanks,  I got it.

I've just released v1.2.3 with the fix to this issue. Sorry for the inconvenience.

Regards.

 
Average of ratings: -
Picture of Peter Loeffler
Re: New version v1.2.0 with "custom maps"
 

Thank you very very much for your quick response!


kind regards

peter

 
Average of ratings: -
Picture of jiyun Lu
回复: New version v1.2.0 with "custom maps"
 
It was a great pulgin. 

I have a problem,how can I set up a custom maps.

thank you!!


 
Average of ratings: -
Picture of Juan Pablo de Castro
Re: 回复: New version v1.2.0 with "custom maps"
 

Dear jiyun,


Can you tell me what are you trying to get? Describe the type of map you wanna use and I will guide you through the configuration.
Please post the full URL of the WMS you're interested in and the names of the layers. In order to use WMS layers some knowledge of the WMS standard is needed. I will take a look to your case.
Best regards

 
Average of ratings: -
Picture of jiyun Lu
回复: Re: 回复: New version v1.2.0 with "custom maps"
 
Dear Hi Juan Pablo,

     Thank you very much for your reply. I want to add a map of Hangzhou, China, to the site, but I don't know how to get WMS service and layer information. I don't know much about this aspect. I hope if you could give help, this is a very good plugin, I want to be able to use it in the course. Thank you very much for your help~

Ps: I can not use it  in the IOS system(in china),hope you can help me, thank you. 

 
Average of ratings: -
Picture of Juan Pablo de Castro
Re: 回复: Re: 回复: New version v1.2.0 with "custom maps"
 
Are you trying to use a specific map of Hangzhou that you have scanned or something similar?


If you just wanna use a standard terrain map maybe Open Street Map is enough. In this case you don't need to configure nothing additional.

Share with me the details of your idea.

About your mention to the use with IOS in China, can be more specific?

 
Average of ratings: -
Picture of jiyun Lu
回复: Re: 回复: Re: 回复: New version v1.2.0 with "custom maps"
 
Dear Juan Pablo de Castro I have slove this problem successfully,thank you very much~~
 
Average of ratings: -
Picture of Gregg Harrison
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

This activity looks very impressive. I am hoping to use it produce a 'getting to know the campus' activity but am unsure of how small a scale it will operate within using GPS. Also I am finding it difficult to create the roads. It is obviously my misunderstanding of the process but the pencil (in the road icon) simply takes me to the editing page, I cannot DRAW the road as such. Apologies if I am asking a silly question.

 
Average of ratings: -
Picture of Juan Pablo de Castro
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Hi Gregg,

it seems that the user interface is a bit misleading...

Please, take a look at the tutorial at https://juacas.github.io/moodle-mod_treasurehunt/create_activity.html and be aware about:

  • The pencil icons in the roads and stages are for editing the description and other textual parameters.
  • The pencil icon in the upper menu bar is for modifying geometries on the map.
  • The plus icon in the upper menu bar is for adding new geometries to a stage (first select the stage in the left panel).
  • The disk icon in the upper menu bar is for saving the changes.

Hope this can help you. Any suggestion is welcomed.

Let us know how this module works in your campus.


Greetings

 
Average of ratings: -
Picture of Juan Pablo de Castro
'Getting to know the campus' activity with Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Hi Gregg,

Have you succeeded with your Treasurehunt implementation? Your idea is very good and seems to be very productive.

Please let us know if your use-case rendered positive results to your institution.


Regards

 
Average of ratings: -
Picture of Michael Roberts
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Hi there,

I've just started to play with your plugin as I can see alot of uses in my classroom. However, I'm having a few issues with it. I'm trying to use the app with QR codes only (I'm a Chemistry teacher and thinking about sticking QR codes on a lot of the various types of glassware!).

When using an iPhone (iOS 11.2.5), Safari, I'm asked for permission to access the camera. I've clicked accept but when trying to scan QR codes, I'm getting a pop-up box with "cancel" and no image. No data seems to be passed from the camera to the module. I've also tested it on Firefox on my desktop PC and getting the same issue. I'm wondering if there's a setting that I've missed somewhere.

Also, I tried using the iOS Moodle Mobile app. This module is currently not supported in there and it asks to open a browser window. Will this be added to the Mobile functionality?

Many thanks, and I'm feeling hopeful with this :D

Michael Roberts

PS: I've had a browse of the code at Github... but I'm a complete beginner with Javascript, having just completed a basic course on it!

 
Average of ratings: -
Picture of Juan Pablo de Castro
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Hello Michael,

thank you very much for notifying the malfunction with Firefox. It seems that Firefox has been updated in a way that broke the QR Scanner. 

Before today, we were using https://webqr.com/ project but now it doesn't work with Safari (IOS) nor Firefox. Now we have reimplemented the QR support using the library at https://schmich.github.io/instascan/ that aparently works with Chrome and Firefox. Unfortunately, according to Instascan documentation:

"Instascan works on non-iOS platforms in any browser that supports the WebRTC/getUserMedia API, which currently includes Chome, Firefox, Opera, and Edge. IE and Safari are not supported.
Instascan does not work on iOS since Apple does not yet support WebRTC in WebKit and forces other browser vendors (Chrome, Firefox, Opera) to use their implementation of WebKit. Apple is actively working on WebRTC support in WebKit."

Actually, Edge doesn't support WebRTC. sad

We have just released the version 1.2.13 that works with Chrome and Firefox in PCs and Android phones (please report your experience here https://github.com/juacas/moodle-mod_treasurehunt/issues/14).

About the Mobile App: We worked hard to provide a seamless experience using only a browser for playing the treasurehunt. We believe that students and  teachers should be able to use the activity without installing native apps.

Moreover,  we have no resources to work on porting to an application framework. Maybe someone in the community would collaborate on that. wink

 PD: Don't forget to use a server with https enabled.
 
Average of ratings: -
Picture of Michael Roberts
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Thank you for the reply and the updated version!

I've tested it on Firefox and everything is working as expected. It also actually works on Safari (iPhone 7, iOS 11) although I couldn't get it to use the back camera, only the facetime camera. I'll keep playing around with it.

I'll add this report to the github as well.  :D

 
Average of ratings: -
Picture of Juan Pablo de Castro
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 
It's a pleasant surprise hearing that it works in iPhone already!


Please check version v1.2.14 in which I have implemented the switching of cameras. It works in Chrome and Firefox both in PC and Android phones. Let me know if it works in iPhone too.

 
Average of ratings: Useful (1)
Picture of Juan Pablo de Castro
Re: Treasurehunt activity: Outdoor treasure-chases with geolocation.
 

Dear Michael,

please, check release 1.2.15. Now the QR scanner works also in iPhones with both cameras.

Good luck with your creative way of using Treasurehunt in a chemistry lab!

Let me know if everything is ok.

Regards.

 
Average of ratings: Useful (1)
Picture of Juan Pablo de Castro
Help requested: Treasurehunt activity
 

Hello everybody,

we need help from our users in order to know how the module is working for you and what drawbacks can be addressed.

Please, report us (here in the forum, in the bugtracker or privately by email) how it is doing for you (bad or good experiences).

Best regards.

 
Average of ratings: -
Picture of Juha Martikainen
Re: Help requested: Treasurehunt activity
 

Hi

Promising plugin, but we can't get it to work with Moodle 3.4.4 and PostgreSql. The debug is
Debug info: ERROR: syntax error at or near "'user'"
LINE 1: SELECT a.id, a.groupid as 'user', r.position, a.timecreated,...
^
SELECT a.id, a.groupid as 'user', r.position, a.timecreated, CASE WHEN EXISTS(SELECT 1 FROM mdl_treasurehunt_stages ri INNER JOIN mdl_treasurehunt_attempts at ON at.stageid=ri.id WHERE ri.position=r.position AND ri.roadid=r.roadid AND at.groupid=a.groupid AND at.penalty=1) THEN 1 ELSE 0 end as withfailures, CASE WHEN EXISTS(SELECT 1 FROM mdl_treasurehunt_stages ri INNER JOIN mdl_treasurehunt_attempts at ON at.stageid=ri.id WHERE ri.position=r.position AND ri.roadid=r.roadid AND at.groupid=a.groupid AND at.success=1 AND (at.type='location' OR at.type='qr')) THEN 1 ELSE 0 end as success FROM mdl_treasurehunt_attempts a INNER JOIN mdl_treasurehunt_stages r ON a.stageid=r.id INNER JOIN mdl_treasurehunt_roads ro ON r.roadid=ro.id WHERE ro.treasurehuntid=$1 AND a.groupid != 0 order by r.position, 'user',a.id,r.roadid
[array (
0 => '2',
)]
Error code: dmlreadexception

And Stacktrace :

  • line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 242 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
  • line 778 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
  • line 1446 of /mod/treasurehunt/locallib.php: call to pgsql_native_moodle_database->get_records_sql()
  • line 2087 of /mod/treasurehunt/locallib.php: call to treasurehunt_get_list_participants_and_attempts_in_roads()
  • line 123 of /mod/treasurehunt/view.php: call to treasurehunt_view_users_progress_table()
Best regards!
 
Average of ratings: -
Picture of Juan Pablo de Castro
Re: Help requested: Treasurehunt activity
 

I'd just released v1.2.20 with this issue addressed.

Please report any other issue with PostgreSql. The module is mainly tested with mySQL and still could be some incompatibilities hidden.

Thank You for your understanding.

Best regards.

 
Average of ratings: -
Picture of Juha Martikainen
Re: Help requested: Treasurehunt activity
 

Hi, it seems to working with the new update. We will test some more and get back to you if there are any problems.


Br

Juha

 
Average of ratings: -