Skip to content

Commit

Permalink
Fixed issue #4662: Re-entering unfinished survey by manually entering…
Browse files Browse the repository at this point in the history
… token and &newtest parameter starts the survey where it left off instead of starting a new one

Dev Other small changes

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@9245 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Oct 14, 2010
1 parent 0ea5539 commit 03e0d8d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 16 deletions.
42 changes: 28 additions & 14 deletions admin/html.php
Expand Up @@ -824,12 +824,14 @@
. "<td align='left'> {$surveyinfo['surveyls_welcometext']}</td></tr>\n"
. "<tr ><td align='right' valign='top'><strong>"
. $clang->gT("Administrator:")."</strong></td>\n"
. "<td align='left'> {$surveyinfo['admin']} ({$surveyinfo['adminemail']})</td></tr>\n"
. "<tr><td align='right' valign='top'><strong>"
. $clang->gT("Fax To:")."</strong></td>\n<td align='left'>";
if (trim($surveyinfo['faxto'])!='') {$surveysummary .= " {$surveyinfo['faxto']}";}
$surveysummary .= "</td></tr>\n"
. "<tr><td align='right' valign='top'><strong>"
. "<td align='left'> {$surveyinfo['admin']} ({$surveyinfo['adminemail']})</td></tr>\n";
if (trim($surveyinfo['faxto'])!='')
{
$surveysummary="<tr><td align='right' valign='top'><strong>"
. $clang->gT("Fax To:")."</strong></td>\n<td align='left'>{$surveyinfo['faxto']}";
$surveysummary .= "</td></tr>\n";
}
$surveysummary .= "<tr><td align='right' valign='top'><strong>"
. $clang->gT("Start date/time:")."</strong></td>\n";
$dateformatdetails=getDateFormatData($_SESSION['dateformat']);
if (trim($surveyinfo['startdate'])!= '')
Expand Down Expand Up @@ -866,18 +868,23 @@
// get the rowspan of the Additionnal languages row
// is at least 1 even if no additionnal language is present
$additionnalLanguagesCount = count($aAdditionalLanguages);
if ($additionnalLanguagesCount == 0) $additionnalLanguagesCount = 1;
$surveysummary .= "<tr><td align='right' valign='top'><strong>"
. $clang->gT("Additional Languages").":</strong></td>\n";

$first=true;
foreach ($aAdditionalLanguages as $langname)
if ($additionnalLanguagesCount == 0)
{
$surveysummary .= "<td align='left'>-</td>\n";
}
else
{
if ($langname)
foreach ($aAdditionalLanguages as $langname)
{
if (!$first) {$surveysummary .= "<tr><td>&nbsp;</td>";}
$first=false;
$surveysummary .= "<td align='left'>".getLanguageNameFromCode($langname,false)."</td></tr>\n";
if ($langname)
{
if (!$first) {$surveysummary .= "<tr><td>&nbsp;</td>";}
$first=false;
$surveysummary .= "<td align='left'>".getLanguageNameFromCode($langname,false)."</td></tr>\n";
}
}
}
if ($first) $surveysummary .= "</tr>";
Expand All @@ -886,7 +893,14 @@
$surveysummary .= "<tr><td align='right' valign='top'><strong>"
. $clang->gT("Exit Link").":</strong></td>\n"
. "<td align='left'>";
if ($surveyinfo['surveyls_url']!="") {$surveysummary .=" <a href=\"".htmlspecialchars($surveyinfo['surveyls_url'])."\" title=\"".htmlspecialchars($surveyinfo['surveyls_url'])."\">{$surveyinfo['surveyls_urldescription']}</a>";}
if ($surveyinfo['surveyls_url']!="")
{
$surveysummary .=" <a href=\"".htmlspecialchars($surveyinfo['surveyls_url'])."\" title=\"".htmlspecialchars($surveyinfo['surveyls_url'])."\">{$surveyinfo['surveyls_urldescription']}</a>";
}
else
{
$surveysummary .="-";
}
$surveysummary .="</td></tr>\n";
$surveysummary .= "<tr><td align='right' valign='top'><strong>"
. $clang->gT("Number of questions/groups").":</strong></td><td>$sumcount3/$sumcount2</td></tr>\n";
Expand Down
2 changes: 1 addition & 1 deletion classes/core/surveytranslator.php
Expand Up @@ -253,7 +253,7 @@ function getLanguageData($orderbynative=false) {

// German
$supportedLanguages['de']['description'] = $clang->gT('German');
$supportedLanguages['de']['nativedescription'] = 'Deutsch (Sie)';
$supportedLanguages['de']['nativedescription'] = 'Deutsch';
$supportedLanguages['de']['rtl'] = false;
$supportedLanguages['de']['dateformat'] = 1;

Expand Down
7 changes: 6 additions & 1 deletion index.php
Expand Up @@ -2168,7 +2168,12 @@ function buildsurveysession()
<label for='token'>".$clang->gT("Token")."</label><input class='text' id='token' type='text' name='token' />
<input type='hidden' name='sid' value='".$surveyid."' id='sid' />
<input type='hidden' name='lang' value='".$templang."' id='lang' />";

if (isset($_GET['newtest']) && $_GET['newtest'] = "Y")
{
echo " <input type='hidden' name='newtest' value='Y' id='newtest' />";

}

// If this is a direct Reload previous answers URL, then add hidden fields
if (isset($_GET['loadall']) && isset($_GET['scid'])
&& isset($_GET['loadname']) && isset($_GET['loadpass']))
Expand Down

0 comments on commit 03e0d8d

Please sign in to comment.