Skip to content

Commit

Permalink
Dev Fix bad indentation and remove merge leftovers.
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev@9698 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Yuri D'Elia committed Jan 17, 2011
1 parent f58bec4 commit 193a5c0
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions group.php
Expand Up @@ -28,7 +28,8 @@
$_SESSION['prevstep'] = 1;
$_SESSION['maxstep'] = 0;
}
else{
else
{
if (!isset($_SESSION['step'])) {$_SESSION['step']=0;}
if (!isset($_SESSION['totalsteps'])) {$_SESSION['totalsteps']=0;}
if (!isset($_SESSION['maxstep'])) {$_SESSION['maxstep']=0;}
Expand All @@ -50,7 +51,7 @@
$move = (int)$move;
if ($move > 0 && (($move <= $_SESSION['step']) || (isset($_SESSION['maxstep']) && $move <= $_SESSION['maxstep'])))
$_SESSION['step'] = $move;
}
}

// We do not keep the participant session anymore when the same browser is used to answer a second time a survey (let's think of a library PC for instance).
// Previously we used to keep the session and redirect the user to the
Expand Down Expand Up @@ -123,7 +124,7 @@
//SUBMIT ###############################################################################
if ((isset($move) && $move == "movesubmit") && (!isset($notanswered) || !$notanswered) && (!isset($notvalidated) || !$notvalidated ) && (!isset($filenotvalidated) || !$filenotvalidated))
{
setcookie ("limesurvey_timers", "", time() - 3600);// remove the timers cookies
setcookie ("limesurvey_timers", "", time() - 3600);// remove the timers cookies
if ($thissurvey['refurl'] == "Y")
{
if (!in_array("refurl", $_SESSION['insertarray'])) //Only add this if it doesn't already exist
Expand Down Expand Up @@ -156,13 +157,7 @@
echo templatereplace(file_get_contents("$thistpl/assessment.pstpl"));
}

// fetch all filenames from $_SESSIONS['files'] and delete them all
// from the /tmp/upload/ directory
/*echo "<pre>";print_r($_SESSION);echo "</pre>";
for($i = 1; isset($_SESSION['files'][$i]); $i++)
{
unlink('tmp/upload/'.$_SESSION['files'][$i]['filename']);
======= // fetch all filenames from $_SESSIONS['files'] and delete them all
// fetch all filenames from $_SESSIONS['files'] and delete them all
// from the /upload/tmp/ directory
/*echo "<pre>";print_r($_SESSION);echo "</pre>";
for($i = 1; isset($_SESSION['files'][$i]); $i++)
Expand All @@ -179,7 +174,7 @@
// in other cases the session is cleared at submit time
$completed .= "<a href='{$publicurl}/index.php?sid=$surveyid&amp;move=clearall'>".$clang->gT("Clear Responses")."</a><br /><br />\n";
}
}
}
else //THE FOLLOWING DEALS WITH SUBMITTING ANSWERS AND COMPLETING AN ACTIVE SURVEY
{
if ($thissurvey['usecookie'] == "Y" && $tokensexist != 1) //don't use cookies if tokens are being used
Expand Down Expand Up @@ -319,11 +314,13 @@

//GET GROUP DETAILS

if ($previewgrp){
if ($previewgrp)
{
setcookie("limesurvey_timers", "0");
$_SESSION['step'] = $_REQUEST['gid']+1;

foreach($_SESSION['grouplist'] as $index=>$group){
foreach($_SESSION['grouplist'] as $index=>$group)
{
if ($group[0]==$_REQUEST['gid']){
$grouparrayno = $index;
break;
Expand All @@ -334,12 +331,15 @@
$groupname=$_SESSION['grouplist'][$grouparrayno][1];
$groupdescription=$_SESSION['grouplist'][$grouparrayno][2];
}
else{
if (($show_empty_group)||!isset($_SESSION['grouplist'])) {
else
{
if (($show_empty_group)||!isset($_SESSION['grouplist']))
{
$gid=-1; // Make sure the gid is unused. This will assure that the foreach (fieldarray as ia) has no effect.
$groupname=$clang->gT("Submit your answers");
$groupdescription=$clang->gT("There are no more questions. Please press the <Submit> button to finish this survey.");
} else
}
else
{
$grouparrayno=$_SESSION['step']-1;
$gid=$_SESSION['grouplist'][$grouparrayno][0];
Expand Down

0 comments on commit 193a5c0

Please sign in to comment.