Skip to content

Commit

Permalink
Dev: Made some adjustments to better comply with coding guidelines.
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieljenik committed Feb 23, 2015
1 parent 0c94a87 commit 3e866f2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions application/helpers/remotecontrol/remotecontrol_handle.php
Expand Up @@ -1111,7 +1111,8 @@ public function set_group_properties($sSessionKey, $iGroupID, $aGroupData)
$depented_on = getGroupDepsForConditions($oGroup->sid,"all",$iGroupID,"by-targgid");
//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') {
if((isset($has_dependencies) || isset($depented_on)) && $sFieldName == 'group_order')
{
$aResults[$sFieldName]='Group with dependencies - Order cannot be changed';
continue;
}
Expand Down Expand Up @@ -1495,13 +1496,14 @@ 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'){
$aResult[$sFieldName] = 'Questions with dependencies - Order cannot be changed';
if ((isset($dependencies) || isset($is_criteria_question)) && $sFieldName == 'question_order')
{
$aResult[$sFieldName] = 'Questions with dependencies - Order cannot be changed';
continue;
}

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

try
{
$bSaveResult=$oQuestion->save(); // save the change to database
Expand Down

0 comments on commit 3e866f2

Please sign in to comment.