View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
07698Bug reportsExpression Managerpublic2013-04-08 21:59
ReporterMazi Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00+ 
Target Version2.00+Fixed in Version2.00+ 
Summary07698: EM's is_int() function causes problems when validating subquestions
Description

The "numeric" question type has a feature to force the user to enter integers only. Unfortunatelym, this is missing at the "multiple numeric" question type.
Thus, I tried working around that by using the subquestion validation feature of EM to check if each value is an integer: is_int(this).

EM seems to validate correctly, because the validation tip is green when entering 2 or 5 or 8 but turns pink when entering non-integer numbers like 2.2 or 5.5.

Problem is that I can't proceed to the next page even though all subquestions are filled with correct integer values.

Steps To Reproduce
  1. Import and activate the attached survey.
  2. Enter integers at the three input fields -> validation tip is green
  3. Click next -> you can't proceed
TagsNo tags attached.
Attached Files
Bug heat2
Complete LimeSurvey version number (& build)130317
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMySQL 5
Server OS (if known)Windows 7
Webserver software & version (if known)Apache 2.2
PHP Version5.3.18

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2013-03-27 15:55

developer   ~24879

Last edited: 2013-03-27 15:59

Really don't understand ....

Add some tracevar

The test is:
$funcName($params[0])

With:
tracevar(array($funcName,$params[0]))
array
(
'0' => 'is_int'
'1' => 1
)

$funcName($params[0]) return false ...
and same with:
$funcName(floatval($params[0])) return false ...
Then adding a specific function ....

DenisChenu

DenisChenu

2013-03-27 16:08

developer   ~24880

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

DenisChenu

DenisChenu

2013-03-27 16:12

developer   ~24881

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

Related Changesets

LimeSurvey: master 2f6ee193

2013-03-27 15:07:54

DenisChenu

Details Diff
Fixed issue 07698: EM's is_int() function causes problems when validating subquestions
Dev: don't really understand why $funcName($params[0]) with is_int and 1 don't send true ...
Affected Issues
07698
mod - application/helpers/expressions/em_core_helper.php Diff File

LimeSurvey: 2.05 48031749

2013-03-27 15:12:14

DenisChenu

Details Diff
Fixed issue 07698: EM's is_int() function causes problems when validating subquestions
Dev: don't really understand why $funcName($params[0]) with is_int and 1 don't send true ...
Affected Issues
07698
mod - application/helpers/expressions/em_core_helper.php Diff File

Issue History

Date Modified Username Field Change
2013-03-22 16:49 Mazi New Issue
2013-03-22 16:49 Mazi Status new => assigned
2013-03-22 16:49 Mazi Assigned To => DenisChenu
2013-03-22 16:49 Mazi File Added: limesurvey_survey_565959.lss
2013-03-27 15:55 DenisChenu Note Added: 24879
2013-03-27 15:59 DenisChenu Note Edited: 24879
2013-03-27 16:08 DenisChenu Changeset attached => LimeSurvey master 2f6ee193
2013-03-27 16:08 DenisChenu Note Added: 24880
2013-03-27 16:08 DenisChenu Resolution open => fixed
2013-03-27 16:12 DenisChenu Changeset attached => LimeSurvey 2.05 48031749
2013-03-27 16:12 DenisChenu Note Added: 24881
2013-03-27 16:13 DenisChenu Status assigned => resolved
2013-03-27 16:13 DenisChenu Fixed in Version => 2.05 RC
2013-03-27 16:13 DenisChenu Fixed in Version 2.05 RC => 2.00+
2013-04-08 21:59 c_schmitz Status resolved => closed