Skip to content

Commit

Permalink
Dev Fixed some question attributes
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@9712 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Jan 24, 2011
1 parent c78ec8f commit 6790622
Showing 1 changed file with 46 additions and 44 deletions.
90 changes: 46 additions & 44 deletions common_functions.php
Expand Up @@ -93,6 +93,7 @@ function getqtypelist($SelectedCode = "T", $ReturnType = "selector")
$group['MaskQuestions'] = $clang->gT("Mask questions");
$group['SinChoiceQues'] = $clang->gT("Single choice questions");
$group['MulChoiceQues'] = $clang->gT("Multiple choice questions");
$group['TextQuestions'] = $clang->gT("Text questions");


$qtypes = array(
Expand Down Expand Up @@ -163,7 +164,7 @@ function getqtypelist($SelectedCode = "T", $ReturnType = "selector")
'assessable'=>0,
'answerscales'=>0),
"K"=>array('description'=>$clang->gT("Multiple Numerical Input"),
'group'=>$group['SinChoiceQues'],
'group'=>$group['MaskQuestions'],
'hasdefaultvalues'=>0,
'subquestions'=>1,
'assessable'=>1,
Expand Down Expand Up @@ -199,7 +200,7 @@ function getqtypelist($SelectedCode = "T", $ReturnType = "selector")
'assessable'=>1,
'answerscales'=>0),
"Q"=>array('description'=>$clang->gT("Multiple Short Text"),
'group'=>$group['SinChoiceQues'],
'group'=>$group['TextQuestions'],
'subquestions'=>1,
'hasdefaultvalues'=>0,
'assessable'=>0,
Expand All @@ -211,19 +212,19 @@ function getqtypelist($SelectedCode = "T", $ReturnType = "selector")
'assessable'=>1,
'answerscales'=>1),
"S"=>array('description'=>$clang->gT("Short Free Text"),
'group'=>$group['SinChoiceQues'],
'group'=>$group['TextQuestions'],
'subquestions'=>0,
'hasdefaultvalues'=>0,
'assessable'=>0,
'answerscales'=>0),
"T"=>array('description'=>$clang->gT("Long Free Text"),
'group'=>$group['SinChoiceQues'],
'group'=>$group['TextQuestions'],
'subquestions'=>0,
'hasdefaultvalues'=>0,
'assessable'=>0,
'answerscales'=>0),
"U"=>array('description'=>$clang->gT("Huge Free Text"),
'group'=>$group['SinChoiceQues'],
'group'=>$group['TextQuestions'],
'subquestions'=>0,
'hasdefaultvalues'=>0,
'assessable'=>0,
Expand Down Expand Up @@ -3162,7 +3163,7 @@ function templatereplace($line, $replacements=array())
if (strpos($line, "{SAVEMESSAGE}") !== false) $line=str_replace("{SAVEMESSAGE}", $clang->gT("Enter a name and password for this survey and click save below.")."<br />\n".$clang->gT("Your survey will be saved using that name and password, and can be completed later by logging in with the same name and password.")."<br /><br />\n".$clang->gT("If you give an email address, an email containing the details will be sent to you."), $line);
if (strpos($line, "{SAVEALERT}") !== false)
{
if ($thissurvey['anonymized']=='Y')
if (isset($thissurvey['anonymized']) && $thissurvey['anonymized'] =='Y')
{
$savealert=$clang->gT("To remain anonymous please use a pseudonym as your username, also an email address is not required.");
}
Expand Down Expand Up @@ -3666,7 +3667,7 @@ function questionAttributes($returnByName=false)
'options'=>array(0=>$clang->gT('No'),
1=>$clang->gT('Yes')),
'default'=>0,
"help"=>$clang->gT("Sort answers alphabetically"),
"help"=>$clang->gT("Sort the answer options alphabetically"),
"caption"=>$clang->gT('Sort answers alphabetically'));

$qattributes["answer_width"]=array(
Expand All @@ -3680,15 +3681,15 @@ function questionAttributes($returnByName=false)
"caption"=>$clang->gT('Answer width'));

$qattributes["array_filter"]=array(
"types"=>"1ABCEF:;MPLT",
"types"=>"1ABCEF:;MPL",
'category'=>$clang->gT('Logic'),
'sortorder'=>100,
'inputtype'=>'text',
"help"=>$clang->gT("Enter the code of a Multiple choice question to only show the matching answer options in this question."),
"caption"=>$clang->gT('Array filter'));

$qattributes["array_filter_exclude"]=array(
"types"=>"1ABCEF:;MPLT",
"types"=>"1ABCEF:;MPL",
'category'=>$clang->gT('Logic'),
'sortorder'=>100,
'inputtype'=>'text',
Expand All @@ -3710,8 +3711,8 @@ function questionAttributes($returnByName=false)
'category'=>$clang->gT('Display'),
'sortorder'=>100,
'inputtype'=>'text',
"help"=>$clang->gT('Category Separator'),
"caption"=>$clang->gT('Category Separator'));
"help"=>$clang->gT('Category separator'),
"caption"=>$clang->gT('Category separator'));

