View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
10744Bug reportsSurvey takingpublic2016-04-04 11:03
ReporterDenisChenu Assigned ToLouisGac 
PriorityimmediateSeverityminor 
Status closedResolutionfixed 
Product Version2.50.x 
Fixed in Version2.50.x 
Summary10744: Numeric slider : no difference between unanswered + no reset
Description

The slider are same if user already move to 0 or not. Before there are difference
There are no reset

Steps To Reproduce

Import included survey

Additional Information

Actually : seems value is always set : a lot of user want : if user don't click/move the slider : NO answer ( =="").

TagsNo tags attached.
Attached Files
Bug heat12
Complete LimeSurvey version number (& build)160311
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Relationships

related to 07371 closedDenisChenu Feature requests reset slider answer 
related to 07790 closedDenisChenu Bug reports Multiple numerical input with Use slider layout option does not work 
related to 10856 new Feature requests Slider question with no answer zone 

Users monitoring this issue

There are no users monitoring this issue.

Activities

LouisGac

LouisGac

2016-03-11 14:45

developer   ~36413

For frontend part, the important point of view is the user one, not the admin one.

What happen if a user passing a survey think that letting the default value is ok ?
 
Eg:
I pass a survey, the slider is set to "5". 5 is the value I want to give : so I don't touch it. I expect that my answer will be "5", not "No answer".

DenisChenu

DenisChenu

2016-03-11 14:50

developer   ~36417

In research the "I don't do any action" is important.
We have a difference in 2.06 (and in 1.85 too .)

Not in 2.50

LouisGac

LouisGac

2016-03-11 14:57

developer   ~36423

In research, if a user let a value to 5, and the value parsed is "No Answer", the result would just be wrong.

Again, I'm just the coder, I can do that without problem. But I guess that in reality, the huge majority of survey designers think that when they set a default value to an input, that the value registered if the user don't do nothing. Else, why a default value ?

DenisChenu

DenisChenu

2016-03-11 14:59

developer   ~36425

Uploaded 2 screenshoit b+ 1 lss for proof ....

Don't do anything in a slider => No answer.

ANd we have slider_default to set a value by default (or the global default value)

c_schmitz

c_schmitz

2016-03-11 15:05

administrator   ~36427

It should be restored to the 2.06 behaviour. An additional option to configure this behaviour in the future would be nice, but no priority right now.

LouisGac

LouisGac

2016-03-11 15:07

developer   ~36428

Ok after speaking with Carsten, I'll do it for retro-compatiblity purpose. But I'd like dev team to be aware of the very strange behavior of that :
 
We're speaking about numerical input :

  • When displayed with input boxes, the default values is the one recorded when user don't touch nothing.
  • When displayed with sliders, N/A is the one recorded when user don't touch nothing.
     
    So, for a single question type, we change the way the datas are recorded depending on the display. Again, this is the sign that sliders should be a different question type.
DenisChenu

DenisChenu

2016-03-11 15:32

developer   ~36434

Last edited: 2016-03-11 15:33

Without "default core value" , in 2.06

Numeric without slider : empty string (nulled due to DB NUMERICAL)
Numeric with slider (no default_slider) : empty string (nulled due to DB NUMERICAL)
Numeric with slider (default_slider to 5) : 5 when javascript is done

With default core value to 1
Numeric without slider : 1
Numeric with slider (no default_slider) : 1
Numeric with slider (default_slider to 5) : 1

I don't see any difference. And what is N/A ?

LouisGac

LouisGac

2016-03-11 15:50

developer   ~36436

ok !
so fine with me

LouisGac

LouisGac

2016-03-11 15:52

developer   ~36437

Just wait, what about the case :

Numerical input, default value set to 5, user don't touch nothing and submit the form ?
Numerical input, default value set to 5, user don't touch nothing and submit the form, with slider display ?

DenisChenu

DenisChenu

2016-03-11 15:55

developer   ~36439

deafault value always set a value : numeric or not. If it's not the case : it's a bug .
Then default value set to 5 : saved value saved to 5.

But i think actually : default value is saved before page is shown (if actaul value is empty ). We have a bug before where "hidden" question don't take the defaulmt value in some condition.

