Actions

General FAQ/zh-cn: Difference between revisions

From LimeSurvey Manual

(Created page with "常规问答")
 
(Updating to match new version of source page)
 
(100 intermediate revisions by 3 users not shown)
Line 4: Line 4:




{{Note|The following answers have been provided by the LimeSurvey user community. In case you do not understand something or you are unsure about what you have to do next, you can address your question(s) to the rest of community members: https://limesurvey.org/forums. For professional help, please check our list of authorized partners: https://limesurvey.com.}}
{{Note|以下答案来自 LimeSurvey 用户论坛。如果你有什么不明白的,或者不知道下一步该怎么做,你可以把你的问题发给其他论坛成员: https://limesurvey.org/forums. 要获得专业支持,请联系我们的认证合作伙伴:https://limesurvey.com.}}




=Getting started=
=入门指南=




If you don't want to read half the manual to get a feeling what can be done with LimeSurvey, we recommend you to watch some YouTube video tutorials:
如果你不想通过阅读 LimeSurvey 手册来学习怎么做, 我们推荐你可以通过 的视频教程来学习:


*[https://www.youtube.com/watch?v=oyoq14XpkwA How to set up an account and survey installation]
*[https://www.youtube.com/watch?v=oyoq14XpkwA 如何设置账号和调查的安装]
*[https://www.youtube.com/watch?v=7134QebOQzY Question type - Array]
*[https://www.youtube.com/watch?v=7134QebOQzY 问题类型 - 阵列]
*[https://www.youtube.com/watch?v=aeb93vAe7R4 Assessments]
*[https://www.youtube.com/watch?v=aeb93vAe7R4 评估]
*[https://www.youtube.com/watch?v=s5OOzDoPjIU Placeholder fields]
*[https://www.youtube.com/watch?v=s5OOzDoPjIU 占位符字段]
*[https://www.youtube.com/watch?v=7N4xUQMWbJY Radio list]
*[https://www.youtube.com/watch?v=7N4xUQMWbJY 单选列表]
*[https://www.youtube.com/watch?v=UI01hwrsiVk Copy/import survey]
*[https://www.youtube.com/watch?v=UI01hwrsiVk 复制/导入调查]
*[https://www.youtube.com/watch?v=QEHyH1YbNEQ Import question]
*[https://www.youtube.com/watch?v=QEHyH1YbNEQ 导入问题]




{{Note|If you know any good video out there, do not hesitate to share it with us.}}
{{Note|如果你用任何好的视频,请不要犹豫和我们分享。}}




==I need a quick introduction for LimeSurvey==
==我想快速安装LimeSurvey==




For a quick text introduction to LimeSurvey, check the following two links:
请从下面两个链接获得快速安装LimeSurvey的方法:


*[[Quick start guide - LimeSurvey 2.50+|LimeSurvey 2.50+]]
*[[Quick start guide - LimeSurvey 2.50+|LimeSurvey 2.50+]]
Line 33: Line 33:




{{Alert|We are working at the moment on introductory videos to LimeSurvey.}}
{{Alert|我们正在制作介绍LimeSurvey的视频。}}




=Survey design and layout=
=调查的设计和布局=




==How can I remove index.php from the URL path to get a shorter URL==  
==我如何从 URL 路径里删掉index.php,从而得到一个短的 URL==  




If you want to use fancy URLs (not have /index.php in every URL), please edit /application/config/config.php and change
如果你要用花式链接(每个链接里都没有/index.php), 请编辑文件 /application/config/config.php,修改下面的内容


<div class="mw-translate-fuzzy">
<syntaxhighlight lang="php" enclose="div">'showScriptName' => true,</syntaxhighlight>
<syntaxhighlight lang="php" enclose="div">'showScriptName' => true,</syntaxhighlight>
</div>


to


<div class="mw-translate-fuzzy">
<syntaxhighlight lang="php" enclose="div">'showScriptName' => false,</syntaxhighlight>
<syntaxhighlight lang="php" enclose="div">'showScriptName' => false,</syntaxhighlight>
</div>


For this to work properly, you must use an Apache webserver with a properly installed mod_rewrite module.
要使这个设置正常工作,必须使用正确安装了 mod_rewrite 模块的Apache 服务器。


If you are using the [http://nginx.com/products/ Nginx] http server (with php running via FastCGI) and want to use the ''''urlFormat' => 'path'''' setting (see config.php), consider the following Nginx website configuration:
===With nginx webserver===


如果您使用的是[http://nginx.com/products/ Nginx] http服务器(通过FastCGI运行php),并且想使用''''urlFormat'=>'path''''设置(请参阅config .php),请考虑以下Nginx网站配置:
<div class="mw-translate-fuzzy">
<syntaxhighlight lang="apache">server {
<syntaxhighlight lang="apache">server {
     set $host_path "/PATH/TO/LIMESURVEY";
     set $host_path "/PATH/TO/LIMESURVEY";
Line 60: Line 67:
     charset utf-8;
     charset utf-8;
     try_files $uri $uri/ /index.php?r=$uri&$args;
     try_files $uri $uri/ /index.php?r=$uri&$args;
     #Disallow reading inside php script directory, see issue with debug > 1 on note
     #不允许从脚本目录内部读取, see issue with debug > 1 on note
     location ~ ^/(application|protected|framework|themes/\w+/views) {
     location ~ ^/(application|protected|framework|themes/\w+/views) {
         deny  all;
         deny  all;
    }
    #不允许从用户上传目录直接读取
    location ~ ^/upload/surveys/.*/fu_[a-z0-9]*$ {
        return 444;
    }
    #不允许上传可执行文件到上传目录
    location ~* /upload/.*\.(pl|cgi|py|pyc|pyo|phtml|sh|lua|php|php3|php4|php5|php6|pcgi|pcgi3|pcgi4|pcgi5|pcgi6|icn)$ {
        return 444;
    }
    #避免处理yii对不存在的静态文件的调用
    location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
        try_files $uri =404;
    }
    location ~ \.php$ {
        fastcgi_split_path_info  ^(.+\.php)(.*)$;
        try_files $uri index.php;
        fastcgi_pass  127.0.0.1:9000; # Change this to match your settings
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_param  SCRIPT_NAME      $fastcgi_script_name;
    }
}</syntaxhighlight>
</div>
    # Allow access to well-known directory, different usage, for example ACME Challenge for Let's Encrypt
    location ~ /\.well-known {
        allow all;
    }
    # Deny all attempts to access hidden files
    # such as .htaccess, .htpasswd, .DS_Store (Mac).
        location ~ /\. {
        deny all;
     }
     }
     #Disallow direct read user upload files
     #Disallow direct read user upload files
Line 87: Line 127:
}</syntaxhighlight>
}</syntaxhighlight>


{{Note|This disables access to files inside application. Some JavaScript and CSS files located within the application have to be readable with debug > 0. You can force the usage of the asset manager when the debug mode is enabled with <code><nowiki>'use_asset_manager' => 1,</nowiki></code> in your config file (or remove <code><nowiki>application</nowiki></code> from the directory list</code>).}}
{{注意|这将禁止访问应用程序内部的文件。 必须使用debug> 0读取应用程序中的某些JavaScript和CSS文件。当通过<code> <nowiki>'use_asset_manager'=> 1,启用调试模式时,可以强制使用资产管理器。</ nowiki > </ code>(或从目录列表中删除<code> <nowiki>应用程序</ nowiki> </ code> </ code>)。}}


The end result should look like this:
最后的结果会是这样:




<center>[[File:Remove index.php steps.png]]</center>
<center>[[File:Remove index.php steps.png]]</center>


 
==我要如何处理 <span style='color:red'>*</span> 必答题的(红色星号)?==
==How do I get rid of the <span style='color:red'>*</span> (red asterisk) of mandatory questions?==




===Instructions for LimeSurvey 2===
=== LimeSurvey 2 的使用说明===




In LimeSurvey 2.x, the red asterisk of mandatory questions is set within the template.css file ("asterisk" class). To hide it:
LimeSurvey 2.x 里,必答题的红星是在 template.css file 文件里设置的("asterisk" c类). 要想隐藏的话:
*Open the template editor
*打开模板编辑器
*Create a copy of the template you wish to modify
*创建你要编辑的模板的副本
*Select the "template.css" file and search for the asterix class
*选择 "template.css" 文件并找到 asterix
*Add the following line at the end of the asterix class".asterisk {display: none;}".
*asterix 类的末尾加上".asterisk {display: none;}".
*Save template.css
*保持 template.css 文件
*Clear your browser cache so that the edited template.css is reloaded and not taken from cache.
*清除浏览器缓存,确保编辑后的 template.css 文件不是从缓存里载入。




===Instructions for LimeSurvey 3===
=== LimeSurvey 3 的使用说明===




The instructions are similar to the ones presented above for LimeSurvey 2.
这个说明和上面 LimeSurvey 2 的相似。


* Access the desired theme. If it is a default theme, create a copy of it by clicking on the "extend" button.
* 访问想要使用的主题。如果是默认的主题,通过点击 "扩展" 按钮创建一份副本。
* Access the list of themes and click on the '''theme editor''' that corresponds to the newly created theme.
* 从主题列表里选择新近创建的主题,并点击其对应的 '''主题编辑器'''
* On the left side, you can visualise the corresponding CSS files of your theme.
* 你可以可视化你主题对应的 左边的 CSS 文件。
* Click on custom.css and add the following line:
* 点击 custom.css 并加入下列内容:


<div class="mw-translate-fuzzy">
<syntaxhighlight lang="css" enclose="div">.asterisk {display: none;}</syntaxhighlight>
<syntaxhighlight lang="css" enclose="div">.asterisk {display: none;}</syntaxhighlight>
</div>




* Save the changes. The red asterisk that is usually displayed at the beginning of the question text is hidden.
* 保存修改。通常在问题开始的位置显示的红星就被隐藏了。




==How can I embed a flash file?==
==如果嵌入 flash 文件?==




First, go to [[Global settings]] and deactivate the XSS-filter. Please also read up the implications deactivating that filter has on your instance. The following steps will '''not''' work if the filter is active.
首先,进入 [[全局设置]] 并停用 XSS-filter. 请一并阅读停用过滤器对你的实例的影响。下列步骤在过滤器启用的时候是 '''没有''用的 。
#Navigate to the place in your survey where you want insert your Flash file. This can be anywhere where you can use the integrated HTML editor, for example in questions, subquestions, answers, survey welcome/end text and many more.
#导航到调查里你要插入Flash 文件的位置。可能是你可以使用内置 HTML 编辑器的任何地方,比如在问题里,子问题里,答案里,调查的开始/结束文本等等。
#Open the [[First login - Your user preferences#Popup|full-screen editor mode]] by clicking the 'LimeFitWin' button on the editor tool-bar.
#打开 [[First login - Your user preferences#Popup|全屏编辑模式]] 工具栏上的 'LimeFitWin' 按钮。
#On the full-screen editor tool-bar you will find a little button with a Flash symbol. Click on it. A dialog box will open.
#在全屏编辑器的工具栏上有个带 Flash 符号的按钮,点击后会出现对话框。
#In this box you can give either the path to an existing Flash file somewhere or you click the 'Browse server' button.
#在这个窗口你要么提供一个现有的 Flash 文件的路径,要么通过 '浏览服务器' 按钮选取文件。
#If you clicked the 'Browse server' button you will be presented with a file browser and on the bottom an file upload field. Choose now an existing file or upload a file first.
#点击了 '浏览服务器' 按钮之后,选取文件的窗口会呈现,下边有上传的按钮。选择要嵌入的文件。




That's it! If you find this description incomplete please update it accordingly.
就是这样!如果你发现此说明不完整,请更新对应的部分。




{{Alert|title=Attention|text=The steps to use it in LimeSurvey 3 are similar. However, we do not recommend our users to use flash files!}}
{{Alert|title=注意|text=LimeSurvey 3 使用的步骤是类似的。然而,我们不推荐使用Flash 文件!}}




==How do I create a survey which is open to everyone?==
==我如何创建一个所有人都可以用的调查问卷?==




To create a survey that can be filled out by anyone, do not create a [[Survey participants|survey participants table]]! Share the survey link located on the [[Overview|overview panel]].
要创建一个所有人都可以填的调查,不要创建 [[Survey participants|调差参与者列表]]! 并共享[[Overview|预览面板]] 里调查的链接。




==Public registration - mandatory fields==
==公开注册-必填字段==




If you use a [[Survey participants|survey participants table]] and you also allow [[Participant_settings#Allow_public_registration|public registration]], then users will be prompted by the following message:
如果你使用[[Survey participants|调差参与者]] ,并且你允许 [[Participant_settings#Allow_public_registration|公开注册]], 用户会看到下面的提示信息:




Line 158: Line 199:




As it can be observed above, only the email field is mandatory.
就像上面看到那样,只有邮件地址字段是必填项。


To have all three fields marked as being mandatory, please edit your survey theme accordingly. If you use '''Fruity''', you have to go to the '''registration''' screen and see how the participants email field looks like:
如果想要三个字段都是必填项,需要在你的主题里做相应的设置。如果你选的主题是'''Fruity''', 你可以去 '''注册''' 界面看看参与者的邮件字段是什么样的:


<syntaxhighlight lang="twig">
<syntaxhighlight lang="twig">
Line 172: Line 213:
</syntaxhighlight>
</syntaxhighlight>


After that, make sure to edit the first name and last name fields correspondingly by adding the label: <syntaxhighlight lang="twig">{{ include('./subviews/registration/required.twig') }}</syntaxhighlight> and this line which makes the field mandatory to be filled out: <syntaxhighlight lang="twig">'required' : true</syntaxhighlight>
然后,确保通过添加的标签来编辑对应的名和姓的字段:<syntaxhighlight lang="twig">{{ include('./subviews/registration/required.twig') }}</syntaxhighlight> 下面的内容保证字段在填写时是必填项:<syntaxhighlight lang="twig">'required' : true</syntaxhighlight>


The edited file should look like this:
编辑过的文件应该看起来像这样:


<syntaxhighlight lang="twig">
<syntaxhighlight lang="twig">
Line 195: Line 236:




Now, the public registration page should look like this (all the fields being mandatory):
现在,公共注册页面样子变了 (所有的字段都是必填项了)




Line 201: Line 242:




== Hiding the language switcher ==
== 隐藏语言切换 ==




The steps to hide both the language switchers (near the survey title and on the top-right side of the page) are described in our wiki section dedicated to [[Multilingual_survey#Hints_.26_tips|multilingual surveys]].
隐藏语言切换的步骤在(接近调查的标题,页面的右上角) [[Multilingual_survey#Hints_.26_tips|多语言调查]]章节中有描述。




== Hiding "Exit and clear survey" ==
== 隐藏 ''退出并清空调查'' ==




In case you wish to hide the button "Exit and clear survey", you have to edit the nav_bar.twig file located inside your survey theme.
要隐藏 "退出并清空调查" 按钮,你需要编辑主题里的 nav_bar.twig 文件。




Line 216: Line 257:




The line that needs to be removed (or commented out) is:
要删除掉的行 (或注释掉) 是:


<syntaxhighlight lang="twig">
<syntaxhighlight lang="twig">
Line 226: Line 267:




Now, there is no option to exit and clear the survey.
现在,就没有退出并清空调查这个选项了。




Line 232: Line 273:




<div class="simplebox">[[File:help.png]] '''Note:''' This customization can be used when you create long surveys and require from your respondents to save and resume later the survey. Sometimes, the users tend to click the "Exit and clear survey" button which deletes the entry from the partially completed responses table.</div>
<div class="simplebox">[[File:help.png]] '''提示:''' 这个定制用于当你创建了一份长期调查,希望你的回馈者能够保存并能稍后再填。有时候,用户倾向于点''退出并清空调查'',那样会把整份未完成的调查表删掉。</div>


=Help, I accidentally...=
=救命,我不小心...=




==I forgot my admin password. How do I reset it?==
==我忘了密码,怎么重置密码?==




=== Version 2.x ===
=== 2.x 版本===
# Access to your server with a command line (ssh for example)
# 用命令行访问你的调查 (比如用 ssh)
# Ensure you have php command line access (see http://php.net/features.commandline.php).
# 确保你有 php 命令行可用 ( 参看 http://php.net/features.commandline.php).
# Go to your LimeSurvey directory
# 进入 LimeSurvey 的目录
# Launch this command <code>php application/commands/starter.php resetpassword NEW_ADMIN_NAME NEW_ADMIN_PASS</code> or <code>php application/commands/console.php resetpassword NEW_ADMIN_NAME NEW_ADMIN_PASS</code><sup>The php can need complete directory access, example /usr/bin/php</sup>
# 运行命令 <code>php application/commands/starter.php resetpassword NEW_ADMIN_NAME NEW_ADMIN_PASS</code> or <code>php application/commands/console.php resetpassword NEW_ADMIN_NAME NEW_ADMIN_PASS</code><sup>Php 要有目录的完全访问权限,比如 /usr/bin/php</sup>




{{Alert|Title=Attention|text=Please note that this method will not work in LimeSurvey 3.x!}}
{{Alert|Title=警告|text=这个方法在LimeSurvey 3.x 中无效!}}




===Version 2.x.x and newer with only FTP access===
=== 用 FTP 访问 2.x.x 和以上版本 ===




See [https://gitlab.com/SondagesPro/coreAndTools/ResetPasswordController ResetPasswordController]
参考 [https://gitlab.com/SondagesPro/coreAndTools/ResetPasswordController 重置密码控制器]




=== Directly change the password in the database ===
=== 直接在数据库中改密码 ===
If you have direct access to the Limesurvey database you can change the old password there by uploading the new password as SHA256 hash. You can [http://www.xorbin.com/tools/sha256-hash-calculator create the SHA256 hash of your password here].
如果你能够直接访问If you have direct access to the Limesurvey 的数据库,你可以用 SHA256 哈希值格式上传新密码. 你可以[http://www.xorbin.com/tools/sha256-hash-calculator 创建你密码的 SHA256 哈希值].


For example, you can use this instruction to set password to password:
<div class="mw-translate-fuzzy">
比如你可以用下面的说明设置你的密码:
<syntaxhighlight lang="sql" enclose="div">
<syntaxhighlight lang="sql" enclose="div">
UPDATE lime_users SET password = 0x35653838343839386461323830343731353164306535366638646336323932373733363033643064366161626264643632613131656637323164313534326438 WHERE uid =1;
UPDATE lime_users SET password = 0x35653838343839386461323830343731353164306535366638646336323932373733363033643064366161626264643632613131656637323164313534326438 WHERE uid =1;
</syntaxhighlight>
</syntaxhighlight>
Here with prefix to lime_ and database selected.
这个例子是以 lime_ 为前缀,并已经选择了数据库。
</div>
 
 
==我怎么恢复一个停用的调查?==
 
 
我们推荐用超时选项来代替停用一个调查。 '''如果你不小心关闭了你的调查,重要的是你没有修改调查的任何内容!'''
 
那么,只有下列步骤可以生效:
#再次激活你的调查。
#从工具栏选择 [[Responses|回应]]。
#选择"从停用的调查导入答案" 菜单,并点击[[Import responses|导入]]。
#选择你的源表。
#点击位于屏幕右上方的 "导入" 按钮。




==How can I restore data from a deactivated survey?==
{{Note|要了解 "过期" 和 "停用" 之间的区别, 请访问[https://manual.limesurvey.org/Closing_a_survey wiki 部分].}}




We recommend to always use the time-out option instead of deactivating a survey. '''If you closed your survey accidentally, it is important that you don't change anything in the survey!'''
== 我删除了一个问题/问题组/调查!==


Then, and only then the following steps will work:
#Activate your survey again
#Select [[Responses]] from the survey toolbar.
#Click on [[Import responses|Import]] and select the "Import answers from a deactivated survey table" menu entry.
#Choose your source table.
#Click on the "Import" button located on the upper-right part of the screen.


如果你真的删掉了,那就是没了。只有备份能够帮助你恢复。


{{Note|To understand the difference between "expiry" and "deactivation", visit this following [https://manual.limesurvey.org/Closing_a_survey wiki section].}}


{{Note|如果你是 [https://limesurvey.org LimeSurvey GmbH] 的专业客户,请通过开一个支持事件,让我们的团队为你提供和你的账号相关的备份。'''请注意这是项收费服务!'''}}


==I deleted a question/question group/survey!==


=软硬件需求=


If you delete it, it is gone. Only a backup could help you recover it.


常规需求请参考[[Installation#Make sure you can use LimeSurvey on your website|安装说明]].


{{Note|If you are a [https://limesurvey.org LimeSurvey GmbH] professional user, please open a support ticket and ask the team to provide you the backup associated to your account. '''Please note that this service is not free of charge!'''}}


== LimeSurvey 有哪些限制...==


=Hard- and Software requirements=


=== ...关于速度===


For general requirements please refer to our [[Installation#Make sure you can use LimeSurvey on your website|installation instructions]].


LimeSurvey 不存在速度限制。 一切都取决于你的服务器和连接的速度。如果你想在短时间内做大量用户的调查,但你不知道你的服务器能否胜任,'''请查看论坛里的相关主题!''' 或者 '''联系一个通过LimeSurvey 认证的合作伙伴''':https://limesurvey.com.


==What limitations does LimeSurvey have...==
=== ...关于调查的尺寸 ===


==== MySQL and MariaDB ====


=== ...regarding speed===
<div class="mw-translate-fuzzy">
注意: '调查尺寸' 是指你调查里问题(和答案)的最大数量 - '''不要和调查的答复数量混淆(对答复没有限制)'''。从理论上来说,在 LimeSurvey 里对问题/答案的最大数量也没有限制。但你使用的数据库会有些限制。 最重要的一点就是结果集的字段数量(列)限制。
*MySQL ISAM:  VARCHAR 和 CHAR 列在表中的合计长度最多到 64KB。
*MySQL InnoDB: 最多 1000 列。
*MS SQL Server 2000: 最多 1024 列。
*Postgres: 取决于不同的列的数据类型,列的最大值从 250 到 1600 。可以通过增加默认块的尺寸到32k,使列的最大值增加4倍。参考[[Installation FAQ]] and [http://www.postgresql.org/docs/faqs.FAQ.html#item4.4 PostgreSQL FAQ].
</div>


{{Alert|title=注意|text=请在你要动手前先想想要做什么!一个10 x 10 的阵列也会占用100个列。经验法则:屏幕上每一个填写或是选择的项都会占一列!}}


There is no existing speed limit on LimeSurvey. Everything depends on how fast your server and your connection are. If you expect a large number of users within a short amount of time and you are not sure if your server can handle this, '''check our forum for similar topics!''' or '''contact an authorized LimeSurvey partner''': https://limesurvey.com.
<div class="mw-translate-fuzzy">
mySQL ISAM 引擎是最麻烦的一个 (参看 [http://dev.mysql.com/doc/refman/5.0/en/column-count-limit.html mysql 文档]). 由于它每行最多只允许65,535个字节和utf8字符,因此每个字符最多需要3个字节。最多只能输入21,844个字符(但这取决于您的数据库编码).
</div>


=== ...regarding survey size===
你可以大致计算调查的尺寸:
*每个数字问题:'''每个答案''' 20个字符
*每个多选和阵列题:'''每个答案'''5个字符
*每个其他问题类型:5个字符
*再打 10% 的富裕


==== With Microsoft SQL ====


Note: 'Survey size' refers to the maximum number of questions (and answers) in your survey - '''don't confuse this with the number of replies on your survey (there is no limitation on that)'''. Theoretically there would also be no limit on the maximum number of questions/answers in LimeSurvey. But the database engine you are using has several limits. The most important one is the limit on the number of fields(columns) in the result table.
There are no fixed limit on MSSQL. Some [https://docs.microsoft.com/en-us/sql/sql-server/maximum-capacity-specifications-for-sql-server?view=sql-server-ver15 information on microsoft website].
*MySQL ISAM: The sum of the lengths of the VARCHAR and CHAR columns in a table may be up to 64KB.
*MySQL InnoDB: Maximum number of 1000 columns
*MS SQL Server 2000: Maximum number of 1024 columns
*Postgres: Maximum number of 250-1600 columns depending on column types. The maximum number of columns can be quadrupled by increasing the default block size to 32k. See [[Installation FAQ]] and [http://www.postgresql.org/docs/faqs.FAQ.html#item4.4 PostgreSQL FAQ].


{{Alert|title=Attention|text=Please think about what you do before you do it! An array of 10 x 10 items already costs you 100 columns. Rule of thumb: every item on the screen that can be filled in or selected costs one column!}}
The 8,060 bytes per row can appear after activation when you want to browse response and data. You can export answer code and not answer text or try to export only some columns.


The mySQL ISAM engine is the most tricky one (see [http://dev.mysql.com/doc/refman/5.0/en/column-count-limit.html mysql documentation for more information]). As it allows only up to 65,535 bytes per row and utf8 characters, it can require up to three bytes per character. The maximum may be only 21,844 characters (but this depends on your DB encoding).
====With PostgreSQL====


You can roughly calculate the size of your survey like this:
When you try to export response : you can have SQLSTATE[54000] error. You can export some columns. See [https://forums.limesurvey.org/forum/french-forum/125447-erreur-sqlstate-54000 forum post].
*Every multiple numerical question: 20 chars '''for each answer'''
*Every multiple choice & array question answers: 5 chars '''for each answer'''
*Every other question type: 5 chars
*Add 10% for the usual overhead


==How to increase the maximum number of columns in PostgreSQL==
<div class="mw-translate-fuzzy">
==如何增加PostgreSQL的最大列的数量==
</div>




In case your survey contains too many questions, you can define a different block size in PostgreSQL to create more columns. This might be tricky because you have to recompile PostgreSQL and set BLCKSZ to a higher value, like 16kiB or 32kiB. Watch for the configuration option "--with-blocksize=BLOCKSIZE". For details see the archives of the PostgreSQL mailing list or ask there (pgsql-patches(at)postgresql(dot)org).
假如你的调查包含了很多很多问题,你可以在 PostgreSQL 里定义一个不同的块尺寸来创建更多的列。这会很麻烦,因为你在设置 BLCKSZ 为一个高一些的值,比如  16kiB 或 32kiB,之后要重新编译 PostgreSQL. 查看配置选项 "--with-blocksize=BLOCKSIZE". 细节请查看 PostgreSQL 邮件列表的归档或是向 (pgsql-patches(at)postgresql(dot)org) 问询.


Instructions for Debian (thanks to Martin Pitt):
Debian 系统相关说明 (感谢 Martin Pitt):


<syntaxhighlight lang="bash">sudo apt-get build-dep postgresql-8.3
<syntaxhighlight lang="bash">sudo apt-get build-dep postgresql-8.3
Line 338: Line 398:
dpkg-buildpackage -us -uc -b -nc</syntaxhighlight>
dpkg-buildpackage -us -uc -b -nc</syntaxhighlight>


Note: '''the above could not be reproduced''' on Ubuntu 14.04 in August 2014. A patch is required (the configuration option is not enough). See (tested with PostgreSQL 9.3 on Linux):
注意: '''以上内容在 2014年8月的 14.04 版本的 Ubuntu 上不能重现'''. 需要一个补丁 (配置选项还不够). 参看 (在 Liunxt 上测试 PostgreSQL 9.3 ):
[[Instructions for increasing the maximum number of columns in PostgreSQL on Linux]]
[[Instructions for increasing the maximum number of columns in PostgreSQL on Linux|如何增加安装在Linux上的PostgreSQL的最大列的数量]]


==Fatal error: Allowed memory size==
==致命错误:允许的内存尺寸 ==




Depending on your server configuration you might run into memory problems being reported by an error like ''"Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 233472 bytes) in /path/to/htdocs/limesurvey/filename.php on line 7296"''.
取决于你的系统配置,你可能在运行中遇到类似下面的内存问题 ''"致命错误: 允许的内存尺寸 8388608 bytes 耗尽 (尝试分配 233472 bytes) /path/to/htdocs/limesurvey/filename.php 7296 "''.


You can try to raise the limit by [[Optional settings#Resources|adding an optional setting]] to LimeSurvey's config file.
你可以在通过 [[Optional settings#Resources|增加可选设置]] LimeSurvey's 的配置文件里尝试增加限制值。


Please bear in mind that changes in the default settings of an application can always be overruled by global server settings. To increase the memory limit of your sever to 128M:
请记住,全局设置可以覆盖应用的默认设置。如何增加内存限制到128M:*memory_limit = 128M 在服务器的主 php.ini 文件里修改 (推荐,如果你有权访问)
*memory_limit = 128M to your server's main php.ini file (recommended, if you have access)
*memory_limit = 128M 在 LimeSurvey 根目录下的php.ini文件
*memory_limit = 128M to a php.ini file in the LimeSurvey root
*php_value memory_limit 32M 在 LimeSurvey 根目录下的 .htaccess 文件
*php_value memory_limit 32M in a .htaccess file located in the LimeSurvey root folder
*" ini_set('memory_limit', '128M'); " config.php 文件里
*" ini_set('memory_limit', '128M'); " in your config.php


=Specific configuration=
=特殊配置=




Under certain circumstances, you need to update the LimeSurvey configuration in application/config/config.php
某些情况下,你需要更新 LimeSurvey 的配置文件 application/config/config.php


== IE 11 and Windows 7 / Windows 8 ==
== IE 11 Windows 7 / Windows 8 ==


There is a known issue with the session with IE 11, that leads to users not being able to finish a survey.
有一个已知的会话问题会造成使用 IE 11 的用户无法完成调查。


It is solved by giving the session a unique name.
通过给会话起不同的名字来解决这个问题。


This is done by adding this to the config file.
This is done by adding this to the config file.
Line 373: Line 432:
</syntaxhighlight>
</syntaxhighlight>


== Two LimeSurvey instances on same domain ==
== 同一个域里的两个 LimeSurvey 实例 ==




If you run 2 LimeSurvey instances on the same domain, but within different directories, you need to update the [[Optional_settings#Yii_settings|session configuration]].  
如果要在同一个域里的不同文件夹里运行两个 LimeSurvey 的实例,你需要更新 [[Optional_settings#Yii_settings|会话配置]].  





Latest revision as of 15:50, 28 March 2023


以下答案来自 LimeSurvey 用户论坛。如果你有什么不明白的,或者不知道下一步该怎么做,你可以把你的问题发给其他论坛成员: https://limesurvey.org/forums. 要获得专业支持,请联系我们的认证合作伙伴:https://limesurvey.com.


入门指南

如果你不想通过阅读 LimeSurvey 手册来学习怎么做, 我们推荐你可以通过 的视频教程来学习:


如果你用任何好的视频,请不要犹豫和我们分享。


我想快速安装LimeSurvey

请从下面两个链接获得快速安装LimeSurvey的方法:


  我们正在制作介绍LimeSurvey的视频。



调查的设计和布局

我如何从 URL 路径里删掉index.php,从而得到一个短的 URL

如果你要用花式链接(每个链接里都没有/index.php), 请编辑文件 /application/config/config.php,修改下面的内容

'showScriptName' => true,

'showScriptName' => false,

要使这个设置正常工作,必须使用正确安装了 mod_rewrite 模块的Apache 服务器。

With nginx webserver

如果您使用的是Nginx http服务器(通过FastCGI运行php),并且想使用'urlFormat'=>'path'设置(请参阅config .php),请考虑以下Nginx网站配置:

server {
    set $host_path "/PATH/TO/LIMESURVEY";
    server_name  YOUR.SERVER.FQDN;
    root /PATH/TO/LIMESURVEY;
    charset utf-8;
    try_files $uri $uri/ /index.php?r=$uri&$args;
    #不允许从脚本目录内部读取, see issue with debug > 1 on note
    location ~ ^/(application|protected|framework|themes/\w+/views) {
        deny  all;
    }
    #不允许从用户上传目录直接读取
    location ~ ^/upload/surveys/.*/fu_[a-z0-9]*$ {
        return 444;
    }
    #不允许上传可执行文件到上传目录
    location ~* /upload/.*\.(pl|cgi|py|pyc|pyo|phtml|sh|lua|php|php3|php4|php5|php6|pcgi|pcgi3|pcgi4|pcgi5|pcgi6|icn)$ {
        return 444;
    }
    #避免处理yii对不存在的静态文件的调用
    location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
        try_files $uri =404;
    }
    location ~ \.php$ {
        fastcgi_split_path_info  ^(.+\.php)(.*)$;
        try_files $uri index.php;
        fastcgi_pass   127.0.0.1:9000; # Change this to match your settings
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_param  SCRIPT_NAME      $fastcgi_script_name;
    }
}
   # Allow access to well-known directory, different usage, for example ACME Challenge for Let's Encrypt
   location ~ /\.well-known {
       allow all;
   }
   # Deny all attempts to access hidden files
   # such as .htaccess, .htpasswd, .DS_Store (Mac).
       location ~ /\. {
       deny all;
   }
   #Disallow direct read user upload files
   location ~ ^/upload/surveys/.*/fu_[a-z0-9]*$ {
       return 444;
   }
   #Disallow uploaded potential executable files in upload directory
   location ~* /upload/.*\.(pl|cgi|py|pyc|pyo|phtml|sh|lua|php|php3|php4|php5|php6|pcgi|pcgi3|pcgi4|pcgi5|pcgi6|icn)$ {
       return 444;
   }
   #avoid processing of calls to unexisting static files by yii
   location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
       try_files $uri =404;
   }
   location ~ \.php$ {
       fastcgi_split_path_info  ^(.+\.php)(.*)$;
       try_files $uri index.php;
       fastcgi_pass   127.0.0.1:9000; # Change this to match your settings
       fastcgi_index index.php;
       include fastcgi_params;
       fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
       fastcgi_param  SCRIPT_NAME      $fastcgi_script_name;
   }

}</syntaxhighlight>

Template:注意

最后的结果会是这样:


我要如何处理 * 必答题的(红色星号)?

LimeSurvey 2 的使用说明

在 LimeSurvey 2.x 里,必答题的红星是在 template.css file 文件里设置的("asterisk" c类). 要想隐藏的话:

  • 打开模板编辑器
  • 创建你要编辑的模板的副本
  • 选择 "template.css" 文件并找到 asterix 类
  • 在 asterix 类的末尾加上".asterisk {display: none;}".
  • 保持 template.css 文件
  • 清除浏览器缓存,确保编辑后的 template.css 文件不是从缓存里载入。


LimeSurvey 3 的使用说明

这个说明和上面 LimeSurvey 2 的相似。

  • 访问想要使用的主题。如果是默认的主题,通过点击 "扩展" 按钮创建一份副本。
  • 从主题列表里选择新近创建的主题,并点击其对应的 主题编辑器
  • 你可以可视化你主题对应的 左边的 CSS 文件。
  • 点击 custom.css 并加入下列内容:
.asterisk {display: none;}


  • 保存修改。通常在问题开始的位置显示的红星就被隐藏了。


如果嵌入 flash 文件?

首先,进入 全局设置 并停用 XSS-filter. 请一并阅读停用过滤器对你的实例的影响。下列步骤在过滤器启用的时候是 '没有用的 。

  1. 导航到调查里你要插入Flash 文件的位置。可能是你可以使用内置 HTML 编辑器的任何地方,比如在问题里,子问题里,答案里,调查的开始/结束文本等等。
  2. 打开 全屏编辑模式 工具栏上的 'LimeFitWin' 按钮。
  3. 在全屏编辑器的工具栏上有个带 Flash 符号的按钮,点击后会出现对话框。
  4. 在这个窗口你要么提供一个现有的 Flash 文件的路径,要么通过 '浏览服务器' 按钮选取文件。
  5. 点击了 '浏览服务器' 按钮之后,选取文件的窗口会呈现,下边有上传的按钮。选择要嵌入的文件。


就是这样!如果你发现此说明不完整,请更新对应的部分。


  注意 : LimeSurvey 3 使用的步骤是类似的。然而,我们不推荐使用Flash 文件!



我如何创建一个所有人都可以用的调查问卷?

要创建一个所有人都可以填的调查,不要创建 调差参与者列表! 并共享预览面板 里调查的链接。


公开注册-必填字段

如果你使用调差参与者 ,并且你允许 公开注册, 用户会看到下面的提示信息:



就像上面看到那样,只有邮件地址字段是必填项。

如果想要三个字段都是必填项,需要在你的主题里做相应的设置。如果你选的主题是Fruity, 你可以去 注册 界面看看参与者的邮件字段是什么样的:

        {# Participants email #}
        <div class='{{ aSurveyInfo.class.registerformcolrowc }} form-group row' {{ aSurveyInfo.attr.registerformcolrowc }}>
            <label {{ aSurveyInfo.attr.registerformcolrowclabel }} class='{{ aSurveyInfo.class.registerformcolrowclabel }}  control-label'> {{ gT("Email address:") }} {{ include('./subviews/registration/required.twig') }}</label>
            <div {{ aSurveyInfo.attr.registerformcolrowcdiv }}  >
                {{ C.Html.textField('register_email', aSurveyInfo.sEmail, ({'id' : 'register_email','class' : 'form-control input-sm','required' : true})) }}
            </div>
        </div>

然后,确保通过添加的标签来编辑对应的名和姓的字段:

{{ include('./subviews/registration/required.twig') }}

下面的内容保证字段在填写时是必填项:

'required' : true

编辑过的文件应该看起来像这样:

        {# Participants first name #}
        <div class='{{ aSurveyInfo.class.registerformcolrow }} form-group row' {{ aSurveyInfo.attr.registerformcolrow }}>
            <label for='register_firstname' class='{{ aSurveyInfo.class.registerformcolrowlabel }} control-label '>{{ gT("First name:") }} {{ include('./subviews/registration/required.twig') }}</label> {# extra label #}
            <div class="">
                {{ C.Html.textField('register_firstname', aSurveyInfo.sFirstName, ({'id' : 'register_firstname','class' : 'form-control', 'required' : true})) }} {# mandatory field #}
            </div>
        </div>

        {# Participants last name #}
        <div class='{{ aSurveyInfo.class.registerformcolrowb }} form-group row' {{ aSurveyInfo.attr.registerformcolrowb }}>
            <label {{ aSurveyInfo.attr.registerformcolrowblabel }}  class='{{ aSurveyInfo.class.registerformcolrowblabel }} control-label '>{{ gT("Last name:") }} {{ include('./subviews/registration/required.twig') }}</label> {# extra label #}
            <div {{ aSurveyInfo.attr.registerformcolrowbdiv }} >
                {{ C.Html.textField('register_lastname', aSurveyInfo.sLastName, ({'id' : 'register_lastname', 'class' : 'form-control', 'required' : true})) }} {# mandatory field #}
            </div>
        </div>


现在,公共注册页面样子变了 (所有的字段都是必填项了):



隐藏语言切换

隐藏语言切换的步骤在(接近调查的标题,页面的右上角) 多语言调查章节中有描述。


隐藏 退出并清空调查

要隐藏 "退出并清空调查" 按钮,你需要编辑主题里的 nav_bar.twig 文件。



要删除掉的行 (或注释掉) 是:

{{ include('./subviews/navigation/clearall_links.twig') }}



现在,就没有退出并清空调查这个选项了。



提示: 这个定制用于当你创建了一份长期调查,希望你的回馈者能够保存并能稍后再填。有时候,用户倾向于点退出并清空调查,那样会把整份未完成的调查表删掉。

救命,我不小心...

我忘了密码,怎么重置密码?

2.x 版本

  1. 用命令行访问你的调查 (比如用 ssh)
  2. 确保你有 php 命令行可用 ( 参看 http://php.net/features.commandline.php).
  3. 进入 LimeSurvey 的目录
  4. 运行命令 php application/commands/starter.php resetpassword NEW_ADMIN_NAME NEW_ADMIN_PASS or php application/commands/console.php resetpassword NEW_ADMIN_NAME NEW_ADMIN_PASSPhp 要有目录的完全访问权限,比如 /usr/bin/php


  这个方法在LimeSurvey 3.x 中无效!



用 FTP 访问 2.x.x 和以上版本

参考 重置密码控制器


直接在数据库中改密码

如果你能够直接访问If you have direct access to the Limesurvey 的数据库,你可以用 SHA256 哈希值格式上传新密码. 你可以创建你密码的 SHA256 哈希值.

比如你可以用下面的说明设置你的密码:

UPDATE lime_users SET password = 0x35653838343839386461323830343731353164306535366638646336323932373733363033643064366161626264643632613131656637323164313534326438 WHERE uid =1;

这个例子是以 lime_ 为前缀,并已经选择了数据库。


我怎么恢复一个停用的调查?

我们推荐用超时选项来代替停用一个调查。 如果你不小心关闭了你的调查,重要的是你没有修改调查的任何内容!

那么,只有下列步骤可以生效:

  1. 再次激活你的调查。
  2. 从工具栏选择 回应
  3. 选择"从停用的调查导入答案" 菜单,并点击导入
  4. 选择你的源表。
  5. 点击位于屏幕右上方的 "导入" 按钮。


要了解 "过期" 和 "停用" 之间的区别, 请访问wiki 部分.


我删除了一个问题/问题组/调查!

如果你真的删掉了,那就是没了。只有备份能够帮助你恢复。


如果你是 LimeSurvey GmbH 的专业客户,请通过开一个支持事件,让我们的团队为你提供和你的账号相关的备份。请注意这是项收费服务!


软硬件需求

常规需求请参考安装说明.


LimeSurvey 有哪些限制...

...关于速度

LimeSurvey 不存在速度限制。 一切都取决于你的服务器和连接的速度。如果你想在短时间内做大量用户的调查,但你不知道你的服务器能否胜任,请查看论坛里的相关主题! 或者 联系一个通过LimeSurvey 认证的合作伙伴https://limesurvey.com.

...关于调查的尺寸

MySQL and MariaDB

注意: '调查尺寸' 是指你调查里问题(和答案)的最大数量 - 不要和调查的答复数量混淆(对答复没有限制)。从理论上来说,在 LimeSurvey 里对问题/答案的最大数量也没有限制。但你使用的数据库会有些限制。 最重要的一点就是结果集的字段数量(列)限制。

  • MySQL ISAM: VARCHAR 和 CHAR 列在表中的合计长度最多到 64KB。
  • MySQL InnoDB: 最多 1000 列。
  • MS SQL Server 2000: 最多 1024 列。
  • Postgres: 取决于不同的列的数据类型,列的最大值从 250 到 1600 。可以通过增加默认块的尺寸到32k,使列的最大值增加4倍。参考Installation FAQ and PostgreSQL FAQ.
  注意 : 请在你要动手前先想想要做什么!一个10 x 10 的阵列也会占用100个列。经验法则:屏幕上每一个填写或是选择的项都会占一列!


mySQL ISAM 引擎是最麻烦的一个 (参看 mysql 文档). 由于它每行最多只允许65,535个字节和utf8字符,因此每个字符最多需要3个字节。最多只能输入21,844个字符(但这取决于您的数据库编码).

你可以大致计算调查的尺寸:

  • 每个数字问题:每个答案 20个字符
  • 每个多选和阵列题:每个答案5个字符
  • 每个其他问题类型:5个字符
  • 再打 10% 的富裕

With Microsoft SQL

There are no fixed limit on MSSQL. Some information on microsoft website.

The 8,060 bytes per row can appear after activation when you want to browse response and data. You can export answer code and not answer text or try to export only some columns.

With PostgreSQL

When you try to export response : you can have SQLSTATE[54000] error. You can export some columns. See forum post.

如何增加PostgreSQL的最大列的数量


假如你的调查包含了很多很多问题,你可以在 PostgreSQL 里定义一个不同的块尺寸来创建更多的列。这会很麻烦,因为你在设置 BLCKSZ 为一个高一些的值,比如 16kiB 或 32kiB,之后要重新编译 PostgreSQL. 查看配置选项 "--with-blocksize=BLOCKSIZE". 细节请查看 PostgreSQL 邮件列表的归档或是向 (pgsql-patches(at)postgresql(dot)org) 问询.

Debian 系统相关说明 (感谢 Martin Pitt):

sudo apt-get build-dep postgresql-8.3
apt-get source postgresql-8.3
cd postgresql-8.3-*
debian/rules patch
sensible-editor build-tree/postgresql-8.3.5/src/include/pg_config_manual.h
dpkg-buildpackage -us -uc -b -nc

注意: 以上内容在 2014年8月的 14.04 版本的 Ubuntu 上不能重现. 需要一个补丁 (配置选项还不够). 参看 (在 Liunxt 上测试 PostgreSQL 9.3 ): 如何增加安装在Linux上的PostgreSQL的最大列的数量

致命错误:允许的内存尺寸

取决于你的系统配置,你可能在运行中遇到类似下面的内存问题 "致命错误: 允许的内存尺寸 8388608 bytes 耗尽 (尝试分配 233472 bytes) 在 /path/to/htdocs/limesurvey/filename.php 的 7296 行".

你可以在通过 增加可选设置 在 LimeSurvey's 的配置文件里尝试增加限制值。

请记住,全局设置可以覆盖应用的默认设置。如何增加内存限制到128M:*memory_limit = 128M 在服务器的主 php.ini 文件里修改 (推荐,如果你有权访问)

  • memory_limit = 128M 在 LimeSurvey 根目录下的php.ini文件
  • php_value memory_limit 32M 在 LimeSurvey 根目录下的 .htaccess 文件
  • " ini_set('memory_limit', '128M'); " 在 config.php 文件里

特殊配置

某些情况下,你需要更新 LimeSurvey 的配置文件 application/config/config.php

IE 11 和 Windows 7 / Windows 8

有一个已知的会话问题会造成使用 IE 11 的用户无法完成调查。

通过给会话起不同的名字来解决这个问题。

This is done by adding this to the config file.

       // Set the name of the session
        'session' => array (
            'sessionName' => "YOURUNIQUESESSIONNAME",
        ),

同一个域里的两个 LimeSurvey 实例

如果要在同一个域里的不同文件夹里运行两个 LimeSurvey 的实例,你需要更新 会话配置.


For example, if you have example.org/ls1 and example.org/ls2, update the ls1 config file:

        'session' => array (
            'cookieParams' => array(
                    'path' => '/ls1',
                ),
            ),
        'request' => array(
            'csrfCookie' => array( 'path' => '/ls1' )
        ),