View Issue Details

IDProjectCategoryView StatusLast Update
14396Bug reports[All Projects] Survey designpublic2019-01-16 17:30
Reportertammo Assigned Tomarkusfluer  
PrioritynoneSeveritymajor 
Status assignedResolutionopen 
Product Version3.16.x 
Target Version4.0.0devFixed in Version 
Summary14396: Map question with default position/answer very confusing
Description

I wanted to use a map question using OSM (Open Street Maps) and use a predefined location per user (= token).

In the token table I have now two extra attributes: LAT and LONG.

I added a short text question to the group and added the following to the default position:

{TOKEN:ATTRIBUTE_1} {TOKEN:ATTRIBUTE_2}

When designing the survey we placed the two attributes first in the Default POSITION (Accordion in sidebar when editing question).

Here LAT and LONG should be separated by a space. A semicolon does not work. Placing the marker does not work.

When you use the default ANSWER in stead, there is a difference between using a space or a semicolon: when using a space, the marker does not get set, when using a semicolon, the marker gets set.

It is becoming more complex when using both the default POSITION and the default ANSWER. Somehow the default position has the precedence, but not always.

Actually there are three problems with this feature of the question type:

  1. The existence of both the default POSITION as well as the default ANSWER is confusing.
  2. When using the default POSITION the marker does not get set on Open Street Maps, while it does get set on Google Maps
  3. When using a space between LAT and LONG the marker does not get set when using default ANSWER. When using a semicolon, the marker does get set.

Possible solution:

  1. Delete the default POSITION form the question details and use only the default ANSWER
  2. Accept both a space as well as a semicolon between the LAT and LONG in the default answer
  3. In the question details in the tab for position:
    a. Remind the user that a default answer exits?
    b. Show a checkbox with the option: Place marker when default answer exists?
Steps To Reproduce

Use the attached survey.

TagsNo tags attached.
Complete LimeSurvey version number (& build)3.15.5
I will donate to the project if issue is resolvedNo
BrowserChrome
Database & DB-VersionMySQL
Server OS (if known)Linux
Webserver software & version (if known)Apache
PHP Version7.1.25

Relationships

related to 14399 assignedmarkusfluer Feature requests MAP question : Set default position (if none is set) by config 

Activities

tammo

tammo

2019-01-04 13:13

developer  

survey_archive_368136.lsa (5,129 bytes)
DenisChenu

DenisChenu

2019-01-04 14:09

developer   ~50108

Last edited: 2019-01-04 14:11

View 6 revisions

My points of view:

  1. The existence of both the default POSITION as well as the default ANSWER is confusing.
    No, it's not the same we MUST keep default position : default position set the place but didn't set the value. For example : i know my user's are from Roubaix (Town) but i don't want position is set automatically to center of Roubaix, i want they click on the map.

  2. When using the default POSITION the marker does not get set on Open Street Maps, while it does get set on Google Maps
    Google map issue, OSM is better here : no value set, no marker. Value set => marker.

  3. When using a space between LAT and LONG the marker does not get set when using default ANSWER. When using a semicolon, the marker does get set.
    Default answer must be same than final value, we can easily fix default position to accept semi-colon or space (or colon,pipe,semi-colon or space …)

Show a checkbox with the option: Place marker when default answer exists? : see my answer at 2 : default position DON'T set the value : no value no marker. If you set the marker : position (input) must be set at same time.

tammo

tammo

2019-01-04 14:16

developer   ~50109

This may all be true and valid from a developers stand point, but for a user this is very confusing, because you need to know a lot about it. And it isn't even the manual.

I do understand that there may be a difference betwee a default location, like a town and a specific location that is marked. But the current interface makes it very dificult to get to know what is what.

DenisChenu

DenisChenu

2019-01-04 16:02

developer   ~50110

I spoke not about developper, i spoke about survey manager need … maybe improve current string, but really need to have a way to put the map HERE but don't set a value.

tammo

tammo

2019-01-04 18:19

developer   ~50111

OK, this is now clear to me, but for the survey manager there is much which could be clarified (clarifié ;-)).

The default position is just an indication and is not stored in the answer table. It is for display only.
The default answer is stored in the database, unless the user changes it to another location, which is then stored in the database. Currently: using space as the separator in the default answer DOES NOT set the marker. Using a semicolon as a separator in the default answer DOES set the marker.

I now understand the difference between default POSITION and default ANSWER.

For both: it would be great that the separator for both of them is the same and would accept multiple separators.

Struggling with the user interface aspects is YES/NO setting the marker. I see the need for making this an option, but I struggle how to "tell the survey manager" which is which.

Some brainstorming is needed. As it is now, each survey manager will have to experiment to find out. While this is a very powerful feature...

DenisChenu

DenisChenu

2019-01-04 19:08

developer   ~50112

The default position is just an indication and is not stored in the answer table. It is for display only.
Yes

The default answer is stored in the database, unless the user changes it to another location, which is then stored in the database.
Yes

Currently: using space as the separator in the default answer DOES NOT set the marker. Using a semicolon as a separator in the default answer DOES set the marker.
Maybe there are an issue here : if OSM and Google maps don't use same separator … but clearly : (for dev here) : default value must not be updated : default value goes is $_SESSION and in database like it was set by admin user.

