Skip to content

Commit

Permalink
Fixed issue #08785: repeat questions when choosing "All in One" (Buil…
Browse files Browse the repository at this point in the history
…d 140226 )

Dev: add a $qa['finalgroup'], how we managed it when attribute is in Plugin ?
  • Loading branch information
Shnoulle committed Feb 28, 2014
1 parent 3d1b9b3 commit d5889c7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -861,6 +861,11 @@ function run($surveyid,$args) {
{
$plus_qanda[] = $ia[4];
$plus_qanda[] = $ia[6]; // adds madatory identifyer for adding mandatory class to question wrapping div
// Add a finalgroup in qa array , needed for random attribute : TODO: find a way to have it in new quanda_helper in 2.1
if(isset($ia[10]))
$plus_qanda['finalgroup']=$ia[10];
else
$plus_qanda['finalgroup']=$ia[5];
$qanda[] = $plus_qanda;
}
if ($plus_inputnames)
Expand Down Expand Up @@ -1055,11 +1060,10 @@ function run($surveyid,$args) {

foreach ($qanda as $qa) // one entry per QID
{
// This is already tested before : we do only qanda for question in $gid
// Broke question random attribute in different group
//if ($gid != $qa[6]) {
// continue;
//}
// Test if finalgroup is in this qid (for all in one survey, else we do only qanda for needed question (in one by one or group by goup)
if ($gid != $qa['finalgroup']) {
continue;
}
$qid = $qa[4];
$qinfo = LimeExpressionManager::GetQuestionStatus($qid);
$lastgrouparray = explode("X", $qa[7]);
Expand Down

0 comments on commit d5889c7

Please sign in to comment.