See EM somewhere.

LouisGac

LouisGac

2016-03-11 15:57

developer   ~36440

ok so just to be sure, you confirm that :

Numerical input, default value set to 5, user don't touch nothing and submit the form : it will save 5 to the database

Numerical input, default value set to 5, user don't touch nothing and submit the form, with slider display : it will save an empty string to the database

DenisChenu

DenisChenu

2016-03-11 16:10

developer   ~36443

Default value set to 5 : No always save 5 : saved before question is shown, slider or not.

Use of default_slider to 5 : save only when click on next/previous

DenisChenu

DenisChenu

2016-03-11 16:12

developer   ~36445

See the 3rd screen : default value set to 0 : show 0 even if slider is show at middle by default.

The difference is the 0 is shown at slider.

You have a emjs issue here : because EMVal("") of a numerci value return 0. Same with numeric without slider value.

LouisGac

LouisGac

2016-03-11 18:26

developer   ~36447

So, to put back the 2.06 behavior, I did some testing by myself in 2.06 to try to list the "Multiple numerical input" behaviors for the "User don't do any action".

Basically :

If you set default answers they will be recorded in the database in case of no user action (with or without slider display).

If you set a slider init value, this value will be recorded in the database in case of no user action. So, if the slider initial value is set to "0", the slider show "0", and "0" is recorded in the database.

Now, the problematic case : If no default answer or a slider init value is provided, empty string will be recorded in the database. But, the slider will show "0", whereas the input box will be empty.

So here what I suggest : for this very last case, the tooltip showing "0" in top of the slider should be hidden until user touch the handle. It will be kind of equivalent of "empty input box".

c_schmitz

c_schmitz

2016-03-11 21:45

administrator   ~36448

Sounds good to me.

DenisChenu

DenisChenu

2016-03-12 10:15

developer   ~36452

Last edited: 2016-03-12 10:16

Same than in 2.06 : no action : no callout display.

See picture

ollehar

ollehar

2016-03-21 12:46

administrator   ~36666

Is this fixed?

LouisGac

LouisGac

2016-03-21 13:14

developer   ~36667

nope

ollehar

ollehar

2016-03-21 14:10

administrator   ~36678

If you're not working on it, I'll fix it.

ollehar

ollehar

2016-03-21 17:43

administrator   ~36688

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=18127

ollehar

ollehar

2016-03-21 17:43

administrator   ~36689

Latest commit fixes "," as separator.

DenisChenu

DenisChenu

2016-03-21 17:57

developer   ~36691

Aaaa this awfull LEMradix ....

ollehar

ollehar

2016-03-21 17:59

administrator   ~36692

Yeah. Bootstrap wouldn't accept "23,4" as value for its input tag.

ollehar

ollehar

2016-03-22 10:46

administrator   ~36698

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=18132

DenisChenu

DenisChenu

2016-03-22 11:19

developer   ~36699

Last edited: 2016-03-22 11:29

OK, reset is here . But no difference betwwen "0" moved and "0" not moved.

And : if you set "show slider" at middle : show 50 with value 0.
Seems there are an issue with default value 'last one is set to 20 in next lss).

Confirm issue : slider SET the value to start value : think there are issue with previuops because there are issue with "default value"

ollehar

ollehar

2016-03-22 11:39

administrator   ~36700

Yes, I'm still working on it. :)

ollehar

ollehar

2016-03-22 12:11

administrator   ~36701

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=18134

ollehar

ollehar

2016-03-22 13:09

administrator   ~36702

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=18135

ollehar

ollehar

2016-03-22 14:12

administrator   ~36705

In 2.06: reset-button resets to null, not default answer. maybe that's expected?
but: reset-button will reset to initial value, if such is supplied. ><
Why have both initial value and default answer?

DenisChenu

DenisChenu

2016-03-22 14:33

developer   ~36707

olle : " Why have both initial value and default answer? " becasue : at a time : there are no default value in LimeSurvey :)

PS : actually :
The value seems to be set to "middle"

