Skip to content

Commit

Permalink
Fixed issue: DB error when trying to activate already activated survey
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Oct 19, 2020
1 parent 637b283 commit d8ca09d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion application/helpers/remotecontrol/remotecontrol_handle.php
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ public function set_survey_properties($sSessionKey, $iSurveyID, $aSurveyData)
* Activate survey (RPC function)
*
* Return the result of the activation
* Failure status : Invalid Survey ID, Constistency check error, Activation Error, Invalid session key, No permission
* Failure status : Invalid Survey ID, Survey already active, Consistency check error, Activation Error, Invalid session key, No permission
*
* @access public
* @param string $sSessionKey Auth credentials
Expand All @@ -457,6 +457,9 @@ public function activate_survey($sSessionKey, $iSurveyID)
if (is_null($oSurvey)) {
return array('status' => 'Error: Invalid survey ID');
}
if ($oSurvey->isActive) {
return array('status' => 'Error: Survey already active');
}
// Check consistency for groups and questions
Yii::app()->loadHelper('admin/activate');
$checkHasGroup = checkHasGroup($iSurveyID);
Expand Down

0 comments on commit d8ca09d

Please sign in to comment.