Feature Wiki

Information about planned and released features

Tabs

gps controlled section

1 Requirements

To create learning scenarios which are based on the location of the user, sections of a page are controllable based on the geo-coordinates (e.g. GPS, Galileo, etc.).

The section will be activated / deactivated if the browser supports the geolocation API and the current location is within a defined distance to the target location (see settings mockup).

Update: The ILIAS Map-Input-Element will be used instead of plain longitude/latitude inputs.

1.1 Future Outlook

Availability via geolocation API could also be implemented for all ILIAS-objects which have "availability settings" right now. The behaviour and settings should be the same. This is however not part of this feature request.

1.2 Mockups / Example Code

Here is php code i found to calculate the circumference:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
1.@mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS) OR die("Keine Verbindung zur Datenbank.<br>Fehlermeldung: ".mysql_error());
 
 
2.@mysql_select_db(MYSQL_DATABASE) OR die("Konnte Datenbank nicht benutzen.<br>Fehlermeldung: ".mysql_error());
 
 
3.
 
 
4.// Koordinaten des Ortes
 
 
5.$ort = "Velden";
 
 
6.$ursprungsbreite = 48.3667;
 
 
7.$ursprungslaenge = 12.25;
 
 
8.
 
 
9.$entf = 40; // max. Km-Entfernung von Startort
 
 
10.echo "Folgende grössere Orte liegen im Radius von $entf km um $ort:<br><br>";
 
 
11.
 
 
12.$alpha = 180*$entf/(6378137/1000*3.14159);
 
 
13.
 
 
14.$geo1 = $ursprungsbreite-$alpha;
 
 
15.$geo2 = $ursprungsbreite+$alpha;
 
 
16.$geo3 = $ursprungslaenge-$alpha;
 
 
17.$geo4 = $ursprungslaenge+$alpha;
 
 
18.
 
 
19.
 
 
20.$abfrage = mysql_query("SELECT * FROM `$tabelle` WHERE (`breite` >= '$geo1') AND (`breite` <= '$geo2') AND (`laenge` >= '$geo3') AND (`laenge` <= '$geo4')");
 
 
21.
 
 
22.
 
 
23.$a = $ursprungsbreite/180*3.14159;
 
 
24.$b = $ursprungslaenge/180*3.14159;
 
 
25.
 
 
26.$z = 1;
 
 
27.
 
 
28.while($ds = mysql_fetch_assoc($abfrage)) {
 
 
29.
 
 
30.$c = $ds['breite'];
 
 
31.$d = $ds['laenge'];
 
 
32.$c = $c/180*3.14159;
 
 
33.$d = $d/180*3.14159;
 
 
34.
 
 
35.$e = sin($a)*sin($c);
 
 
36.$f = cos($a)*cos($c)*cos($d-$b);
 
 
37.$g = acos($e + $f);
 
 
38.$h = $g * 6378.137;
 
 
39.$ausgabe = sprintf("%01.2f", $h);
 
 
40.if($ausgabe > $entf) {
 
 
41. continue;
 
 
42. }
 
 
43.$ausgabe = str_replace(".", ",", $ausgabe);
 
 
44.
 
 
45.echo "$z - Nach ".$ds['name_int']." sind es $ausgabe km.<br>";
 
 
46.$z++;
 
 
47.}

2 Additional Information

  • Idea / concept: Hesse, Joel [Joel_Hesse] Parfümerie Douglas GmbH
  • Interest in funding: (please indicate if you are interested/able to fund this feature)
  • Maintainer: (will be set by Jour Fixe / maintainer)
  • Implementation of the feature is done by (will be set by Jour Fixe / maintainer)
  • Testcases by: (please add your name if you want to create the testcases for this feature)

3 Discussion

Killing, Alexander [alex], 20 May 2016: http://www.w3schools.com/html/html5_geolocation.asp. Wouldn't it be nicer to use the existing MAP-Input element in ILIAS instead of entering coordinates?

Hesse, Joel [Joel_Hesse] yes, absolute. a map is more comfortable.

Killing, Alexander [alex], 27 June 2016: Are there other parties interested in this? I fear it may not work very reliably, since lots of devices/browser may not support this information or have it deactivated.

Kiegel, Colin [kiegel] 2016-06-27: The geolocation-feature seems very widespread: http://caniuse.com/#feat=geolocation. The user has to allow the site to use it. I think, the use case is pretty much the same as with the learning location plugin - but without the need for an "app". IMO it makes a lot of sense, but it should not be named "GPS", but only geolocation.

IMO the core question is, how much additional functionality can we pack into the block-element of the page editor. Maybe it would be better to implement a generic plugin-slot for availability of ILIAS objects and the (block-)elements of the page editor. A geolocation plugin could then provide availability-criteria based on the users coordinates.

Hesse, Joel [Joel_Hesse] @alex i understand your aspects and would go along up to a point, but there are some more features on many websites in use, which might not work due to the clients browser like html5, flash, javascript etc.

But if ILIAS wants to get serious about mobile device usage, i think ILIAS should offer much more than only a responsive design.

As you know, there is a dedicated app for learning scenarios using gps, so it seems to be useful.
When a website can be able to use gps sensors of the mobile device, a native app shouldn't be the solution.
In my opinion its much smarter, if the website uses the full range of possibilities instead of using a separate app, using a plugin slot etc.
In some scenarios Its not possible to install a dedicated app for every device. (big companies for example)

When there is no gps signal available, the user could see a text block "please turn on your gps sensor or allow the gps location for this website".
I expect this behaviour is know to the most users which are using a smartphone.

Zenzen, Enrico [ezenzen], 05 SEP 2022: This request no longer fulfills the requirements of the Feature Wiki. In consultation with the maintainer I change the status of the feature request to "Redundant / outdated". If the request is still relevant, please update template and mockups.

4 Implementation

{please give a description of the final implementation and add screenshots if possible}

Test Cases

Test cases completed at {date} by {user}

  • {Test case number linked to Testrail} : {test case title}

Approval

Approved at {date} by {user}.

Last edited: 5. Sep 2022, 08:10, Zenzen, Enrico [ezenzen]