Skip to content

Commit

Permalink
Fixed some issues in survey settings
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_ci@11039 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Sep 26, 2011
1 parent 9602bce commit c1f7b32
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 45 deletions.
24 changes: 12 additions & 12 deletions application/core/Survey_Common_Controller.php
Expand Up @@ -507,21 +507,21 @@ function _surveysummary($surveyid,$action=null)

$aAdditionalLanguages = GetAdditionalLanguagesFromSurveyID($surveyid);
$surveysummary2 = "";
if ($surveyinfo['anonymized'] != "N") {$surveysummary2 .= $clang->gT("Answers to this survey are anonymized.")."<br />\n";}
else {$surveysummary2 .= $clang->gT("This survey is NOT anonymous.")."<br />\n";}
if ($surveyinfo['format'] == "S") {$surveysummary2 .= $clang->gT("It is presented question by question.")."<br />\n";}
elseif ($surveyinfo['format'] == "G") {$surveysummary2 .= $clang->gT("It is presented group by group.")."<br />\n";}
else {$surveysummary2 .= $clang->gT("It is presented on one single page.")."<br />\n";}
if ($surveyinfo['anonymized'] != "N") {$surveysummary2 .= $clang->gT("Responses to this survey are anonymized.")."<br />";}
else {$surveysummary2 .= $clang->gT("Responses to this survey are NOT anonymized.")."<br />";}
if ($surveyinfo['format'] == "S") {$surveysummary2 .= $clang->gT("It is presented question by question.")."<br />";}
elseif ($surveyinfo['format'] == "G") {$surveysummary2 .= $clang->gT("It is presented group by group.")."<br />";}
else {$surveysummary2 .= $clang->gT("It is presented on one single page.")."<br />";}
if ($surveyinfo['allowjumps'] == "Y")
{
if ($surveyinfo['format'] == 'A') {$surveysummary2 .= $clang->gT("No question index will be shown with this format.")."<br />\n";}
else {$surveysummary2 .= $clang->gT("A question index will be shown; participants will be able to jump between viewed questions.")."<br />\n";}
if ($surveyinfo['format'] == 'A') {$surveysummary2 .= $clang->gT("No question index will be shown with this format.")."<br />";}
else {$surveysummary2 .= $clang->gT("A question index will be shown; participants will be able to jump between viewed questions.")."<br />";}
}
if ($surveyinfo['datestamp'] == "Y") {$surveysummary2 .= $clang->gT("Responses will be date stamped.")."<br />\n";}
if ($surveyinfo['ipaddr'] == "Y") {$surveysummary2 .= $clang->gT("IP Addresses will be logged")."<br />\n";}
if ($surveyinfo['refurl'] == "Y") {$surveysummary2 .= $clang->gT("Referrer URL will be saved.")."<br />\n";}
if ($surveyinfo['usecookie'] == "Y") {$surveysummary2 .= $clang->gT("It uses cookies for access control.")."<br />\n";}
if ($surveyinfo['allowregister'] == "Y") {$surveysummary2 .= $clang->gT("If tokens are used, the public may register for this survey")."<br />\n";}
if ($surveyinfo['datestamp'] == "Y") {$surveysummary2 .= $clang->gT("Responses will be date stamped.")."<br />";}
if ($surveyinfo['ipaddr'] == "Y") {$surveysummary2 .= $clang->gT("IP Addresses will be logged")."<br />";}
if ($surveyinfo['refurl'] == "Y") {$surveysummary2 .= $clang->gT("Referrer URL will be saved.")."<br />";}
if ($surveyinfo['usecookie'] == "Y") {$surveysummary2 .= $clang->gT("It uses cookies for access control.")."<br />";}
if ($surveyinfo['allowregister'] == "Y") {$surveysummary2 .= $clang->gT("If tokens are used, the public may register for this survey")."<br />";}
if ($surveyinfo['allowsave'] == "Y" && $surveyinfo['tokenanswerspersistence'] == 'N') {$surveysummary2 .= $clang->gT("Participants can save partially finished surveys")."<br />\n";}
if ($surveyinfo['emailnotificationto'] != '')
{
Expand Down
48 changes: 22 additions & 26 deletions application/views/admin/survey/superview/superNotification_view.php
Expand Up @@ -16,7 +16,6 @@

<li><label for='datestamp'><?php echo $clang->gT("Date Stamp?"); ?></label>
<?php if ($esrow['active'] == "Y") { ?>
\n
<?php if ($esrow['datestamp'] != "Y") {
echo $clang->gT("Responses will not be date stamped.");
} else {
Expand Down Expand Up @@ -45,7 +44,6 @@
<li><label for=''><?php echo $clang->gT("Save IP Address?"); ?></label>

<?php if ($esrow['active'] == "Y") { ?>
\n
<?php if ($esrow['ipaddr'] != "Y") {
echo $clang->gT("Responses will not have the IP address logged.");
} else {
Expand Down Expand Up @@ -75,13 +73,12 @@
<li><label for=''><?php echo $clang->gT("Save referrer URL?"); ?></label>

<?php if ($esrow['active'] == "Y") { ?>
\n
<?php if ($esrow['refurl'] != "Y") {
echo $clang->gT("Responses will not have their referring URL logged.");
} else {
echo $clang->gT("Responses will have their referring URL logged.");
} ?>
<font size='1' color='red'>&nbsp;(<?php echo $clang->gT("Cannot be changed"); ?>)"
<font size='1' color='red'>&nbsp;(<?php echo $clang->gT("Cannot be changed"); ?>)
</font>
<input type='hidden' name='refurl' value='<?php echo $esrow['refurl']; ?>' />
<?php } else { ?>
Expand All @@ -100,6 +97,27 @@
<?php } ?>
</li>

<li><label for='savetimings'><?php echo $clang->gT("Save timings?"); ?></label>
<?php if ($esrow['active']=="Y")
{ ?>
<?php if ($esrow['savetimings'] != "Y") { echo $clang->gT("Timings will not be saved.");}
else { $clang->gT("Timings will be saved.");} ?>
<font size='1' color='red'>&nbsp;(<?php echo $clang->gT("Cannot be changed"); ?>)
</font>
<input type='hidden' name='savetimings' value='<?php echo $esrow['savetimings']; ?>' />
<?php }
else
{ ?>
<select id='savetimings' name='savetimings'>
<option value='Y'
<?php if (!isset($esrow['savetimings']) || !$esrow['savetimings'] || $esrow['savetimings'] == "Y") { ?> selected='selected' <?php } ?>
><?php echo $clang->gT("Yes"); ?></option>
<option value='N'
<?php if (isset($esrow['savetimings']) && $esrow['savetimings'] == "N") { ?> selected='selected' <?php } ?>
><?php echo $clang->gT("No"); ?></option>
</select>
</li>
<?php } ?>


<li><label for=''><?php echo $clang->gT("Enable assessment mode?"); ?></label>
Expand All @@ -116,28 +134,6 @@
><?php echo $clang->gT("No"); ?></option>
</select></li>

<li><label for='savetimings'><?php echo $clang->gT("Save timings?"); ?></label>
<?php if ($esrow['active']=="Y")
{ ?>
\n
<?php if ($esrow['savetimings'] != "Y") { echo $clang->gT("Timings will not be saved.");}
else { $clang->gT("Timings will be saved.");} ?>
<font size='1' color='red'>&nbsp;(<?php echo $clang->gT("Cannot be changed"); ?>)
</font>
<input type='hidden' name='savetimings' value='<?php echo $esrow['savetimings']; ?>' />
<?php }
else
{ ?>
<select id='savetimings' name='savetimings'>
<option value='Y'
<?php if (!isset($esrow['savetimings']) || !$esrow['savetimings'] || $esrow['savetimings'] == "Y") { ?> selected='selected' <?php } ?>
><?php echo $clang->gT("Yes"); ?></option>
<option value='N'
<?php if (isset($esrow['savetimings']) && $esrow['savetimings'] == "N") { ?> selected='selected' <?php } ?>
><?php echo $clang->gT("No"); ?></option>
</select>
</li>
<?php } ?>

<li><label for='allowsave'><?php echo $clang->gT("Participant may save and resume later?"); ?></label>
<select id='allowsave' name='allowsave'>
Expand Down
12 changes: 5 additions & 7 deletions application/views/admin/survey/superview/superTokens_view.php
Expand Up @@ -17,13 +17,11 @@ function alertPrivacy()
}
//--></script></label>

<?php if ($esrow['active'] == "Y") { ?>

\n
<?php if ($esrow['anonymized'] == "N") { ?>
<?php echo $clang->gT("This survey is NOT anonymous."); ?>
<?php if ($esrow['active'] == "Y") {
if ($esrow['anonymized'] == "N") { ?>
<?php echo $clang->gT("Responses to this survey are NOT anonymized."); ?>
<?php } else {
echo $clang->gT("Answers to this survey are anonymized.");
echo $clang->gT("Responses to this survey are anonymized.");
} ?>
<font size='1' color='red'>&nbsp;(<?php echo $clang->gT("Cannot be changed"); ?>)
</font>
Expand All @@ -44,7 +42,7 @@ function alertPrivacy()
<?php } ?>
</li>
<li>
<label for=''><?php echo $clang->gT("Allow editing answers after completion?"); ?></label>
<label for=''><?php echo $clang->gT("Allow editing responses after completion?"); ?></label>
<select id='alloweditaftercompletion' name='alloweditaftercompletion' onchange="javascript: if (document.getElementById('private').value == 'Y') {alert('<?php echo $clang->gT("This option can't be set if Anonymous answers are used","js"); ?>'); this.value='N';}">
<option value='Y'
<?php if ($esrow['alloweditaftercompletion'] == "Y") { ?>
Expand Down

0 comments on commit c1f7b32

Please sign in to comment.