-
Notifications
You must be signed in to change notification settings - Fork 988
/
activateSurvey_view.php
139 lines (126 loc) · 7.88 KB
/
activateSurvey_view.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?php
if ((isset($failedcheck) && $failedcheck) || (isset($failedgroupcheck) && $failedgroupcheck))
{ ?>
<div class='messagebox ui-corner-all'>
<div class='header ui-widget-header'><?php $clang->eT("Activate Survey"); echo "($surveyid)"; ?></div>
<div class='warningheader'><?php $clang->eT("Error"); ?><br />
<?php $clang->eT("Survey does not pass consistency check"); ?></div>
<p>
<strong><?php $clang->eT("The following problems have been found:"); ?></strong><br />
<ul>
<?php if (isset($failedcheck) && $failedcheck)
{
foreach ($failedcheck as $fc)
{ ?>
<li> Question qid-<?php echo $fc[0]; ?> ("<a href='<?php echo Yii::app()->getController()->createUrl('admin/survey/view/surveyid/'.$surveyid.'/gid/'.$fc[3].'/qid/'.$fc[0]); ?>'><?php echo $fc[1]; ?></a>")<?php echo $fc[2]; ?></li>
<?php }
}
if (isset($failedgroupcheck) && $failedgroupcheck)
{
foreach ($failedgroupcheck as $fg)
{ ?>
<li> Group gid-<?php echo $fg[0]; ?> ("<a href='<?php echo Yii::app()->getController()->createUrl('admin/survey/view/surveyid/'.$surveyid.'/gid/'.$fg[0]); ?>'><?php echo $fg[1]; ?></a>")<?php echo $fg[2]; ?></li>
<?php }
} ?>
</ul>
<?php $clang->eT("The survey cannot be activated until these problems have been resolved."); ?>
</div><br />
<?php }
else
{ ?>
<br /><div class='messagebox ui-corner-all'>
<div class='header ui-widget-header'><?php $clang->eT("Activate Survey"); echo "($surveyid)" ;?></div>
<div class='warningheader'>
<?php $clang->eT("Warning"); ?><br />
<?php $clang->eT("READ THIS CAREFULLY BEFORE PROCEEDING"); ?>
</div>
<?php $clang->eT("You should only activate a survey when you are absolutely certain that your survey setup is finished and will not need changing."); ?><br /><br />
<?php $clang->eT("Once a survey is activated you can no longer:"); ?><ul><li><?php $clang->eT("Add or delete groups"); ?></li><li><?php $clang->eT("Add or delete questions"); ?></li><li><?php $clang->eT("Add or delete subquestions or change their codes"); ?></li></ul>
<div class='warningheader'>
<?php $clang->eT("The following settings cannot be changed when the survey is active.");?>
</div>
<?php $clang->eT("Please check these settings now, then click the button below.");?>
<form class='form44' action='<?php echo Yii::app()->getController()->createUrl("admin/survey/activate/surveyid/".$surveyid); ?>' method='post'>
<ul>
<li><label for='anonymized'><?php $clang->eT("Anonymized responses?"); ?>
<script type="text/javascript"><!--
function alertPrivacy()
{
if (document.getElementById('anonymized').value == 'Y')
{
alert('<?php $clang->eT("Warning"); ?>: <?php $clang->eT("If you turn on the -Anonymized responses- option and create a tokens table, LimeSurvey will mark your completed tokens only with a 'Y' instead of date/time to ensure the anonymity of your participants.","js"); ?>');
}
}
//--></script></label>
<select id='anonymized' name='anonymized' onchange='alertPrivacy();'>
<option value='Y'
<?php if ($aSurveysettings['anonymized'] == "Y") { ?>
selected='selected'
<?php } ?>
><?php $clang->eT("Yes"); ?></option>
<option value='N'
<?php if ($aSurveysettings['anonymized'] != "Y") { ?>
selected='selected'
<?php } ?>
><?php $clang->eT("No"); ?></option>
</select>
</li>
<li><label for='datestamp'><?php $clang->eT("Date stamp?"); ?></label>
<select id='datestamp' name='datestamp' onchange='alertPrivacy();'>
<option value='Y'
<?php if ($aSurveysettings['datestamp'] == "Y") { ?>
selected='selected'
<?php } ?>
><?php $clang->eT("Yes"); ?></option>
<option value='N'
<?php if ($aSurveysettings['datestamp'] != "Y") { ?>
selected='selected'
<?php } ?>
><?php $clang->eT("No"); ?></option>
</select>
</li>
<li><label for='ipaddr'><?php $clang->eT("Save IP address?"); ?></label>
<select name='ipaddr' id='ipaddr'>
<option value='Y'
<?php if ($aSurveysettings['ipaddr'] == "Y") { ?>
selected='selected'
<?php } ?>
><?php $clang->eT("Yes"); ?></option>
<option value='N'
<?php if ($aSurveysettings['ipaddr'] != "Y") { ?>
selected='selected'
<?php } ?>
><?php $clang->eT("No"); ?></option>
</select>
</li>
<li><label for='refurl'><?php $clang->eT("Save referrer URL?"); ?></label>
<select name='refurl' id='refurl'>
<option value='Y'
<?php if ($aSurveysettings['refurl'] == "Y") { ?>
selected='selected'
<?php } ?>
><?php $clang->eT("Yes"); ?></option>
<option value='N'
<?php if ($aSurveysettings['refurl'] != "Y") { ?>
selected='selected'
<?php } ?>
><?php $clang->eT("No"); ?></option>
</select>
</li>
<li><label for='savetimings'><?php $clang->eT("Save timings?"); ?></label>
<select id='savetimings' name='savetimings'>
<option value='Y'
<?php if (!isset($aSurveysettings['savetimings']) || !$aSurveysettings['savetimings'] || $aSurveysettings['savetimings'] == "Y") { ?> selected='selected' <?php } ?>
><?php $clang->eT("Yes"); ?></option>
<option value='N'
<?php if (isset($aSurveysettings['savetimings']) && $aSurveysettings['savetimings'] == "N") { ?> selected='selected' <?php } ?>
><?php $clang->eT("No"); ?></option>
</select>
</li>
</ul>
<?php $clang->eT("Please note that once responses have collected with this survey and you want to add or remove groups/questions or change one of the settings above, you will need to deactivate this survey, which will move all data that has already been entered into a separate archived table."); ?><br /><br />
<input type='hidden' name='ok' value='Y' />
<input type='submit' value="<?php $clang->eT("Save / Activate survey"); ?>" />
</form>
</div><br />
<?php } ?>