Update survey:
http://limesurvey.sondages.pro/index.php/survey/index/sid/343817/newtest/Y/lang/en

1st question : slider must be at middle but without value + click next must warning "this question is mandatory"
2nd question : Same with reset
3rd question : slider msut start at 3 not at 0.

slider_callouit must have a different class (and content if you can) if user already touch it OR if there are a value (previuos or index)

ollehar

ollehar

2016-03-22 16:28

administrator   ~36714

Yet another bug in 2.06: When having initial value "55.5" with comma --> displayed as "55,5", then click reset, value will be "555". Submit and it will be saved as 555.

ollehar

ollehar

2016-03-22 16:31

administrator   ~36715

Denis, feel free to upload your new example survey on mantis.

ollehar

ollehar

2016-03-22 16:50

administrator   ~36718

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=18143

ollehar

ollehar

2016-03-22 16:59

administrator   ~36721

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=18144

ollehar

ollehar

2016-03-22 17:13

administrator   ~36724

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=18145

ollehar

ollehar

2016-03-22 17:21

administrator   ~36729

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=18146

DenisChenu

DenisChenu

2016-03-23 18:00

developer   ~36756

@olle : what is the final decision about "starting position"

2.06 solution :

  • set position at middle DON'T SET a value : click next on a mandatory question show "You don't answer" + the value is not shown on slider callout

Actual 2.50 solution

  • set position at middle SET a value : click next on a mandatory question is allowed and set the answer to 50

Possible solution

  • set position at middle DON'T SET a value
  • set a slider_default DON'T SET a value (difference between default value and slider_default), differnt system than 2.06.

PS : slider_default : allow Expression manager : https://github.com/LimeSurvey/LimeSurvey/blob/2.06lts/application/helpers/qanda_helper.php#L3084
But fix it after (empty if it's not numeric)

LouisGac

LouisGac

2016-03-23 19:43

developer   ~36758

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=18156

pmonstad

pmonstad

2016-03-23 20:06

updater   ~36759

Not sure I understand this, but I guess there is a default value of the slider, i.e. it has to be a default value. A common scenario if the user accept the default position of the slider and go to the next question. The value of the slider has to be counted as an answer, even if unchanged. The default value should be mandatory to enter when designing a slider question.

I guess a scenario is to e.g. choose a positive or negative attitude to a question, where the default is in the middle, null (0). If satisfied I can slide to the right to a positive value, while I choose a negative value if I'm negative. But if I just leave the slider in the middle, default position, the default value of null should be my answer if I just go to the next question.

Any views about this?

jelo

jelo

2016-03-23 22:44

partner   ~36765

@pmonstad: Slider position should not count as an answer. Default value should count as an answer. To set a default should NOT be mandatory.

We all know these forms with text fields which show a text in grey color which will vanish when we click into the field and start typing. This is similar to the custom position of the slider handle. Doesn't count as answer but still has a purpose. If I ask a question about a basis price which is shown as 100% I want to have the handle in a different position from the start. I still want to make sure that people answer the question. I still want to know, if the question is answered when it is not mandatory. If 100 is the default value and 100 is the answer in the results, I don't know if the value 100 is the answer or just a click-through.

pmonstad

pmonstad

2016-03-23 22:56

updater   ~36766

OK, I see, but is it possible to skip the slider question without moving the slider? What is the result then, unanswered?

I will probably have to play around with a slider question as I have not used them in surveys before. Excuse me for exposing my own incompetence here ;)

jelo

jelo

2016-03-23 23:07

partner   ~36768

@pmonstad: No need to excuse yourself.

I would like to see this behaviour (which does not mean it will be like this)
Mandatory question:
No default answer, but custom position (e.g. middle) set.
Slider handle has to be touched. You will have to answer the question.

Mandatory question:
Default answer set
Slider handle has not to be touched. A default answer is already given.

DenisChenu

DenisChenu

2016-03-24 08:05

developer   ~36770

@jelo and @pmonstad :

Attention : difference betwwen Default value (the same than multiple numeric input) and slider default value.

After maybe it's better to use

  • Default value :! for the "real" default value
  • slider_default for the "Value set in slider only (not with multiple numeric"

