View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 04595 | Bug reports | Data Entry (non public) | public | 2010-09-12 23:42 | 2010-09-29 16:29 |
| Reporter | Assigned To | DenisChenu | |||
| Priority | normal | Severity | minor | ||
| Status | closed | Resolution | suspended | ||
| Product Version | 1.90+ | ||||
| Fixed in Version | 1.90+ | ||||
| Summary | 04595: Ranking questions can't not be filled by dataentry screen | ||||
| Description | When you answer survey with ranking questions using « dataentry screen » all fields in database stay empty (NULL value) Responses filled by public interface is working. | ||||
| Steps To Reproduce | Import survey joined. Use dataentry screen to anwser and look at results with « Browse responses in this survey » or in the database. | ||||
| Additional Information | Import survey joined. Use dataentry screen to anwser and look at results with « Browse responses in this survey » or in the database. | ||||
| Tags | No tags attached. | ||||
| Attached Files | dataentry.php.patch (6,713 bytes)
--- admin/dataentry.php 2010-09-13 21:56:08.000000000 +0200
+++ admin/dataentry.php.new 2010-09-13 21:56:06.000000000 +0200
@@ -67,9 +67,9 @@
$actsurresult = db_execute_assoc($actsurquery) or safe_die($connect->ErrorMsg());
$actsurrows = $actsurresult->FetchRow();
+
if ($_SESSION['USER_RIGHT_SUPERADMIN'] == 1 || $actsurrows['browse_response'])
{
-
$surveyoptions = browsemenubar($clang->gT("Browse Responses"));
if (!$surveyid && !$subaction)
{
@@ -221,9 +221,10 @@
$values=array();
$_POST['startlanguage']=$baselang;
$_POST['startdate']=$_POST['datestamp'];
- foreach ($fieldmap as $irow)
+ foreach ($fieldmap as $irow)
{
$fieldname = $irow['fieldname'];
+
if (isset($_POST[$fieldname]))
{
if ($_POST[$fieldname] == "" && ($irow['type'] == 'D' || $irow['type'] == 'N' || $irow['type'] == 'K'))
@@ -669,7 +670,7 @@
."\$b=i;\n"
."\$b += '';\n"
."\$inputname=\"RANK_$thisqid\"+\$b;\n"
- ."\$hiddenname=\"d$myfname\"+\$b;\n"
+ ."\$hiddenname=\"$myfname\"+\$b;\n"
."\$cutname=\"cut_$thisqid\"+i;\n"
."document.getElementById(\$cutname).style.display='none';\n"
."if (!document.getElementById(\$inputname).value)\n"
@@ -704,13 +705,13 @@
."\tif (cutindex > 1)\n"
."{\n"
."\$cut1name=\"cut_$thisqid\"+(cutindex-1);\n"
- ."\$cut2name=\"d$myfname\"+(cutindex);\n"
+ ."\$cut2name=\"$myfname\"+(cutindex);\n"
."document.getElementById(\$cut1name).style.display='';\n"
."document.getElementById(\$cut2name).value='';\n"
."}\n"
."\telse\n"
."{\n"
- ."\$cut2name=\"d$myfname\"+(cutindex);\n"
+ ."\$cut2name=\"$myfname\"+(cutindex);\n"
."document.getElementById(\$cut2name).value='';\n"
."}\n"
."\tvar i=document.getElementById('CHOICES_$thisqid').options.length;\n"
@@ -756,7 +757,7 @@
$ranklist .= " value='".$thistext."'";
}
$ranklist .= " onFocus=\"this.blur()\" />\n"
- . "<input type='hidden' id='d$myfname$j' name='d$myfname$j' value='";
+ . "<input type='hidden' id='$myfname$j' name='$myfname$j' value='";
if (isset($currentvalues) && isset($currentvalues[$k]) && $currentvalues[$k])
{
$ranklist .= $thiscode;
@@ -768,7 +769,7 @@
{
$ranklist .= "style='display:none'";
}
- $ranklist .= " id='cut_$thisqid$j' onclick=\"deletethis_$thisqid(document.editresponse.RANK_$thisqid$j.value, document.editresponse.d$myfname$j.value, document.editresponse.RANK_$thisqid$j.id, this.id)\" /><br />\n\n";
+ $ranklist .= " id='cut_$thisqid$j' onclick=\"deletethis_$thisqid(document.editresponse.RANK_$thisqid$j.value, document.editresponse.$myfname$j.value, document.editresponse.RANK_$thisqid$j.id, this.id)\" /><br />\n\n";
}
if (!isset($choicelist)) {$choicelist="";}
@@ -1839,7 +1840,7 @@
."\$b=i;\n"
."\$b += '';\n"
."\$inputname=\"RANK_$thisqid\"+\$b;\n"
- ."\$hiddenname=\"d$fieldname\"+\$b;\n"
+ ."\$hiddenname=\"$fieldname\"+\$b;\n"
."\$cutname=\"cut_$thisqid\"+i;\n"
."document.getElementById(\$cutname).style.display='none';\n"
."if (!document.getElementById(\$inputname).value)\n"
@@ -1874,13 +1875,13 @@
."\tif (cutindex > 1)\n"
."{\n"
."\$cut1name=\"cut_$thisqid\"+(cutindex-1);\n"
- ."\$cut2name=\"d$fieldname\"+(cutindex);\n"
+ ."\$cut2name=\"$fieldname\"+(cutindex);\n"
."document.getElementById(\$cut1name).style.display='';\n"
."document.getElementById(\$cut2name).value='';\n"
."}\n"
."\telse\n"
."{\n"
- ."\$cut2name=\"d$fieldname\"+(cutindex);\n"
+ ."\$cut2name=\"$fieldname\"+(cutindex);\n"
."document.getElementById(\$cut2name).value='';\n"
."}\n"
."\tvar i=document.getElementById('CHOICES_$thisqid').options.length;\n"
@@ -1933,7 +1934,7 @@
$ranklist .= "'";
}
$ranklist .= " onFocus=\"this.blur()\" />\n";
- $ranklist .= "<input type='hidden' id='d$fieldname$i' name='d$fieldname$i' value='";
+ $ranklist .= "<input type='hidden' id='$fieldname$i' name='$fieldname$i' value='";
$chosen[]=""; //create array
if (isset($myfname) && $_SESSION[$myfname])
{
@@ -1947,7 +1948,7 @@
$ranklist .= "style='display:none'";
}
$mfn=$fieldname.$i;
- $ranklist .= " id='cut_$thisqid$i' onclick=\"deletethis_$thisqid(document.addsurvey.RANK_$thisqid$i.value, document.addsurvey.d$fieldname$i.value, document.addsurvey.RANK_$thisqid$i.id, this.id)\" /><br />\n\n";
+ $ranklist .= " id='cut_$thisqid$i' onclick=\"deletethis_$thisqid(document.addsurvey.RANK_$thisqid$i.value, document.addsurvey.$fieldname$i.value, document.addsurvey.RANK_$thisqid$i.id, this.id)\" /><br />\n\n";
}
if (!isset($choicelist)) {$choicelist="";}
$choicelist .= "<select size='$anscount' class='choicelist' name='CHOICES' id='CHOICES_$thisqid' onclick=\"rankthis_$thisqid(this.options[this.selectedIndex].value, this.options[this.selectedIndex].text)\" >\n";
| ||||
| Bug heat | 8 | ||||
| Complete LimeSurvey version number (& build) | 9118 | ||||
| I will donate to the project if issue is resolved | |||||
| Browser | Iceweasel | ||||
| Database type & version | 143 | ||||
| Server OS (if known) | Debian Lenny | ||||
| Webserver software & version (if known) | apache 2.2.9 | ||||
| PHP Version | 5.2.6 (debian stable package) | ||||
| Git branch / Pull Request URL | |||||
|
Please have a look at this patch (remove « d » before hidden names). With this, dataentry is now working with ranking questions. |
|
|
Thank you !! But i have an error with the patch : javascript error when i trye to remove an option. :) |
|
|
Fixed in 9136, Thanks again Flyinvap. (remove the d only for name ) |
|
|
New 1.90+ version was released. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2010-09-12 23:42 |
|
New Issue | |
| 2010-09-12 23:42 |
|
File Added: limesurvey_survey_26778.lss | |
| 2010-09-12 23:43 |
|
Issue Monitored: user9658 | |
| 2010-09-12 23:50 | DenisChenu | Issue Monitored: DenisChenu | |
| 2010-09-13 22:35 |
|
File Added: dataentry.php.patch | |
| 2010-09-13 22:35 |
|
Note Added: 12842 | |
| 2010-09-16 16:23 | DenisChenu | Note Added: 12854 | |
| 2010-09-16 16:24 | DenisChenu | Assigned To | => DenisChenu |
| 2010-09-16 16:24 | DenisChenu | Status | new => confirmed |
| 2010-09-16 18:08 | DenisChenu | Status | confirmed => resolved |
| 2010-09-16 18:08 | DenisChenu | Fixed in Version | => 1.90+ |
| 2010-09-16 18:09 | DenisChenu | Note Added: 12855 | |
| 2010-09-29 16:29 | c_schmitz | Note Added: 12935 | |
| 2010-09-29 16:29 | c_schmitz | Status | resolved => closed |
| 2021-08-04 22:19 | guest | Bug heat | 6 => 8 |
| 2026-10-25 16:41 | c_schmitz | Resolution | open => suspended |