Skip to content

Commit

Permalink
Fixed issue #6481 - Filters showing all text responses
Browse files Browse the repository at this point in the history
  • Loading branch information
jcleeland committed Aug 18, 2012
1 parent a26385a commit 874aa80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion application/controllers/admin/statistics.php
Expand Up @@ -453,7 +453,7 @@ public function run($surveyid = 0, $subaction = null)
Yii::app()->loadHelper('admin/statistics');
$showtextinline=isset($_POST['showtextinline']) ? 1 : 0;
$aData['showtextinline'] = $showtextinline;

//Show Summary results
if (isset($summary) && $summary)
{
Expand Down Expand Up @@ -497,6 +497,7 @@ public function run($surveyid = 0, $subaction = null)
function listcolumn($surveyid, $column, $sql, $sortby="", $sortmethod="", $sorttype="")
{
$search['condition']=$column." != ''";
if($sql != "") {$search['condition'].= " AND ($sql)";}
if($sorttype=='N') {$sortby = "($sortby * 1)";} //Converts text sorting into numerical sorting
if($sortby != "") $search['order']=$sortby.' '.$sortmethod;
$results=Survey_dynamic::model($surveyid)->findAll($search);
Expand Down
4 changes: 2 additions & 2 deletions application/views/admin/export/statistics_view.php
Expand Up @@ -9,7 +9,7 @@
<script type='text/javascript'>
var graphUrl="<?php echo Yii::app()->getController()->createUrl("admin/statistics/graph"); ?>";
var listColumnUrl="<?php echo Yii::app()->getController()->createUrl("admin/statistics/listcolumn/surveyid/".$surveyid."/column/"); ?>";
var sql="<?php //echo urlencode($sql) ?>";
var sql="<?php echo urlencode($sql); ?>";
var showTextInline="<?php echo $showtextinline ?>";
</script>
<form method='post' name='formbuilder' action='<?php echo Yii::app()->getController()->createUrl("admin/statistics/index/surveyid/$surveyid"); ?>#start'>
Expand Down Expand Up @@ -241,7 +241,7 @@
<select name='<?php
if ($flt[2] == "M" ) { echo "M";};
if ($flt[2] == "P" ) { echo "P";};
echo "{$surveyid}X{$flt[1]}X{$flt[0]}[]'";?> multiple='multiple'>
echo "{$surveyid}X{$flt[1]}X{$flt[0]}[]'";?>' multiple='multiple'>
<?php
}
}?>
Expand Down

0 comments on commit 874aa80

Please sign in to comment.