Skip to content

Commit

Permalink
Merge pull request #279 from gabrieljenik/patch-3
Browse files Browse the repository at this point in the history
Fixed Issue: On RemoteControl2, no message set when reordering not possible.
  • Loading branch information
Aestu committed Feb 23, 2015
2 parents d2bc809 + 3e866f2 commit cd6acad
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions application/helpers/remotecontrol/remotecontrol_handle.php
Expand Up @@ -1112,11 +1112,12 @@ public function set_group_properties($sSessionKey, $iGroupID, $aGroupData)
//We do not allow groups with dependencies to change order - that would lead to broken dependencies

if((isset($has_dependencies) || isset($depented_on)) && $sFieldName == 'group_order')
$aFailed[$sFieldName]='Group with dependencies - Order cannot be changed';
else
{
$oGroup->setAttribute($sFieldName,$sValue);
$aResults[$sFieldName]='Group with dependencies - Order cannot be changed';
continue;
}
$oGroup->setAttribute($sFieldName,$sValue);

try
{
// save the change to database - one by one to allow for validation to work
Expand Down Expand Up @@ -1495,12 +1496,13 @@ public function set_question_properties($sSessionKey, $iQuestionID, $aQuestionDa
$is_criteria_question=getQuestDepsForConditions($oQuestion->sid,$oQuestion->gid,"all",$iQuestionID,"by-targqid");
//We do not allow questions with dependencies in the same group to change order - that would lead to broken dependencies

if((isset($dependencies) || isset($is_criteria_question)) && $sFieldName == 'question_order')
$aFailed[$sFieldName]='Questions with dependencies - Order cannot be changed';
else
if ((isset($dependencies) || isset($is_criteria_question)) && $sFieldName == 'question_order')
{
$oQuestion->setAttribute($sFieldName,$sValue);
$aResult[$sFieldName] = 'Questions with dependencies - Order cannot be changed';
continue;
}

$oQuestion->setAttribute($sFieldName, $sValue);

try
{
Expand Down

0 comments on commit cd6acad

Please sign in to comment.