Skip to content

Commit

Permalink
Dev Improved error messages from remote control to allow for better
Browse files Browse the repository at this point in the history
analysis of the error.
  • Loading branch information
SamMousa committed Oct 2, 2013
1 parent 81384ff commit bf6234b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/helpers/remotecontrol/remotecontrol_handle.php
Expand Up @@ -2298,8 +2298,8 @@ public function export_responses($sSessionKey, $iSurveyID, $sDocumentType, $sLan
{
if (!$this->_checkSessionKey($sSessionKey)) return array('status' => 'Invalid session key');
Yii::app()->loadHelper('admin/exportresults');
if (!tableExists('{{survey_' . $iSurveyID . '}}')) return array('status' => 'No Data');
if(!$maxId = SurveyDynamic::model($iSurveyID)->getMaxId()) return array('status' => 'No Data');
if (!tableExists('{{survey_' . $iSurveyID . '}}')) return array('status' => 'No Data, survey table does not exist.');
if(!$maxId = SurveyDynamic::model($iSurveyID)->getMaxId()) return array('status' => 'No Data, could not get max id.');

if (!Permission::model()->hasSurveyPermission($iSurveyID, 'responses', 'export')) return array('status' => 'No permission');
if (is_null($sLanguageCode)) $sLanguageCode=getBaseLanguageFromSurveyID($iSurveyID);
Expand Down

0 comments on commit bf6234b

Please sign in to comment.