View Issue Details

IDProjectCategoryView StatusLast Update
08342Development Otherpublic2019-09-23 12:20
Reporterjjxice46 Assigned To 
PrioritynormalSeverityminor 
Status confirmedResolutionreopened 
Summary08342: Equation type question not working correctly
Description

We have a survey setup that has an equation type question that will provide you with a number value that is added up based off the assessment score. This function works perfectly in 2.00 build 131031 however it does not seem to work anymore in 2.05 RC6. I have double checked the settings and everything is identical as far as i can see on both servers (one with 2.00 and another with 2.05RC6). This issue seems to happen the MOST once the survey has been activated, if you have the survey in a non active state and try to test it sometimes it works correctly (not all the time). however once you activate the survey it no longer works correctly.

I have attached a sample of the survey for you to look at.

TagsNo tags attached.

Activities

jjxice46

jjxice46

2013-11-06 22:08

reporter  

Sample.lss (20,117 bytes)
DenisChenu

DenisChenu

2013-11-07 13:26

developer   ~27116

Last edited: 2013-11-07 14:07

View 4 revisions

Hi,

In the last GIT version, think it's resolved. But some fix to.

I test : with ALL Y (or Y3: all first option) : and I I have G2_Q0005 at 9.25 for 2.00 and 2.05 RC6.

The équation in JS show both 9.250000000000002. But in 2.00 too

Can you explain more the difference ?

And update the js cache of your browser maybe ?

jjxice46

jjxice46

2013-11-07 14:10

reporter   ~27118

the equation that we have to use for this survey is based off the assessment value for each question, since you currently can not have assessment values be anything but a whole number we had to improvise a little with the equation which results it in having a large number 9.250000000000002 when you attempt to do it.

On our end it gives the number correctly in version 2.00 however on 2.05RC6 i could never get it to display or even record that number (i tested on both windows and ubuntu).

Does that help any?

DenisChenu

DenisChenu

2013-11-07 14:36

developer   ~27120

Last edited: 2013-11-07 14:40

View 4 revisions

In 2.00 i have 9.250000000000002 in javascript too, but 9.25 in PHP.

Here is the bug, but present in 2.00 too ? no ?

Don't understand why not present in your 2.00 installation ?

PS: it's a javascript issue : then in browser , not in server.
PS2: http://limesurvey.sondages.pro/survey/index/sid/483777/newtest/Y/lang/en

jjxice46

jjxice46

2013-11-07 14:42

reporter   ~27121

The main problem is it displays a value in 2.00 (9.250000000000002) it should be 9.25 so it is a small bug that is present in 2.00 but it displays a value that actually gets recorded into the results table correctly in 2.00 (i belive it will actually record 9.250000000000002)

However, the bigger issue is that it would never display 9.25 or 9.250000000000002 in 2.05 RC6 and it never recorded any of the values in the results table when you submit the survey.

DenisChenu

DenisChenu

2013-11-07 14:55

developer   ~27122

Last edited: 2013-11-07 14:55

View 2 revisions

Why *.1 and not /10 ?

In js (FF24):
(500+350+500+500)/ 100 / 20 /10 100= 9.25
but
(500+350+500+500)/ 100 / 20
.1 * 100= 9.250000000000002

jjxice46

jjxice46

2013-11-07 14:56

reporter   ~27123

good point, it never crossed my mind to even do that.

Ill have to possibly adjust it to get rid of the trailing digits

were you able to get it to display anything inside of 2.05?

DenisChenu

DenisChenu

2013-11-07 14:58

developer   ~27124

Last edited: 2013-11-07 14:59

View 2 revisions

In 2.00 : recorded at 9.25 too, because it's a javascript bug, and Equation are allways entered in PHP

PS: you can use round function for trailing digit.

jjxice46

jjxice46

2013-11-07 14:59

reporter   ~27125

Understood,

what was the result inside of 2.05RC6? if you dont mind me asking?

DenisChenu

DenisChenu

2013-11-07 15:01

developer   ~27137

Last edited: 2013-11-07 15:02

View 2 revisions

Javascript bug.

Can't not fix all js browser bug.

Your browser is the same in Windows and FF ? Maybe a Linux/FF javascript bug here ....

jjxice46

jjxice46

2013-11-07 15:02

reporter   ~27138

got it,

Thanks Denis

jjxice46

jjxice46

2013-12-03 17:11

reporter   ~27487

I wanted to add a quick note on this issue. (I do not need it to be reopened)

I did some more testing and actually found the problem was in one of the templates we were using, i am not sure exactly what inside that template caused the problem but upon switching it everything started to work correctly.

Just in case anyone else has a similar issue.

jjxice46

jjxice46

2013-12-03 17:12

reporter   ~27488

Sorry for reopening this issue, i just wanted to add the above note. Please feel free to close it.

DenisChenu

DenisChenu

2013-12-03 17:30

developer   ~27490

Nope jjxice46.

For better understanding (because when testing, i have the same issue).

With default template (LS included) , you don't have this issue ?
Ca you test all included template (and citronade maybe ...)

Denis

jjxice46

jjxice46

2013-12-03 17:43

reporter   ~27492

Last edited: 2013-12-03 17:49

View 3 revisions

Correct,

With the default template i dont seem to have this issue, I have tested most of the other ones and they also seem to be ok,

However,