In 2.06 :

  • slider_default : SET a value
  • slider_middle : DON'T SE a default
LouisGac

LouisGac

2016-03-24 10:08

developer   ~36773

Last edited: 2016-03-24 10:09

So now, the logic for the value setting is in qanda.php (like for most question types). The code should be quiet easy to read and understand, and I commented it :
https://github.com/LimeSurvey/LimeSurvey/blob/master/application/helpers/qanda_helper.php#l3073-l3108

As said in the comment :

// The value of the slider depends on many possible different parameters, by order of priority :
// 1. The value stored in the session
// 2. Else the default Answer (set by EM and stored in session, so same case than 1)
// 3. Else the init value
// 4. Else the middle start

This piece of code also defined when the user no action should set "NULL" in the database : it's the default behavior, it's deactivated when a value is stored in the session (prev/next || default answer), or when a default value is set.

Let me know if you want changes. Please, try to express those changes in term of the priority conditions.

jelo

jelo

2016-03-24 15:06

partner   ~36785

The scope is LS 2.5? Not 2.06 LTS?

For LS 2.5 (feature freeze, but not that frozen):
The middle position option can be changed into a custom position field.

Position vs. Answer:
What I would expect is that init value is a special case of middle start.

When I look at the order of priority, I see no chance of leaving the answer empty, when setting e.g. middle position.

When I don't set the question mandatory and the slider is put in the middle position, I would expect that no value is saved in the results.
If I want a value saved I would set the default value to the value of the middle position.

(Custom) Position of Handle
(Default) Value of Handle
The wording "Init Value" vs. default value is confusing.

The value of these discussion is to get a feeling what should be changed in LS 3.0 as well. How will we keep track of such ideas?

For LS 3.0:
Dedicated Slider question. No mix of numeric input and slider option.
Less advanced options per question. More questiontypes, less LOC per question.

LouisGac

LouisGac

2016-03-24 15:15

developer   ~36787

Last edited: 2016-03-24 15:17

jelo : you don't need to understand the code.

The rule for user no action : "the user no action set "NULL" in the database : it's the default behavior. This behavior is deactivated when a value is stored in the session (prev/next || default answer), or when a init value is set. "

So it is the case of middle position. If user doesn't touch nothing, null is recorded.

I agree that init value VS default answer is kinda confusing.

Olle proposed to open a wiki page with all the features that should be implemented for LS3 to keep a trace of it. We need Carsten validation in before.

I agree for the dedicated slider question, and for the philosophy of "Less advanced options per question. More questiontypes, less LOC per question." in general. It implies a easy and fast way to create new question types.

ollehar

ollehar

2016-03-30 13:41

administrator   ~36835

Should now be fixed. Please confirm.

c_schmitz

c_schmitz

2016-04-01 11:36

administrator   ~36882

Version 2.50+ Build 160401 released

Related Changesets

LimeSurvey: master d191bdd9

2016-03-21 17:42

ollehar


Details Diff
Fixed issue 10744: Numeric slider : no difference between unanswered +
no reset
Affected Issues
10744
mod - application/helpers/qanda_helper.php Diff File
mod - application/views/survey/questions/multiplenumeric/item.php Diff File

LimeSurvey: master 27511200

2016-03-22 10:44

ollehar


Details Diff
Fixed issue 10744: Numeric slider : no difference between unanswered +
no reset
Affected Issues
10744
mod - application/views/survey/questions/multiplenumeric/item.php Diff File

LimeSurvey: master 0b21728d

2016-03-22 11:03

ollehar


Details Diff
Fixed issue 10744: Numeric slider : no difference between unanswered +
no reset
Affected Issues
10744
mod - application/views/survey/questions/multiplenumeric/item.php Diff File
mod - templates/default/css/template.css Diff File

LimeSurvey: master 5b266449

2016-03-22 11:58

ollehar


Details Diff
Fixed issue 10744: Numeric slider : no difference between unanswered +
no reset
Affected Issues
10744
mod - application/helpers/qanda_helper.php Diff File
mod - application/views/survey/questions/multiplenumeric/item.php Diff File

