Note: You are currently viewing documentation for Moodle 3.1. Up-to-date documentation for the latest stable version of Moodle is probably available here: Location.

Location: Difference between revisions

From MoodleDocs
(→‎All country codes: info from MDL-56181)
 
(20 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Admin tools}}
{{Managing a Moodle site}}
==Location settings==
==Location settings==
An administrator can change the following location settings in ''Administration > Site administration > Location > Location settings''.
An administrator can change the following location settings in ''Administration > Site administration > Location > Location settings''.


====Default timezone====
===Time zone settings===


This sets the default timezone for date display.
The time zone is used to help convert the raw timestamps in the database to human readable dates and times, for the user who is requesting the page.  


Be sure to first download and/or update the complete list of timezones from ''Site administration > Location > Update timezones'' before setting this.
====Default time zone====
Use this to set the default time zone for your site. This should be the time zone that most users use, or if that is difficult, where you  When available, choose the Area/Location that is proper for you rather than use the UTC settings. These [http://en.wikipedia.org/wiki/Tz_database names are standardized by the IANA].  


An out-of-the-box new installation of Moodle has only a few UTC time zone settings in this list. If you see only those, first update the list first.
Note: As of Moodle 2.9, the older setting and button to allow you to update time zone codes from Moodle.org has been replaced with standard PHP date and time code. If your PHP version is over 6 months old, time zone data should be updated using the [http://pecl.php.net/package/timezonedb PECL timezonedb package].


Is it '''recommended''' that you select a named timezone specific to your region (e.g. America/New_York) instead of a UTC setting if one is available. These settings are aware of [[https://en.wikipedia.org/wiki/Daylight_saving_time local time zone shifts]] such as Summer Time or Daylight Savings Time while UTC is not.  
====Force timezone====
If a particular time zone is forced, users will see the name of the time zone on their edit profile page and will be not be able to change it. If you wish to allow individual users to choose their own time zone, leave this at the default "Users can choose their own time zone."


"Server's local time" here will make Moodle default to the server timezone as defined by the “Default timezone” setting in PHP. 
====Default country====
 
Select the country to appear by default on a new user account page form.  
(When this term appears in the user profile it means something slightly different. See the next setting for more.)
 
====Force default timezone====
Pull down menu to force the user to be in a specific timezone or allow users to individually select their timezone.


This is off by default because when new users are created they will inherit the system default anyway, but are allowed to change it to another location if the are in another time zone or traveling, for instance.
==== Default city====
 
Enter a default city for new user profiles. This may be left blank.
Note: It is important to understand that setting "Server's local time" in a '''User profile''' ''> Timezone'' means whatever is set in the Moodle default timezone. So if the Moodle site default timezone is set, for example, to America/Montreal, the user will not see that in their profile, but will see "Server's local time" instead, but it means America/Montreal.
 
If you do force a timezone for all users, then they will see an explicit timezone instead such as America/Montreal, and will not be able to change it.
 
====Default country====
Select the country to appear by default on a new user account page form.


===IP address lookup===
===IP address lookup===
====GeoIP City data file====
====GeoIP City data file====
Location of GeoIP City binary data file. This is a non-invasive way to determine geographical and other information about  Internet visitors in real-time. This file is not part of Moodle distribution and must be obtained separately from MaxMind.  There is a GeoIPLite version for free.
Location of GeoIP City binary data file. This is a non-invasive way to determine geographical and other information about  Internet visitors in real-time. This file is not part of Moodle distribution and must be obtained separately from MaxMind.  There is a GeoIPLite version for free at [http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz]. Extract the GeoLietCity.dat file and upload it to /moodledata/geoip/GeoLiteCity.dat.
 
You can check to see if the GeoIP data file is available to Moodle by going to: Administration > Site administration > Location > Location settings, under IP Address Lookup.


====Google Maps API key====
====Google Maps API key====
Line 38: Line 32:
'''NOTE:''' There is no longer support for Google maps API V2 as it has been deprecated since 2010. V3 is now used. See here for details: https://developers.google.com/maps/documentation/javascript/tutorial#api_key
'''NOTE:''' There is no longer support for Google maps API V2 as it has been deprecated since 2010. V3 is now used. See here for details: https://developers.google.com/maps/documentation/javascript/tutorial#api_key


After updating the information in this section, IP's that are displayed as a link, such as in reports, when clicked will open new window with a Google Map indicating the location of the IP, if found and if not a private address.
After updating the information in this section, IPs that are displayed as a link, such as in reports, when clicked will open new window with a Google Map indicating the location of the IP, if found and if not a private address.
 
==Update timezones==
 
The update timezones page ''Site administration > Location > Update timezones'' provides administrators with the option to update their local database with new information about world timezones.
 
This is important because of [http://en.wikipedia.org/wiki/Daylight_saving_time daylight saving] changes that many countries  use. You should generally use these regional location settings in preference to UTC unless you have a very specific reason to use UTC instead.
 
If the update is completed with success, Moodle will inform you how many entries were updated and which location was used as a source.
 
This naming convention on the list of Area/Location is based on the IANA Time Zone standard: see [[https://en.wikipedia.org/wiki/Tz_database#Names_of_time_zones here for more details]].
 
Typically, there will be one major city or location chosen to represent the time zone. Countries are not used. So you will need to pick the representative city or location for the time zone you wish Moodle to use.


For example, the following are the standard time zones in the continental U.S.:
====All country codes====
* America/New_York = Eastern Time
This is the list of countries that may be selected in various places, for example in a user's profile. If blank (the default) the list in countries.php in the standard English language pack is used. Otherwise, you can specify a comma-separated list of codes, for example 'GB,FR,ES' in [http://en.wikipedia.org/wiki/ISO_3166-1 ISO-3166-1 format].
* America/Chicago = Central Time
* America/Denver = Mountain Time
* America/Los_Angeles = Pacific Time


However, if you live in the state of Arizona, which does not observe Daylight Savings Time, you should choose America/Phoenix instead of America/Denver in order to properly observer the time change twice a year. Likewise for other exceptional areas in some states like Indiana, which have local time zone changes.
The list of countries is based on the ISO 3166 list of official country short names, but is not exactly the same. See the comment in MDL-56181 for more details.


==See also==
*[http://youtu.be/L-_2N9gIiLo Moodle 2 Administration - Location]  MoodleBites video on YouTube 


[[es:Localización]]
[[es:Localización]]
[[eu:Kokagunea]]
[[eu:Kokagunea]]
[[de:Lokales]]

Latest revision as of 16:47, 29 September 2016

Location settings

An administrator can change the following location settings in Administration > Site administration > Location > Location settings.

Time zone settings

The time zone is used to help convert the raw timestamps in the database to human readable dates and times, for the user who is requesting the page.

Default time zone

Use this to set the default time zone for your site. This should be the time zone that most users use, or if that is difficult, where you When available, choose the Area/Location that is proper for you rather than use the UTC settings. These names are standardized by the IANA.

Note: As of Moodle 2.9, the older setting and button to allow you to update time zone codes from Moodle.org has been replaced with standard PHP date and time code. If your PHP version is over 6 months old, time zone data should be updated using the PECL timezonedb package.

Force timezone

If a particular time zone is forced, users will see the name of the time zone on their edit profile page and will be not be able to change it. If you wish to allow individual users to choose their own time zone, leave this at the default "Users can choose their own time zone."

Default country

Select the country to appear by default on a new user account page form.

Default city

Enter a default city for new user profiles. This may be left blank.

IP address lookup

GeoIP City data file

Location of GeoIP City binary data file. This is a non-invasive way to determine geographical and other information about Internet visitors in real-time. This file is not part of Moodle distribution and must be obtained separately from MaxMind. There is a GeoIPLite version for free at http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz. Extract the GeoLietCity.dat file and upload it to /moodledata/geoip/GeoLiteCity.dat.

You can check to see if the GeoIP data file is available to Moodle by going to: Administration > Site administration > Location > Location settings, under IP Address Lookup.

Google Maps API key

Google Maps for IP address lookup visualization key. The Google Maps API lets you embed Google Maps with JavaScript. This is free.

NOTE: There is no longer support for Google maps API V2 as it has been deprecated since 2010. V3 is now used. See here for details: https://developers.google.com/maps/documentation/javascript/tutorial#api_key

After updating the information in this section, IPs that are displayed as a link, such as in reports, when clicked will open new window with a Google Map indicating the location of the IP, if found and if not a private address.

All country codes

This is the list of countries that may be selected in various places, for example in a user's profile. If blank (the default) the list in countries.php in the standard English language pack is used. Otherwise, you can specify a comma-separated list of codes, for example 'GB,FR,ES' in ISO-3166-1 format.

The list of countries is based on the ISO 3166 list of official country short names, but is not exactly the same. See the comment in MDL-56181 for more details.