Geolocation block

Blocks ::: block_gps
Maintained by Robert Schrenk, Zentrum für Lernmanagement, Andreas Riepl
This block works together with the availability condition "gps" and allows a user to determine the current gps location. The location is stored in the current session and is used by the availability condition. Furthermore the block can show the locations in a course by list or on an interactive map.
Latest release:
168 sites
167 downloads
12 fans
Current versions available: 1

This block works together with the availability condition "gps" and allows a user to determine the current gps location. The location is stored in the current session and is used by the availability condition. Furthermore the block can show the locations in a course by list or on an interactive map.

No location data is stored persistently! A condition, however, can be configured that Moodle remembers persistently if it had been unlocked once.

Attention: your site needs to be run under https to use geolocation!

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2

Contributors

Robert Schrenk (Lead maintainer)
Zentrum für Lernmanagement
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Plugins bot
    Mon, 30 July 2018, 11:20 PM
    Approval issue created: CONTRIB-7408
  • Joel Salazar Ramirez
    Thu, 2 Dec 2021, 11:31 PM
    Hi There, the block geolocation is great but haves an issue: Redirects to login page, even whit force login disabled.

    It happened with moodle 3.10 and 3.11, so I make this comment for general knowledge.
  • Michael Smith
    Wed, 8 Dec 2021, 2:57 AM
    Is there a way to expand the "accuracy" setting to more than 20 Kilometers. I am wanting to allow anyone in a particular City Metro area - or a larger region. something like 200-300 Kilometers
  • Robert Schrenk
    Thu, 9 Dec 2021, 3:33 PM
    Hello, I added your wish to the list of feature requests. Perhaps it is the best if it is just a numeric text field, where you enter the meters yourself....
  • Richard de Keyzer
    Sat, 8 Jan 2022, 7:23 PM
    Dear Robert, In the geolocation blok the map is empty. So your third screenshot (the opentreetmap) my me is white. I see no map. I can't see the map, not in my browser on my pc, not in de moodle app on my smartphone, not in the browser on my smartphone. , noDo you have any idee what's the problem? My position (gps) is recognized en changes every time I walk. Thank you. Richard
  • Robert Schrenk
    Sat, 8 Jan 2022, 7:39 PM
    Hello Richard, the map is embedded from open street map, so maybe your browser blocks this. Do you have content security enabled in the page header?
  • Richard de Keyzer
    Mon, 10 Jan 2022, 3:36 AM
    Hello Robert, thank you for your quick reply. On the client side (in the browser) I put all security off. But maybe it is on the server side. When I see the blank box (no map is visible) and I push
    the blue location tab there comes a warning: Invalid record. Cant't find the data record (in Dutch: gegevensrecord) in the databasetable of the course. Moodle 3.11.4+ . php 7.4.27
    Geolocationblock 2.5 (2021121600)
    I hope this information can help to find a solution. Thank you. Richard.
  • Robert Schrenk
    Mon, 10 Jan 2022, 5:36 PM
    Such message may indicate a bug. Please open an issue at https://github.com/center-for-learning-management/moodle-block_gps/issues, but please provide more information on the error. You can enable debugging and grab the error, or check the error logs of your webserver respectively. Kind regards
  • Andriy Semenets
    Sat, 22 Jan 2022, 1:10 AM
    Faced the same issue as Richard wrote. Have submitted an issue https://github.com/center-for-learning-management/moodle-block_gps/issues/5
  • Rafael Calixto Avelar Marcelino
    Wed, 27 Sept 2023, 9:17 PM
    Hello, I'd like to ask you a question. When I add this block to a room, how will I be able to place a location restriction, so that only students who are in a certain location can access it? Or see the location of students and give attendance only to those who are in a certain location.
    I tried to add it to my Moodle, but when I click on "Update", the message "invalidrecord" appears.
  • Robert Schrenk
    Wed, 27 Sept 2023, 11:01 PM
    Please read the first sentence of the description: „This block works together with the availability condition "gps"“.
  • Rafael Calixto Avelar Marcelino
    Thu, 28 Sept 2023, 12:31 AM
    Got it, but mine doesn't show the logs as in screenshot 2
  • Robert Schrenk
    Thu, 28 Sept 2023, 12:32 AM
    You need to configure the location as condition in a resource or activity.
Please login to post comments