View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 03604 | Bug reports | Other | public | 2009-08-27 10:16 | 2010-08-25 20:23 |
| Reporter | ResearchOnBlogs | Assigned To | texens | ||
| Priority | normal | Severity | minor | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 1.85+ | ||||
| Summary | 03604: show username beside the ID in view "saved responses" + "submitted responses" | ||||
| Description | It would be usefull to have the username (maybe email, too) beside the ID in the response overviews. ID | name | surname | email | first question |.... | ||||
| Tags | No tags attached. | ||||
| Attached Files | browse.php.patch (6,919 bytes)
diff -rupBw -x '*.svn' -x '*.project' -x config.php /home/amit/workspace/limesurvey/source/limesurvey/admin/browse.php ./admin/browse.php
--- /home/amit/workspace/limesurvey/source/limesurvey/admin/browse.php 2010-03-08 23:53:40.000000000 +0530
+++ ./admin/browse.php 2010-03-16 02:40:58.000000000 +0530
@@ -145,15 +145,28 @@ if ($subaction == "id") // Looking at a
$fncount = 0;
$fnrows = array(); //Create an empty array in case fetch_array does not return any rows
- while ($fnrow = $fnresult->FetchRow()) {++$fncount; $fnrows[] = $fnrow; $private = $fnrow['private']; $datestamp=$fnrow['datestamp']; $ipaddr=$fnrow['ipaddr']; $refurl=$fnrow['refurl'];} // Get table output into array
+ while ($fnrow = $fnresult->FetchRow())
+ {
+ ++$fncount;
+ $fnrows[] = $fnrow;
+ $private = $fnrow['private'];
+ $datestamp = $fnrow['datestamp'];
+ $ipaddr = $fnrow['ipaddr'];
+ $refurl = $fnrow['refurl'];
+ } // Get table output into array
// Perform a case insensitive natural sort on group name then question title of a multidimensional array
usort($fnrows, 'CompareGroupThenTitle');
$fnames[] = array("id", "id", "id");
- if ($private == "N") //add token to top ofl ist is survey is not private
+ if ($private == "N") //add token to top of list if the survey is not private
{
+
+ $tokentable = db_table_name("tokens_".$surveyid);
$fnames[] = array("token", "token", $clang->gT("Token ID"));
+ $fnames[] = array("firstname", $clang->gT("First Name"), $clang->gT("First Name"), "0", '');
+ $fnames[] = array("lastname", $clang->gT("Last Name"), $clang->gT("Last Name"), "0", '');
+ $fnames[] = array("email", $clang->gT("Email"), $clang->gT("Email"), "0", '');
}
$fnames[] = array("completed", "Completed", $clang->gT("Completed"), "0");
@@ -287,9 +300,19 @@ if ($subaction == "id") // Looking at a
}
$nfncount = count($fnames)-1;
//SHOW INDIVIDUAL RECORD
- $idquery = "SELECT *, CASE WHEN submitdate IS NULL THEN 'N' ELSE 'Y' END as completed FROM $surveytable WHERE ";
- if (incompleteAnsFilterstate() == "inc") {$idquery .= "(submitdate = ".$connect->DBDate('1980-01-01'). " OR submitdate IS NULL) AND ";}
- elseif (incompleteAnsFilterstate() == "filter") {$idquery .= "submitdate >= ".$connect->DBDate('1980-01-01'). " AND ";}
+ $idquery = "SELECT *, CASE WHEN submitdate IS NULL THEN 'N' ELSE 'Y' END as completed FROM $surveytable ";
+ $idquery .= ($private == "N") ? " , $tokentable WHERE " : " WHERE ";
+ if (incompleteAnsFilterstate() == "inc")
+ {
+ $idquery .= "(submitdate = ".$connect->DBDate('1980-01-01'). " OR submitdate IS NULL) AND ";
+ if ($private == "N") {$idquery .= " $surveytable.token = $tokentable.token AND ";}
+ }
+ elseif (incompleteAnsFilterstate() == "filter")
+ {
+ $idquery .= "submitdate >= ".$connect->DBDate('1980-01-01'). " AND ";
+ if ($private == "N") {$idquery .= " $surveytable.token = $tokentable.token AND ";}
+ }
+ elseif ($private == "N") {$idquery .= " $surveytable.token = $tokentable.token AND ";}
if ($id<1) {$id=1;}
if (isset($_POST['sql']) && $_POST['sql'])
{
@@ -406,7 +429,11 @@ elseif ($subaction == "all")
if ($private == "N") //Add token to list
{
+ $tokentable = db_table_name("tokens_".$surveyid);
$fnames[] = array("token", $clang->gT("Token"), $clang->gT("Token ID"), "0", '');
+ $fnames[] = array("firstname", $clang->gT("First Name"), $clang->gT("First Name"), "0", '');
+ $fnames[] = array("lastname", $clang->gT("Last Name"), $clang->gT("Last Name"), "0", '');
+ $fnames[] = array("email", $clang->gT("Email"), $clang->gT("Email"), "0", '');
}
$fnames[] = array("completed", "Completed", $clang->gT("Completed"), "0", 'D');
@@ -615,19 +642,37 @@ elseif ($subaction == "all")
if ($_POST['sql'] == "NULL")
{
$dtquery = "SELECT *, CASE WHEN submitdate IS NULL THEN 'N' ELSE 'Y' END as completed FROM $surveytable ";
- if (incompleteAnsFilterstate() == "inc") {$dtquery .= "WHERE submitdate is null";}
- elseif (incompleteAnsFilterstate() == "filter") {$dtquery .= " WHERE submitdate is not null ";}
+ if ($private == "N") {$dtquery .= ", $tokentable ";}
+ if (incompleteAnsFilterstate() == "inc")
+ {
+ $dtquery .= "WHERE submitdate is null";
+ if ($private == "N") {$dtquery .= " AND $surveytable.token = $tokentable.token ";}
+ }
+ elseif (incompleteAnsFilterstate() == "filter")
+ {
+ $dtquery .= " WHERE submitdate is not null ";
+ if ($private == "N") {$dtquery .= " AND $surveytable.token = $tokentable.token ";}
+ }
+ elseif ($private == "N") {$dtquery .= " AND $surveytable.token = $tokentable.token ";}
$dtquery .= " ORDER BY id";
}
else
{
- $dtquery = "SELECT *, CASE WHEN submitdate IS NULL THEN 'N' ELSE 'Y' END as completed FROM $surveytable WHERE ";
+ $dtquery = "SELECT *, CASE WHEN submitdate IS NULL THEN 'N' ELSE 'Y' END as completed FROM $surveytable";
+ $dtquery .= ($private == "N") ? " , $tokentable WHERE " : " WHERE ";
if (incompleteAnsFilterstate() == "inc") {
$dtquery .= "submitdate is null ";
+ if ($private == "N") {$dtquery .= " AND $surveytable.token = $tokentable.token ";}
if (stripcslashes($_POST['sql']) !== "") { $dtquery .= " AND "; }
}
elseif (incompleteAnsFilterstate() == "filter") {
$dtquery .= " submitdate is not null ";
+ if ($private == "N") {$dtquery .= " AND $surveytable.token = $tokentable.token ";}
+ if (stripcslashes($_POST['sql']) !== "") { $dtquery .= " AND "; }
+ }
+ elseif ($private == "N")
+ {
+ $dtquery .= " AND $surveytable.token = $tokentable.token ";
if (stripcslashes($_POST['sql']) !== "") { $dtquery .= " AND "; }
}
if (stripcslashes($_POST['sql']) !== "") { $dtquery .= stripcslashes($_POST['sql'])." "; }
@@ -637,8 +682,18 @@ elseif ($subaction == "all")
else
{
$dtquery = "SELECT *, CASE WHEN submitdate IS NULL THEN 'N' ELSE 'Y' END as completed FROM $surveytable ";
- if (incompleteAnsFilterstate() == "inc") {$dtquery .= " WHERE submitdate is null ";}
- elseif (incompleteAnsFilterstate() == "filter") {$dtquery .= " WHERE submitdate is not null ";}
+ if ($private == "N") {$dtquery .= ", $tokentable ";}
+ if (incompleteAnsFilterstate() == "inc")
+ {
+ $dtquery .= " WHERE submitdate is null ";
+ if ($private == "N") {$dtquery .= "AND $surveytable.token = $tokentable.token ";}
+ }
+ elseif (incompleteAnsFilterstate() == "filter")
+ {
+ $dtquery .= " WHERE submitdate is not null ";
+ if ($private == "N") {$dtquery .= "AND $surveytable.token = $tokentable.token ";}
+ }
+ elseif ($private == "N") {$dtquery .= " WHERE $surveytable.token = $tokentable.token ";}
$dtquery .= " ORDER BY id";
}
if ($order == "desc") {$dtquery .= " DESC";}
| ||||
| Bug heat | 6 | ||||
| Complete LimeSurvey version number (& build) | |||||
| I will donate to the project if issue is resolved | |||||
| Browser | |||||
| Database type & version | xx | ||||
| Server OS (if known) | xx | ||||
| Webserver software & version (if known) | xx | ||||
| PHP Version | xx | ||||
| Git branch / Pull Request URL | |||||
|
On my opinion thats not a bug, that's a Feature Request. @ c_schmitz: what do you think about it? |
|
|
I guess the addition would make sense. |
|
|
I would, but my cashflow is not really good.. Maybe I could sponsor it in January. |
|
|
No problem :-) |
|
|
Texens, patch looks fine to me - please commit. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2009-08-27 10:16 | ResearchOnBlogs | New Issue | |
| 2009-08-27 10:16 | ResearchOnBlogs | Status | new => assigned |
| 2009-08-27 10:16 | ResearchOnBlogs | Assigned To | => user372 |
| 2009-08-27 10:16 | ResearchOnBlogs | Database & DB-Version | => xx |
| 2009-08-27 10:16 | ResearchOnBlogs | Operating System (Server) | => xx |
| 2009-08-27 10:16 | ResearchOnBlogs | Webserver | => xx |
| 2009-08-27 10:16 | ResearchOnBlogs | PHP Version | => xx |
| 2009-08-29 11:50 |
|
Note Added: 09259 | |
| 2009-08-29 11:50 |
|
Assigned To | user372 => c_schmitz |
| 2009-08-29 13:42 | c_schmitz | Project | Bug reports => @2@ |
| 2009-10-02 14:10 | c_schmitz | Note Added: 09701 | |
| 2009-10-02 14:10 | c_schmitz | Status | assigned => feedback |
| 2009-11-18 13:19 | ResearchOnBlogs | Note Added: 10148 | |
| 2009-11-18 15:05 | c_schmitz | Note Added: 10149 | |
| 2009-11-18 15:05 | c_schmitz | Status | feedback => acknowledged |
| 2009-11-18 15:05 | c_schmitz | Assigned To | c_schmitz => |
| 2010-03-13 12:28 | c_schmitz | Status | acknowledged => assigned |
| 2010-03-13 12:28 | c_schmitz | Assigned To | => texens |
| 2010-03-15 22:24 | texens | File Added: browse.php.patch | |
| 2010-03-15 22:41 | texens | File Deleted: browse.php.patch | |
| 2010-03-15 22:41 | texens | File Added: browse.php.patch | |
| 2010-03-15 23:02 | c_schmitz | Project | @2@ => @10@ |
| 2010-03-15 23:09 | c_schmitz | Note Added: 11379 | |
| 2010-08-25 20:23 | texens | Status | assigned => closed |
| 2010-08-25 20:23 | texens | Resolution | open => fixed |
| 2021-03-08 20:08 | c_schmitz | Category | Statistics => (No Category) |