Skip to content

Commit

Permalink
Fixed issue #6372 Browse text responses does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
jcleeland committed Jul 23, 2012
1 parent 1edd37e commit 1ed2940
Show file tree
Hide file tree
Showing 7 changed files with 500 additions and 377 deletions.
20 changes: 20 additions & 0 deletions application/controllers/admin/statistics.php
Expand Up @@ -531,6 +531,9 @@ public function run($surveyid, $subaction = null)
$aData['usegraph'] = $usegraph;
$outputType = $_POST['outputtype'];

$selects=buildSelects($summary, $surveyid, $statlang);
$aData['sql']=implode(" AND ", $selects);

switch($outputType){
case 'html':
$statisticsoutput .= generate_statistics($surveyid,$summary,$summary,$usegraph,$outputType,'DD',$statlang);
Expand Down Expand Up @@ -559,6 +562,23 @@ public function run($surveyid, $subaction = null)

}

/* Returns a simple list of values in a particular column, that meet the
* requirements of the SQL
*
* */
function listcolumn($surveyid, $column, $sql)
{
$results=Survey_dynamic::model($surveyid)->findAll($column." != ''");
foreach($results as $row) {
?><div class='statisticscolumnid'>
<a href='<?php echo Yii::app()->getController()->createUrl("admin/responses/view/surveyid/".$surveyid."/id/".$row['id']); ?>' target='_blank'><?php echo $row['id'] ?></a>
</div>
<div class='statisticscolumndata'>
<?php echo $row[$column] ?>
</div>
<div style='clear: both'></div><?php
}
}
function graph()
{
Yii::app()->loadHelper('admin/statistics');
Expand Down

0 comments on commit 1ed2940

Please sign in to comment.