LimeSurvey: master 516e852d

2016-03-22 13:08

ollehar


Details Diff
Fixed issue 10744: Numeric slider : no difference between unanswered +
no reset
Affected Issues
10744
mod - application/helpers/qanda_helper.php Diff File
mod - application/views/survey/questions/multiplenumeric/item.php Diff File

LimeSurvey: master b4b326f8

2016-03-22 16:49

ollehar


Details Diff
Fixed issue 10744: Numeric slider : no difference between unanswered +
no reset
Affected Issues
10744
mod - application/views/survey/questions/multiplenumeric/item.php Diff File

LimeSurvey: master 380eb9fe

2016-03-22 16:58

ollehar


Details Diff
Fixed issue 10744: Numeric slider : no difference between unanswered +
no reset
Affected Issues
10744
mod - application/views/survey/questions/multiplenumeric/item.php Diff File

LimeSurvey: master 0cc80692

2016-03-22 17:10

ollehar


Details Diff
Fixed issue 10744: Numeric slider : no difference between unanswered +
no reset
Affected Issues
10744
mod - application/views/survey/questions/multiplenumeric/item.php Diff File

LimeSurvey: master a09b54a4

2016-03-22 17:20

ollehar


Details Diff
Fixed issue 10744: Numeric slider : no difference between unanswered +
no reset
Affected Issues
10744
mod - application/views/survey/questions/multiplenumeric/item.php Diff File

LimeSurvey: master bcdcdf9d

2016-03-23 19:43

LouisGac


Details Diff
Fixed issue 10744: Numeric slider : no difference between unanswered + no reset Affected Issues
10744
mod - application/helpers/qanda_helper.php Diff File
mod - application/views/survey/questions/multiplenumeric/item.php Diff File

Issue History

