Skip to content

Commit

Permalink
Fixed issue #05848: Statistics report language drop down not filled c…
Browse files Browse the repository at this point in the history
…orrectly,

#05843: Error at statistics
  • Loading branch information
sachdeva-shubham committed Feb 25, 2012
1 parent 7727609 commit e454cf2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
15 changes: 9 additions & 6 deletions application/helpers/admin/statistics_helper.php
Expand Up @@ -276,8 +276,10 @@ function generate_statistics($surveyid, $allfields, $q2show='all', $usegraph=0,

global $rooturl, $rootdir, $homedir, $homeurl, $scriptname,
$chartfontfile, $chartfontsize, $admintheme, $pdfdefaultfont, $pdffontsize;



//load surveytranslator helper
Yii::import('application.helpers.surveytranslator_helper', true);

$imagedir = Yii::app()->getConfig("imagedir");
$tempdir = Yii::app()->getConfig("tempdir");
$tempurl = Yii::app()->getConfig("tempurl");
Expand Down Expand Up @@ -2114,6 +2116,7 @@ function generate_statistics($surveyid, $allfields, $q2show='all', $usegraph=0,
break;
}
echo '';

//loop thorugh the array which contains all answer data
foreach ($alist as $al)
{
Expand Down Expand Up @@ -2533,24 +2536,24 @@ function generate_statistics($surveyid, $allfields, $q2show='all', $usegraph=0,
$justcode[]=$al[0];

//edit labels and put them into antoher array

//first check if $tempcount is > 0. If yes, $row[0] has been modified and $tempcount has the original count.
if ($tempcount > 0)
{
$lbl[] = wordwrap(FlattenText("$al[1] ($tempcount)"), 25, "\n"); // NMO 2009-03-24
$lblrtl[] = utf8_strrev(wordwrap(FlattenText("$al[1] )$tempcount("), 25, "\n")); // NMO 2009-03-24
$lblrtl[] = UTF8Strrev(wordwrap(FlattenText("$al[1] )$tempcount("), 25, "\n")); // NMO 2009-03-24
}
else
{
$lbl[] = wordwrap(FlattenText("$al[1] ($row[0])"), 25, "\n"); // NMO 2009-03-24
$lblrtl[] = utf8_strrev(wordwrap(FlattenText("$al[1] )$row[0]("), 25, "\n")); // NMO 2009-03-24
$lblrtl[] = UTF8Strrev(wordwrap(FlattenText("$al[1] )$row[0]("), 25, "\n")); // NMO 2009-03-24

}

} //end while -> loop through results

} //end foreach -> loop through answer data

//no filtering of incomplete answers and NO multiple option questions
//if ((incompleteAnsFilterState() != "filter") and ($qtype != "M") and ($qtype != "P"))
//error_log("TIBO ".print_r($showaggregated_indice_table,true));
Expand Down
4 changes: 3 additions & 1 deletion application/views/admin/export/statistics_view.php
Expand Up @@ -50,7 +50,9 @@
{
$language_options .= "selected=\"selected\" " ;
}
$language_options .= ">".getLanguageNameFromCode($survlang,true)."</option>\n";
$temp = getLanguageNameFromCode($survlang,true);
$language_options .= ">".$temp[1]."</option>\n";

}

?>
Expand Down

0 comments on commit e454cf2

Please sign in to comment.