Skip to content
Permalink
Browse files

Fixed issue #14749: Unable to save question group/question positions …

…after reordering
  • Loading branch information...
dominikvitt committed Jun 13, 2019
1 parent 25af461 commit 149bfccc615990da90fbdda0c2004093c40f7f69
Showing with 21 additions and 0 deletions.
  1. +3 −0 application/controllers/admin/surveyadmin.php
  2. +18 −0 application/helpers/common_helper.php
@@ -1280,6 +1280,9 @@ private function _showReorderForm($iSurveyID)
$aData['organizebar']['savebuttonright'] = true;
$aData['organizebar']['closebuttonright']['url'] = $this->getController()->createUrl("admin/survey/sa/view/", array('surveyid' => $iSurveyID));
$aData['organizebar']['saveandclosebuttonright']['url'] = true;
$aData['surveybar']['buttons']['view'] = true;
$aData['surveybar']['savebutton']['form'] = 'frmOrganize';
foreach ($aGrouplist as $iGID => $aGroup) {
LimeExpressionManager::StartProcessingGroup($aGroup['gid'], false, $iSurveyID);
@@ -820,6 +820,24 @@ function groupOrderThenQuestionOrder($a, $b)
return $GroupResult;
}
/**
* @param integer $iSurveyID
* @param integer $qid
* @param integer $newgid
*/
function fixMovedQuestionConditions($qid, $oldgid, $newgid, $iSurveyID = null) //Function rewrites the cfieldname for a question after group change
{
if (!isset($iSurveyID)) {
$iSurveyID = Yii::app()->getConfig('sid');
}
$qid = (int) $qid;
$oldgid = (int) $oldgid;
$newgid = (int) $newgid;
Condition::model()->updateCFieldName($iSurveyID, $qid, $oldgid, $newgid);
// TMSW Condition->Relevance: Call LEM->ConvertConditionsToRelevance() when done
}
/**
* This function returns POST/REQUEST vars, for some vars like SID and others they are also sanitized
* TODO: extends Yii:getParam

0 comments on commit 149bfcc

Please sign in to comment.
You can’t perform that action at this time.