Date Modified Username Field Change
2016-03-11 14:33 DenisChenu New Issue
2016-03-11 14:33 DenisChenu File Added: limesurvey_survey_223698.lss
2016-03-11 14:34 DenisChenu File Added: Capture du 2016-03-11 14-32-55.png
2016-03-11 14:42 c_schmitz Priority none => urgent
2016-03-11 14:43 c_schmitz Assigned To => LouisGac
2016-03-11 14:43 c_schmitz Status new => assigned
2016-03-11 14:43 c_schmitz Priority urgent => immediate
2016-03-11 14:45 LouisGac Note Added: 36413
2016-03-11 14:49 DenisChenu Relationship added related to 07371
2016-03-11 14:50 DenisChenu Note Added: 36417
2016-03-11 14:51 DenisChenu File Added: Capture du 2016-03-11 14-48-20.png
2016-03-11 14:56 DenisChenu File Added: limesurvey_survey_223698_mandatory-central.lss
2016-03-11 14:56 DenisChenu File Added: Capture du 2016-03-11 14-56-24.png
2016-03-11 14:57 LouisGac Note Added: 36423
2016-03-11 14:59 DenisChenu Note Added: 36425
2016-03-11 15:05 c_schmitz Note Added: 36427
2016-03-11 15:06 c_schmitz Summary Numperci slider : no difference between unanswered + no reset => Numeric slider : no difference between unanswered + no reset
2016-03-11 15:07 LouisGac Note Added: 36428
2016-03-11 15:32 DenisChenu Note Added: 36434
2016-03-11 15:33 DenisChenu Note Edited: 36434
2016-03-11 15:50 LouisGac Note Added: 36436
2016-03-11 15:52 LouisGac Note Added: 36437
2016-03-11 15:55 DenisChenu Note Added: 36439
2016-03-11 15:57 LouisGac Note Added: 36440
2016-03-11 16:10 DenisChenu Note Added: 36443
2016-03-11 16:12 DenisChenu Note Added: 36445
2016-03-11 18:26 LouisGac Note Added: 36447
2016-03-11 21:45 c_schmitz Note Added: 36448
2016-03-12 10:15 DenisChenu Note Added: 36452
2016-03-12 10:16 DenisChenu Note Edited: 36452
2016-03-21 12:46 ollehar Note Added: 36666
2016-03-21 13:14 LouisGac Note Added: 36667
2016-03-21 14:10 ollehar Note Added: 36678
2016-03-21 14:10 ollehar Assigned To LouisGac => ollehar
2016-03-21 15:03 ollehar Status assigned => confirmed
2016-03-21 17:43 ollehar Changeset attached => LimeSurvey master d191bdd9
2016-03-21 17:43 ollehar Note Added: 36688
2016-03-21 17:43 ollehar Resolution open => fixed
2016-03-21 17:43 ollehar Note Added: 36689
2016-03-21 17:57 DenisChenu Note Added: 36691
2016-03-21 17:59 ollehar Note Added: 36692
2016-03-22 10:46 ollehar Changeset attached => LimeSurvey master 27511200
2016-03-22 10:46 ollehar Note Added: 36698
2016-03-22 11:19 DenisChenu Note Added: 36699
2016-03-22 11:25 DenisChenu Relationship added related to 07790
2016-03-22 11:25 DenisChenu File Added: Capture du 2016-03-22 11-17-35.png
2016-03-22 11:29 DenisChenu Note Edited: 36699
2016-03-22 11:29 DenisChenu File Added: limesurvey_survey_slider.lss
2016-03-22 11:39 ollehar Note Added: 36700
2016-03-22 12:11 ollehar Changeset attached => LimeSurvey master 0b21728d
2016-03-22 12:11 ollehar Changeset attached => LimeSurvey master 5b266449
2016-03-22 12:11 ollehar Note Added: 36701
2016-03-22 13:09 ollehar Changeset attached => LimeSurvey master 516e852d
2016-03-22 13:09 ollehar Note Added: 36702
2016-03-22 14:12 ollehar Note Added: 36705
2016-03-22 14:33 DenisChenu Note Added: 36707
2016-03-22 16:28 ollehar Note Added: 36714
2016-03-22 16:31 ollehar Note Added: 36715
2016-03-22 16:50 ollehar Changeset attached => LimeSurvey master b4b326f8
2016-03-22 16:50 ollehar Note Added: 36718
2016-03-22 16:57 DenisChenu File Added: limesurvey_survey_slider3.lss
2016-03-22 16:59 ollehar Changeset attached => LimeSurvey master 380eb9fe
2016-03-22 16:59 ollehar Note Added: 36721
2016-03-22 17:13 ollehar Changeset attached => LimeSurvey master 0cc80692
2016-03-22 17:13 ollehar Note Added: 36724
2016-03-22 17:21 ollehar Changeset attached => LimeSurvey master a09b54a4
2016-03-22 17:21 ollehar Note Added: 36729
2016-03-23 17:41 ollehar Assigned To ollehar => LouisGac
2016-03-23 17:41 ollehar Status confirmed => assigned
2016-03-23 18:00 DenisChenu Note Added: 36756
2016-03-23 19:43 LouisGac Changeset attached => LimeSurvey master bcdcdf9d
2016-03-23 19:43 LouisGac Note Added: 36758
2016-03-23 20:06 pmonstad Note Added: 36759
2016-03-23 22:44 jelo Note Added: 36765
2016-03-23 22:56 pmonstad Note Added: 36766
2016-03-23 23:07 jelo Note Added: 36768
2016-03-24 08:05 DenisChenu Note Added: 36770
2016-03-24 10:08 LouisGac Note Added: 36773
2016-03-24 10:08 LouisGac Note Edited: 36773
2016-03-24 10:09 LouisGac Note Edited: 36773
2016-03-24 15:06 jelo Note Added: 36785
2016-03-24 15:15 LouisGac Note Added: 36787
2016-03-24 15:16 LouisGac Note Edited: 36787
2016-03-24 15:17 LouisGac Note Edited: 36787
2016-03-30 13:41 ollehar Note Added: 36835
2016-03-30 13:41 ollehar Status assigned => resolved
2016-03-30 13:41 ollehar Fixed in Version => 2.5
2016-04-01 11:36 c_schmitz Note Added: 36882
2016-04-01 11:36 c_schmitz Status resolved => closed
2016-04-04 11:03 DenisChenu Relationship added related to 10856