Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Jun 18, 2012
2 parents 40fbc4c + 3af73b4 commit 77ae066
Show file tree
Hide file tree
Showing 11 changed files with 1,920 additions and 1,691 deletions.
2 changes: 1 addition & 1 deletion admin/tokens.php
Expand Up @@ -1230,7 +1230,7 @@
$tokenoutput .= "<td align='left' style='white-space:nowrap;'>\n";
if (bHasSurveyPermission($surveyid, 'tokens','update'))
{
if (($brow['completed'] == "N" || $brow['completed'] == "") &&$brow['token'])
if ((($brow['completed'] == "N" || $brow['completed'] == "") && $brow['token']) || $thissurvey['alloweditaftercompletion']=='Y')
{
$toklang = ($brow['language'] == '') ? $baselanguage : $brow['language'];
$tokenoutput .= "<input style='height: 16; width: 16px; font-size: 8; font-family: verdana' type='image' src='$imageurl/do_16.png' title='"
Expand Down
187 changes: 156 additions & 31 deletions classes/expressions/LimeExpressionManager.php

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions common_functions.php
Expand Up @@ -3377,15 +3377,15 @@ function questionAttributes($returnByName=false)
"caption"=>$clang->gT('Sub-question validation tip'));

$qattributes["exclude_all_others"]=array(
"types"=>"MP",
"types"=>":ABCEFMPKQ",
'category'=>$clang->gT('Logic'),
'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",
"types"=>"MP",
'category'=>$clang->gT('Logic'),
'sortorder'=>131,
'inputtype'=>'singleselect',
Expand Down
47 changes: 6 additions & 41 deletions index.php
Expand Up @@ -877,7 +877,7 @@
if(($row['submitdate']=='' && $thissurvey['tokenanswerspersistence'] == 'Y' )|| ($row['submitdate']!='' && $thissurvey['alloweditaftercompletion'] == 'Y'))
{
$_SESSION['srid'] = $row['id'];
if (!is_null($row['lastpage']))
if (!is_null($row['lastpage']) && $row['submitdate']=='')
{
$_SESSION['LEMtokenResume'] = true;
$_SESSION['step'] = $row['lastpage'];
Expand Down Expand Up @@ -2270,50 +2270,15 @@ function buildsurveysession($previewGroup=false)
// }
// Prefill questions/answers from command line params
$startingValues=array();
if (isset($_SESSION['insertarray']))
if (isset($_GET))
{
foreach($_SESSION['insertarray'] as $field)
foreach ($_GET as $k=>$v)
{
if (isset($_GET[$field]) && $field!='token')
if (preg_match('/^(token|sid|lang|newtest)$/',$k))
{
$value=$_GET[$field];
$type = $fieldmap[$field]['type'];
switch($type)
{
case 'D': //DATE
if (trim($value)=="")
{
$value = NULL;
}
else
{
$dateformatdatat=getDateFormatData($thissurvey['surveyls_dateformat']);
$datetimeobj = new Date_Time_Converter($value, $dateformatdatat['phpdate']);
$value=$datetimeobj->convert("Y-m-d");
}
break;
case 'N': //NUMERICAL QUESTION TYPE
case 'K': //MULTIPLE NUMERICAL QUESTION
if (trim($value)=="") {
$value = NULL;
}
else {
$value = sanitize_float($value);
}
break;
case '|': //File Upload
$value=NULL; // can't upload a file via GET
break;
}
if (!is_null($value))
{
$_SESSION[$field] = $value;
$startingValues[$field] = array (
'type'=>$type,
'value'=>$value,
);
}
continue;
}
$startingValues[$k] = $v;
}
}
$_SESSION['startingValues']=$startingValues;
Expand Down

0 comments on commit 77ae066

Please sign in to comment.