From 32a92653f3a90ef41c17d42ed33af7915d5ec012 Mon Sep 17 00:00:00 2001 From: Gabriel Jenik Date: Mon, 23 Feb 2015 15:58:50 -0300 Subject: [PATCH] Fixed Issue: On RemoteControl2, no message set when reordering not possible. Mehtods involved: RemoteControl2::set_question_properties() and RemoteControl2::set_group_properties(). --- .../helpers/remotecontrol/remotecontrol_handle.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/application/helpers/remotecontrol/remotecontrol_handle.php b/application/helpers/remotecontrol/remotecontrol_handle.php index 780af90dd48..812d3c8d47b 100644 --- a/application/helpers/remotecontrol/remotecontrol_handle.php +++ b/application/helpers/remotecontrol/remotecontrol_handle.php @@ -1108,11 +1108,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); + $aResult[$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 @@ -1488,11 +1489,11 @@ public function set_question_properties($sSessionKey, $iQuestionID, $aQuestionDa //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 { - $oQuestion->setAttribute($sFieldName,$sValue); + $aResult[$sFieldName]='Questions with dependencies - Order cannot be changed'; + continue; } + $oQuestion->setAttribute($sFieldName,$sValue); try {