$qattributes["code_filter"]=array(
"types"=>"WZ",
Expand Down Expand Up @@ -3810,15 +3811,15 @@ function questionAttributes($returnByName=false)
$qattributes["exclude_all_others"]=array(
"types"=>"M",
'category'=>$clang->gT('Logic'),
'sortorder'=>100,
'sortorder'=>130,
'inputtype'=>'text',
"help"=>$clang->gT('Excludes all other options if a certain answer is selected - just enter the answer code(s) seperated with a semikolon.'),
"caption"=>$clang->gT('Exclusive option'));

$qattributes["exclude_all_others_auto"]=array(
"types"=>"M",
'category'=>$clang->gT('Logic'),
'sortorder'=>101,
'sortorder'=>131,
'inputtype'=>'singleselect',
'options'=>array(0=>$clang->gT('No'),
1=>$clang->gT('Yes')),
Expand All @@ -3837,7 +3838,7 @@ function questionAttributes($returnByName=false)
'options'=>array(0=>$clang->gT('Yes'),
1=>$clang->gT('No')),
"help"=>$clang->gT("Store the city?"),
"caption"=>$clang->gT("City"));
"caption"=>$clang->gT("Save city"));

$qattributes["location_state"]=array(
"types"=>"S",
Expand All @@ -3848,7 +3849,7 @@ function questionAttributes($returnByName=false)
'options'=>array(0=>$clang->gT('Yes'),
1=>$clang->gT('No')),
"help"=>$clang->gT("Store the state?"),
"caption"=>$clang->gT("State"));
"caption"=>$clang->gT("Save state"));

$qattributes["location_postal"]=array(
"types"=>"S",
Expand All @@ -3859,7 +3860,7 @@ function questionAttributes($returnByName=false)
'options'=>array(0=>$clang->gT('Yes'),
1=>$clang->gT('No')),
"help"=>$clang->gT("Store the postal code?"),
"caption"=>$clang->gT("Postal code"));
"caption"=>$clang->gT("Save postal code"));

$qattributes["location_country"]=array(
"types"=>"S",
Expand All @@ -3870,7 +3871,7 @@ function questionAttributes($returnByName=false)
'options'=>array(0=>$clang->gT('Yes'),
1=>$clang->gT('No')),
"help"=>$clang->gT("Store the country?"),
"caption"=>$clang->gT("Country"));
"caption"=>$clang->gT("Save country"));

$qattributes["location_mapservice"]=array(
"types"=>"S",
Expand All @@ -3889,7 +3890,7 @@ function questionAttributes($returnByName=false)
'inputtype'=>'text',
'default'=>'500',
"help"=>$clang->gT("Width of the map in pixel"),
"caption"=>$clang->gT("Width"));
"caption"=>$clang->gT("Map width"));

$qattributes["location_mapheight"]=array(
"types"=>"S",
Expand All @@ -3898,7 +3899,7 @@ function questionAttributes($returnByName=false)
'inputtype'=>'text',
'default'=>'300',
"help"=>$clang->gT("Height of the map in pixel"),
"caption"=>$clang->gT("Height"));
"caption"=>$clang->gT("Map height"));

$qattributes["location_nodefaultfromip"]=array(
"types"=>"S",
Expand All @@ -3924,8 +3925,8 @@ function questionAttributes($returnByName=false)
'sortorder'=>101,
'inputtype'=>'text',
'default'=>'11',
"help"=>$clang->gT("Maps zoom level"),
"caption"=>$clang->gT("Zoom"));
"help"=>$clang->gT("Map zoom level"),
"caption"=>$clang->gT("Zoom level"));

