View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
18049Bug reportsRemoteControlpublic2022-07-27 22:29
Reporterprobesys Assigned Togabrieljenik  
PrioritynoneSeverityblock 
Status feedbackResolutionopen 
Product Version5.3.x 
Summary18049: Remote Control export statistic not work for certain type of fields
Description

Hi,

I found that some field types cannot be exported.

Indeed, the format of the fields of the sql queries is not good.

I don't know if it's good practice, I fixed the problem.

The file : common_helper.php

The function : createCompleteSGQA($iSurveyID, $aFilters, $sLanguage)

--- a/public/ls/application/helpers/common_helper.php
+++ b/public/ls/application/helpers/common_helper.php
@@ -1184,7 +1184,8 @@ function createCompleteSGQA($iSurveyID, $aFilters, $sLanguage)

             //go through all the (multiple) answers
             foreach ($result as $row) {
  • $myfield2 = $flt['type'] . $myfield . reset($row);
  • //$myfield2 = $flt['type'] . $myfield . reset($row);
  • $myfield2 = $flt['type'].$myfield .$row['title'];//fix bug probesys
    $allfields[] = $myfield2;
    }
    break;
    @@ -1199,7 +1200,8 @@ function createCompleteSGQA($iSurveyID, $aFilters, $sLanguage)

             //go through all the (multiple) answers
             foreach ($result as $row) {
  • $myfield2 = $myfield . reset($row);
  • //$myfield2 = $myfield . reset($row);
  • $myfield2 = $myfield .$row['title'];//fix bug probesys
    $allfields[] = $myfield2;
    }
    break;
    @@ -1217,7 +1219,8 @@ function createCompleteSGQA($iSurveyID, $aFilters, $sLanguage)
    foreach ($result as $row) {
    $fresult = Question::model()->getQuestionsForStatistics('title, question', "parent_qid=$flt[qid] AND language = '{$sLanguage}' AND scale_id = 1", 'question_order');
    foreach ($fresult as $frow) {
  • $myfield2 = $myfield . reset($row) . "_" . $frow['title'];
  • //$myfield2 = $myfield . reset($row) . "_" . $frow['title'];
  • $myfield2 = $myfield .$row['title']. "_" . $frow['title'];//fix bug probesys
    $allfields[] = $myfield2;
    }
    }
Steps To Reproduce

Steps to reproduce

(Replace this text with detailed step-by-step instructions on how to reproduce the issue)

Expected result

(Write here what you expected to happen)

Actual result

(Write here what happened instead)

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)5.3.6
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMysql 5
Server OS (if known)
Webserver software & version (if known)
PHP Version7.3.31

Users monitoring this issue

There are no users monitoring this issue.

Activities

gabrieljenik

gabrieljenik

2022-07-05 15:32

manager   ~70737

Would you please crate a PR for this?

probesys

probesys

2022-07-07 14:50

reporter   ~70788

I push a pull request

https://github.com/LimeSurvey/LimeSurvey/pull/2502/commits/a34c39ecf400599f25806db2e239053bc29af4ac

gabrieljenik

gabrieljenik

2022-07-11 14:22

manager   ~70848

Thanks.

If I am right the root cause of the problem is that the parameter fields is never used here.
https://github.com/prob6/LimeSurvey/blob/a34c39ecf400599f25806db2e239053bc29af4ac/application/models/Question.php#L512

Right?

gabrieljenik

gabrieljenik

2022-07-27 22:28

manager   ~71203

Shouldn't this solution be applied for Dual Scale as well?

Do you have an LSA used for testing?
Even a script?

Issue History

Date Modified Username Field Change
2022-04-25 15:13 probesys New Issue
2022-04-26 08:27 galads Assigned To => gabrieljenik
2022-04-26 08:27 galads Status new => assigned
2022-07-05 15:32 gabrieljenik Note Added: 70737
2022-07-05 15:32 gabrieljenik Bug heat 0 => 2
2022-07-05 15:32 gabrieljenik Assigned To gabrieljenik =>
2022-07-05 15:32 gabrieljenik Status assigned => acknowledged
2022-07-07 14:50 probesys Note Added: 70788
2022-07-07 14:50 probesys Bug heat 2 => 4
2022-07-11 14:22 gabrieljenik Note Added: 70848
2022-07-27 22:28 gabrieljenik Note Added: 71203
2022-07-27 22:29 gabrieljenik Assigned To => gabrieljenik
2022-07-27 22:29 gabrieljenik Status acknowledged => feedback