when i take the existing template that we have in our live limesurvey site (that is running Version 2.00+ Build 131031) and Export it from there (where it works fine) and import it in it does not work.

I am not sure, exactly why but I have narrowed it down to the template. as it does not seem to happen to any of the built in templates as they all work perfectly on our computers

jjxice46

jjxice46

2013-12-03 18:01

reporter   ~27493

Last edited: 2013-12-03 18:02

View 2 revisions

Actually, i discovered a curious situation in doing a little bit more testing.

I found something more curious, If I take any of the templates from our Version 2.00+ Build 131031 and import them into 2.05RC6 or 2.05RC7 it stops working correctly(i have tested 2 custom built ones and 3 default ones that come with limesurvey that i exported)

However,

If you use any of the templates that come with 2.05RC6 or 2.05RC7 and dont import anything over from 2.00 it seems to work ok.

is there any difference in the templates that are in 2.05 compared to the ones in 2.00?

DenisChenu

DenisChenu

2013-12-04 11:19

developer   ~27496

Maybe some update ? But don't think update to fix this ??????

jjxice46

jjxice46

2013-12-04 14:14

reporter   ~27497

Yeah, i honestly have no idea why its behaving this way. Its not a huge deal to me because I have worked around it by just redesigning one of the built in templates to fit my needs.

DenisChenu

DenisChenu

2013-12-08 11:26

developer   ~27518

Last edited: 2013-12-08 11:27

View 2 revisions

Track down on internet :

Javascript not buggy .... floating point number

Move this to developpemnt.

If someone have an idea to fix this in a good way !

DenisChenu

DenisChenu

2013-12-08 11:28

developer   ~27519

Mauybe adding : https://github.com/guipn/sinful.js/wiki/API#math can be an idea in a Plugin ?

Issue History

Date Modified Username Field Change
2013-11-06 22:08 jjxice46 New Issue
2013-11-06 22:08 jjxice46 File Added: Sample.lss
2013-11-07 11:04 c_schmitz Assigned To => DenisChenu
2013-11-07 11:04 c_schmitz Status new => assigned
2013-11-07 13:26 DenisChenu Note Added: 27116
2013-11-07 13:33 DenisChenu Note Edited: 27116 View Revisions
2013-11-07 13:34 DenisChenu Note Edited: 27116 View Revisions
2013-11-07 14:07 DenisChenu Note Edited: 27116 View Revisions
2013-11-07 14:10 jjxice46 Note Added: 27118
2013-11-07 14:36 DenisChenu Note Added: 27120
2013-11-07 14:37 DenisChenu Note Edited: 27120 View Revisions
2013-11-07 14:40 DenisChenu Note Edited: 27120 View Revisions
2013-11-07 14:40 DenisChenu Note Edited: 27120 View Revisions
2013-11-07 14:42 jjxice46 Note Added: 27121
2013-11-07 14:55 DenisChenu Note Added: 27122
2013-11-07 14:55 DenisChenu Note Edited: 27122 View Revisions
2013-11-07 14:56 jjxice46 Note Added: 27123
2013-11-07 14:58 DenisChenu Note Added: 27124
2013-11-07 14:59 jjxice46 Note Added: 27125
2013-11-07 14:59 DenisChenu Note Edited: 27124 View Revisions
2013-11-07 15:01 DenisChenu Note Added: 27137
2013-11-07 15:01 DenisChenu Status assigned => closed
2013-11-07 15:01 DenisChenu Resolution open => fixed
2013-11-07 15:01 DenisChenu Status closed => feedback
2013-11-07 15:01 DenisChenu Resolution fixed => reopened
2013-11-07 15:02 jjxice46 Note Added: 27138
2013-11-07 15:02 jjxice46 Status feedback => assigned
2013-11-07 15:02 DenisChenu Note Edited: 27137 View Revisions
2013-11-07 15:02 DenisChenu Status assigned => closed
2013-11-07 15:02 DenisChenu Resolution reopened => won't fix
2013-12-03 17:11 jjxice46 Note Added: 27487
2013-12-03 17:11 jjxice46 Status closed => feedback
2013-12-03 17:11 jjxice46 Resolution won't fix => reopened
2013-12-03 17:12 jjxice46 Note Added: 27488
2013-12-03 17:12 jjxice46 Status feedback => assigned
2013-12-03 17:30 DenisChenu Note Added: 27490
2013-12-03 17:43 jjxice46 Note Added: 27492
2013-12-03 17:48 jjxice46 Note Edited: 27492 View Revisions
2013-12-03 17:49 jjxice46 Note Edited: 27492 View Revisions
2013-12-03 18:01 jjxice46 Note Added: 27493
2013-12-03 18:02 jjxice46 Note Edited: 27493 View Revisions
2013-12-04 11:19 DenisChenu Note Added: 27496
2013-12-04 14:14 jjxice46 Note Added: 27497
2013-12-08 11:26 DenisChenu Note Added: 27518
2013-12-08 11:26 DenisChenu Project Bug reports => Development
2013-12-08 11:26 DenisChenu Assigned To DenisChenu =>
2013-12-08 11:26 DenisChenu Status assigned => acknowledged
2013-12-08 11:27 DenisChenu Note Edited: 27518 View Revisions
2013-12-08 11:28 DenisChenu Note Added: 27519
2019-09-23 12:20 c_schmitz Status acknowledged => confirmed