// End Map Options

Expand Down Expand Up @@ -4196,7 +4197,7 @@ function questionAttributes($returnByName=false)
$qattributes["public_statistics"]=array(
"types"=>"15ABCEFGHKLMNOPRWYZ!:",
'category'=>$clang->gT('Other'),
'sortorder'=>100,
'sortorder'=>80,
'inputtype'=>'singleselect',
'options'=>array(0=>$clang->gT('No'),
1=>$clang->gT('Yes')),
Expand Down Expand Up @@ -4271,13 +4272,13 @@ function questionAttributes($returnByName=false)

$qattributes["slider_rating"]=array(
"types"=>"5",
'category'=>$clang->gT('Slider'),
'sortorder'=>1,
'category'=>$clang->gT('Display'),
'sortorder'=>90,
'inputtype'=>'singleselect',
'options'=>array(
0=>$clang->gT('No'),
1=>$clang->gT('Yes - stars'),
2=>$clang->gT('Yes - slider with Emoticon'),
2=>$clang->gT('Yes - slider with emoticon'),
),
'default'=>0,
"help"=>$clang->gT('Use slider layout'),
Expand Down Expand Up @@ -4346,15 +4347,15 @@ function questionAttributes($returnByName=false)
//Timer attributes
$qattributes["time_limit"]=array(
"types"=>"STUX",
'category'=>$clang->gT('Timing'),
'category'=>$clang->gT('Timer'),
'sortorder'=>90,
"inputtype"=>"integer",
"help"=>$clang->gT("Limit time to answer question (in seconds)"),
"caption"=>$clang->gT("Time limit"));

$qattributes["time_limit_action"]=array(
"types"=>"STUX",
'category'=>$clang->gT('Timing'),
'category'=>$clang->gT('Timer'),
'sortorder'=>92,
'inputtype'=>'singleselect',
'options'=>array(1=>$clang->gT('Warn and move on'),
Expand All @@ -4365,17 +4366,18 @@ function questionAttributes($returnByName=false)

$qattributes["time_limit_disable_next"]=array(
"types"=>"STUX",
'category'=>$clang->gT('Timing'),
'category'=>$clang->gT('Timer'),
'sortorder'=>94,
"inputtype"=>"singleselect",
'default'=>0,
'options'=>array(0=>$clang->gT('No'),
1=>$clang->gT('Yes')),
"help"=>$clang->gT("Disable the next button until time limit expires"),
"caption"=>$clang->gT("Time limit disable next"));

$qattributes["time_limit_disable_prev"]=array(
"types"=>"STUX",
'category'=>$clang->gT('Timing'),
'category'=>$clang->gT('Timer'),
'sortorder'=>96,
"inputtype"=>"singleselect",
'options'=>array(0=>$clang->gT('No'),
Expand All @@ -4385,103 +4387,103 @@ function questionAttributes($returnByName=false)

$qattributes["time_limit_countdown_message"]=array(
"types"=>"STUX",
'category'=>$clang->gT('Timing'),
'category'=>$clang->gT('Timer'),
'sortorder'=>98,
"inputtype"=>"textarea",
"help"=>$clang->gT("The text message that displays in the countdown timer during the countdown"),
"caption"=>$clang->gT("Time limit countdown message"));

$qattributes["time_limit_timer_style"]=array(
"types"=>"STUX",
'category'=>$clang->gT('Timing'),
'category'=>$clang->gT('Timer'),
'sortorder'=>100,
"inputtype"=>"textarea",
"help"=>$clang->gT("CSS Style for the message that displays in the countdown timer during the countdown"),
"caption"=>$clang->gT("Time limit timer CSS style"));

$qattributes["time_limit_message_delay"]=array(
"types"=>"STUX",
'category'=>$clang->gT('Timing'),
'category'=>$clang->gT('Timer'),
'sortorder'=>102,
"inputtype"=>"integer",
"help"=>$clang->gT("Display the 'time limit expiry message' for this many seconds before performing the 'time limit action' (defaults to 1 second if left blank)"),
"caption"=>$clang->gT("Time limit expiry message display time"));

$qattributes["time_limit_message"]=array(
"types"=>"STUX",
'category'=>$clang->gT('Timing'),
'category'=>$clang->gT('Timer'),
'sortorder'=>104,
"inputtype"=>"textarea",
"help"=>$clang->gT("The message to display when the time limit has expired (a default message will display if this setting is left blank)"),
"caption"=>$clang->gT("Time limit expiry message"));

$qattributes["time_limit_message_style"]=array(
"types"=>"STUX",
'category'=>$clang->gT('Timing'),
'category'=>$clang->gT('Timer'),
'sortorder'=>106,
"inputtype"=>"textarea",
"help"=>$clang->gT("CSS style for the 'time limit expiry message'"),
"caption"=>$clang->gT("Time limit message CSS style"));

$qattributes["time_limit_warning"]=array(
"types"=>"STUX",
'category'=>$clang->gT('Timing'),
'category'=>$clang->gT('Timer'),
'sortorder'=>108,
"inputtype"=>"integer",
"help"=>$clang->gT("Display a 'time limit warning' when there are this many seconds remaining in the countdown (warning will not display if left blank)"),
"caption"=>$clang->gT("1st time limit warning message timer"));

$qattributes["time_limit_warning_display_time"]=array(
"types"=>"STUX",
'category'=>$clang->gT('Timing'),
'category'=>$clang->gT('Timer'),
'sortorder'=>110,
"inputtype"=>"integer",
"help"=>$clang->gT("The 'time limit warning' will stay visible for this many seconds (will not turn off if this setting is left blank)"),
"caption"=>$clang->gT("1st time limit warning message display time"));

$qattributes["time_limit_warning_message"]=array(
"types"=>"STUX",
'category'=>$clang->gT('Timing'),
'category'=>$clang->gT('Timer'),
'sortorder'=>112,
"inputtype"=>"textarea",
"help"=>$clang->gT("The message to display as a 'time limit warning' (a default warning will display if this is left blank)"),
"caption"=>$clang->gT("1st time limit warning message"));

$qattributes["time_limit_warning_style"]=array(
"types"=>"STUX",
'category'=>$clang->gT('Timing'),
'category'=>$clang->gT('Timer'),
'sortorder'=>114,
"inputtype"=>"textarea",
"help"=>$clang->gT("CSS style used when the 'time limit warning' message is displayed"),
"caption"=>$clang->gT("1st time limit warning CSS style"));

$qattributes["time_limit_warning_2"]=array(
"types"=>"STUX",
'category'=>$clang->gT('Timing'),
'category'=>$clang->gT('Timer'),
'sortorder'=>116,
"inputtype"=>"integer",
"help"=>$clang->gT("Display the 2nd 'time limit warning' when there are this many seconds remaining in the countdown (warning will not display if left blank)"),
"caption"=>$clang->gT("2nd time limit warning message timer"));

$qattributes["time_limit_warning_2_display_time"]=array(
"types"=>"STUX",
'category'=>$clang->gT('Timing'),
'category'=>$clang->gT('Timer'),
'sortorder'=>118,
"inputtype"=>"integer",
"help"=>$clang->gT("The 2nd 'time limit warning' will stay visible for this many seconds (will not turn off if this setting is left blank)"),
"caption"=>$clang->gT("2nd time limit display time"));
"caption"=>$clang->gT("2nd time limit warning message display time"));

$qattributes["time_limit_warning_2_message"]=array(
"types"=>"STUX",
'category'=>$clang->gT('Timing'),
'category'=>$clang->gT('Timer'),
'sortorder'=>120,
"inputtype"=>"textarea",
"help"=>$clang->gT("The 2nd message to display as a 'time limit warning' (a default warning will display if this is left blank)"),
"caption"=>$clang->gT("2nd time limit warning message"));

$qattributes["time_limit_warning_2_style"]=array(
"types"=>"STUX",
'category'=>$clang->gT('Timing'),
'category'=>$clang->gT('Timer'),
'sortorder'=>122,
"inputtype"=>"textarea",
"help"=>$clang->gT("CSS style used when the 2nd 'time limit warning' message is displayed"),
Expand Down Expand Up @@ -4548,7 +4550,7 @@ function questionAttributes($returnByName=false)

$qattributes["random_group"]=array(
"types"=>"15ABCDEFGHIKLMNOPQRSTUWXYZ!:;|",
'category'=>$clang->gT('Display'),
'category'=>$clang->gT('Logic'),
'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"),
Expand Down

0 comments on commit 6790622

Please sign in to comment.