For both: it would be great that the separator for both of them is the same and would accept multiple separators.
I already write : i think position is an easy fix, and if current system don't use the DB system (like default) : it's an issue. Allow different separator are really the best solution in my opinion. But i don't think it's a good idea to try to fix Default value (because : we must (as dev) nbot update default value). Else we can have some future issue …

tammo

tammo

2019-01-04 19:11

developer   ~50113

Is default value now default POSITION or default ANSWER?

DenisChenu

DenisChenu

2019-01-05 12:13

developer   ~50114

;).

Default value mean Default answer : https://manual.limesurvey.org/Default_answers
Default position mean : https://manual.limesurvey.org/Question_type_-_Short_free_text#Default_position_.28location_defaultcoordinates.29 «Type in here the latitude and longitude where the map will be centered when loaded. »

We need to test Gmap too to see if they are same for DB value set LAT;LONG (then same for default answer)

DenisChenu

DenisChenu

2019-01-05 12:34

developer   ~50115

Help of position and map setting

Separator

  1. Seems clear separator is space ;)
  2. Must inform this don't set the value, but place the map (todo : check gmap)

Position

  1. Lack of DB value (separator ? Value etc …) : must fix.

About all of this settings : see https://github.com/LimeSurvey/LimeSurvey/pull/1135 and https://bugs.limesurvey.org/view.php?id=14126



DenisChenu

DenisChenu

2019-01-05 12:34

developer  

DenisChenu

DenisChenu

2019-01-05 12:41

developer   ~50116

Some more testing

GmapdefaultB is broken (send a notice) : must fix it in 3.X
GmappositionOK : this set the value, but if i remind : it's a Google Map issue, must find a way to set the position without setting the value



limesurvey_survey_mapTest.lss (26,955 bytes)
PHP notice.html (20,310 bytes)

Related Changesets

LimeSurvey: master 85f6a95d

2019-01-05 12:45:51

DenisChenu

Details Diff
Dev: Fixed issue : bad value for default answer in map question broke with debug
Dev: test if ; is in current value
Dev: related issue 14396: Map question with default position/answer very confusing
Affected Issues
14396
mod - application/helpers/qanda_helper.php Diff File

LimeSurvey: develop 5159b3e8

2019-01-05 12:45:51

DenisChenu


Committer: ollehar Details Diff
Dev: Fixed issue : bad value for default answer in map question broke with debug
Dev: test if ; is in current value
Dev: related issue 14396: Map question with default position/answer very confusing
Affected Issues
14396
mod - application/helpers/qanda_helper.php Diff File

LimeSurvey: master 05f0bf84

2019-01-05 13:00:15

DenisChenu

Details Diff
Dev: GMAP : no value or position set : use same lat/long than OSM
Dev: fix strpos …
Dev: todo : don't set value and marker, only position
Affected Issues
14396
mod - application/helpers/qanda_helper.php Diff File
mod - assets/scripts/map.js Diff File

Issue History

Date Modified Username Field Change
2019-01-04 13:13 tammo New Issue
2019-01-04 13:13 tammo File Added: survey_archive_368136.lsa
2019-01-04 14:09 DenisChenu Note Added: 50108
2019-01-04 14:09 DenisChenu Note Edited: 50108 View Revisions
2019-01-04 14:09 DenisChenu Note Edited: 50108 View Revisions
2019-01-04 14:09 DenisChenu Note Edited: 50108 View Revisions
2019-01-04 14:10 DenisChenu Note Edited: 50108 View Revisions
2019-01-04 14:11 DenisChenu Note Edited: 50108 View Revisions
2019-01-04 14:16 tammo Note Added: 50109
2019-01-04 16:02 DenisChenu Note Added: 50110
2019-01-04 18:19 tammo Note Added: 50111
2019-01-04 19:08 DenisChenu Note Added: 50112
2019-01-04 19:11 tammo Note Added: 50113
2019-01-05 12:13 DenisChenu Note Added: 50114
2019-01-05 12:34 DenisChenu File Added: Capture d’écran du 2019-01-05 12-30-05.png
2019-01-05 12:34 DenisChenu Note Added: 50115
2019-01-05 12:34 DenisChenu File Added: Capture d’écran du 2019-01-05 12-31-01.png
2019-01-05 12:41 DenisChenu File Added: Capture d’écran du 2019-01-05 12-40-59.png
2019-01-05 12:41 DenisChenu File Added: limesurvey_survey_mapTest.lss
2019-01-05 12:41 DenisChenu File Added: PHP notice.html
2019-01-05 12:41 DenisChenu Note Added: 50116
2019-01-05 12:46 DenisChenu Changeset attached => LimeSurvey master 85f6a95d
2019-01-05 13:00 DenisChenu Changeset attached => LimeSurvey master 05f0bf84
2019-01-05 13:04 DenisChenu Relationship added related to 14399
2019-01-10 15:34 LouisGac Assigned To => markusfluer
2019-01-10 15:34 LouisGac Status new => assigned
2019-01-16 17:30 ollehar Changeset attached => LimeSurvey develop 5159b3e8