Skip to content

Commit

Permalink
Dev: Implementation of randomization groups, see demo survey for deta…
Browse files Browse the repository at this point in the history
…ils. (Set in attributes)

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev@9528 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
David Olivier committed Nov 25, 2010
1 parent 290782a commit 6a6b22a
Show file tree
Hide file tree
Showing 5 changed files with 1,575 additions and 10 deletions.
13 changes: 12 additions & 1 deletion common_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2245,6 +2245,7 @@ function createFieldMap($surveyid, $style='short', $force_refresh=false, $questi
}

}

//Get list of questions
if (is_null($sQuestionLanguage))
{
Expand Down Expand Up @@ -2291,7 +2292,7 @@ function createFieldMap($surveyid, $style='short', $force_refresh=false, $questi
{
$usedinconditions = "N";
}

// Field identifier
// GXQXSXA
// G=Group Q=Question S=Subquestion A=Answer Option
Expand Down Expand Up @@ -2596,12 +2597,14 @@ function createFieldMap($surveyid, $style='short', $force_refresh=false, $questi
}
}
}

if (isset($fieldmap)) {
$globalfieldmap[$surveyid][$style][$clang->langcode] = $fieldmap;
return $fieldmap;
}
}


/**
* put your comment there...
*
Expand Down Expand Up @@ -4312,6 +4315,14 @@ function questionAttributes($returnByName=false)
"help"=>$clang->gT("Allowed file types in comma separated format. e.g. pdf,doc,odt"),
"caption"=>$clang->gT("Allowed file types"));

$qattributes["random_group"]=array(
"types"=>"15ABCDEFGHIKLMNOPQRSTUWXYZ!:;|",
'category'=>$clang->gT('Display'),
'sortorder'=>100,
'inputtype'=>'text',
"help"=>$clang->gT("Place questions into a specified randomization group, all questions included in the specified group will appear in a random order"),
"caption"=>$clang->gT("Randomization Group Name:"));


//This builds a more useful array (don't modify)
if ($returnByName==false)
Expand Down

0 comments on commit 6a6b22a

Please sign in to comment.