Displaying sections based on location

Recall that the location data is passed into PHP via a YUI callback--geo.php:

 /**  * GPS Format free. Restrict access to topics according to user's  geolocation.  *  * @package format_location  * @copyright 2013 Barry Oosthuizen  * @author Barry Oosthuizen  * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later  */ define('AJAX_SCRIPT', true);  require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/config.php'); require_sesskey(); require_login();  $userlatitude = optional_param('latitude', null, PARAM_FLOAT); $userlongitude = optional_param('longitude', null, PARAM_FLOAT);  $location = new stdClass(); $location->userid = $USER->id; $location->latitude = $userlatitude; $location->longitude ...

Get Moodle 3.x Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.