Skip to content

Commit

Permalink
Fixed issue #8386: Blank page when try to export statistics of input …
Browse files Browse the repository at this point in the history
…text file
  • Loading branch information
c-schmitz committed Nov 21, 2013
1 parent 1ff0b16 commit c2e0fe4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion application/helpers/admin/activate_helper.php
Expand Up @@ -26,7 +26,7 @@ function fixNumbering($fixnumbering, $iSurveyID)
LimeExpressionManager::RevertUpgradeConditionsToRelevance($iSurveyID);
//Fix a question id - requires renumbering a question
$oldqid = (int) $fixnumbering;
$lastqid=Questions::model()->getMaxId('qid', true); // Always refresh as we insert new qid's
$lastqid=Question::model()->getMaxId('qid', true); // Always refresh as we insert new qid's
$newqid=$lastqid+1;

// Not sure we can do this in MSSQL ?
Expand Down
4 changes: 2 additions & 2 deletions application/helpers/admin/import_helper.php
Expand Up @@ -2948,7 +2948,7 @@ function CSVImportSurvey($sFullFilepath,$iDesiredSurveyId=NULL,$bTranslateLinks=
if ($qtypes[$questionrowdata['type']]['subquestions']<2)
{
$aInsertData=array('qid'=>$aQIDReplacements[$oldqid],'code'=>$labelrow['code'],'answer'=>$labelrow['title'],'sortorder'=>$labelrow['sortorder'],'language'=>$labelrow['language'],'assessment_value'=>$labelrow['assessment_value']);
Answers::model()->insertRecords($aInsertData) or safeDie($clang->gT("Error").": Failed to insert data [4]<br />");
Answer::model()->insertRecords($aInsertData) or safeDie($clang->gT("Error").": Failed to insert data [4]<br />");
}
else
{
Expand Down Expand Up @@ -3148,7 +3148,7 @@ function CSVImportSurvey($sFullFilepath,$iDesiredSurveyId=NULL,$bTranslateLinks=
$asrowdata["sid"]=$iNewSID;
unset($asrowdata["id"]);

$result=Assessments::model()->insertRecords($asrowdata) or safeDie("Couldn't insert assessment<br />");
$result=Assessment::model()->insertRecords($asrowdata) or safeDie("Couldn't insert assessment<br />");

unset($newgid);
}
Expand Down
2 changes: 1 addition & 1 deletion application/helpers/admin/statistics_helper.php
Expand Up @@ -723,7 +723,7 @@ protected function buildOutputList($rt, $language, $surveyid, $outputType, $sql,
$qaid=$aQuestionInfo['aid'];

//get question data
$nresult = Questions::model()->find('language=:language AND parent_qid=0 AND qid=:qid', array(':language'=>$language, ':qid'=>$qqid));
$nresult = Question::model()->find('language=:language AND parent_qid=0 AND qid=:qid', array(':language'=>$language, ':qid'=>$qqid));
$qtitle=$nresult->title;
$qtype=$nresult->type;
$qquestion=flattenText($nresult->question);
Expand Down

0 comments on commit c2e0fe4

Please sign in to comment.