x

Main chapters

  1. LimeSurvey Cloud vs LimeSurvey CE
  2. LimeSurvey Cloud - Quick start guide
  3. LimeSurvey CE - Installation
  4. How to design a good survey (Guide)
  5. Getting started
  6. LimeSurvey configuration
  7. Introduction - Surveys
  8. View survey settings
  9. View survey menu
  10. View survey structure
  11. Introduction - Questions
  12. Introduction - Question Groups
  13. Introduction - Surveys - Management
  14. Survey toolbar options
  15. Multilingual survey
  16. Quick start guide - ExpressionScript
  17. Advanced features
  18. General FAQ
  19. Troubleshooting
  20. Workarounds
  21. License
  22. Version change log
  23. Plugins - Advanced
 Actions

Réglages optionnels

From LimeSurvey Manual

Revision as of 01:14, 2 September 2009 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Translation in progress.

General

Ces réglages optionnels peuvent être trouver dans le fichier config-default.php d'une installation standard.  Si vous voulez modifier ces réglages, ne modifier pas config-default.php, mais copier la ligne dans le fichier config.php et modifier le paramêtre dans ce fichier. Tous les paramêtres de config.php vont écraser ceux de config-default.php. De cette façon, il est plus facile de mettre à jour votre installation.

Note: Chaque nouvelle version apporte son lot de nouveauté et de modification. Revoir le fichier config-default peut donner de nouvelles pistes

Connexion à la base de donnée

  • $databaseport: Si le port de votre base de données n'est pas celui par défaut, indiquer le ici.
  • $databasetabletype: Moteurs de tables MySQL qui sera utilisé pour créer les tables de résultats et les tables d'invitation (si MySQL est utilisé). La valeur conseillé si cela est possible est 'InnoDB', la valeur par défaut est 'MyISAM'.
  • $databasepersistent: Activer les connexions MySQL persistantes ('true') - Cela pourra être plus rapide selon le pilote de la base de données.Le défaut est false.

Sécurité

  • $filterxsshtml: Ce paramètre permet de filtrer les tags html dans le texte des sondages, groupes, question et réponses dasn la partie administration. Ne désactivé ce paramètre de sécurité (false) que si vous êtes absolument sûr des utilisateurs de la partie administration de votre installation de limesurvey, et que vous voulez leur permettre d'utiliser du javascript, des video flash, du SVG.

Resources

  • $memorylimit: This sets how much memory LimeSurvey can access. '16M' is the minimum (M=mb) recommended. If you receive time out errors or have problems generating statistics or exporting files raise this limit to '128M' or '256M'.
  • $sessionlifetime: Defines the time in seconds after which a survey session expires. Default: $sessionlifetime    =  3600;

Appearance

  • $lwcdropdowns: This can be set to either "L" or "R". Setting it to "R" will result in 'List with Comment' questions being displayed as radio buttons, whereas "L" will result in 'List with Comment' questions being displayed in a 'dropdown' list box.
  • $dropdownthreshold: When you have selected "R" for $dropdowns, this allows you to set a maximum number of options that will display as radio buttons, before converting back to a dropdown list. If you have a question that has a large number of options, displaying them all as radio buttons can look unweildy, and be counter-intuitive to users. Setting this to a maximum of, say 25 (which is the default) means that large lists are easier for the survey participant to use.
  • $repeatheadings: With the array (flexible) type question, often you'll have a lot of answers, which - when displayed on screen - take up more than one page. The repeat-headers setting lets you decide how many answers should be displayed before repeating the header information for the question. A good setting for this is around 15. If you don't want the headings to repeat at all, set this to 0 (which is the default).
  • $minrepeatheadings: The minimum number of reaming answers that are required before repeating the headings in array (flexible) questions.
  • $addTitleToLinks: If this option is set to true, then LimeSurvey will add 'title' html element to all links used in menus. This will help screen reader to analyze the menus. Only set this to true if you're using a screen reader because it overlaps with tool tips.
  • $defaulttemplate: This setting specifys the default theme used for the 'public list' of surveys.
  • $defaulthtmleditormode: Sets the default mode for integrated htmleditor. Valid settings are: inline (default), popup and none:
    • inline: Inline replacement of fields by an HTML editor. Slow but convenient and user friendly
    • popup: Adds an icon that runs a popup with and html editor. Faster, but html code is displayed on the form
    • none: No html editor

Language & Time

  • $defaultlang: This should be set to the default language to be used in your administration scripts, and also the default setting for language in the public surveys. You can change this setting for public surveys on a survey-by-survey basis from the admin scripts.
  • $translationmode: If interface translations are not working (no matter what language you are trying to use, the admin interface always stays in English) this might be because of a bug in your PHP version. Set this to '1' to activate a workaround for this bug.
  • $timeadjust: If your web server is in a different time zone to the location where your surveys will be based, put the difference between your server and your home time zone here. For example, I live in Australia but use a US web server. The web server is 14 hours behind my local time zone. So my setting here is "14". In other words, it adds 14 hours to the web servers time. This setting is particularly important when surveys timestamp the responses.
  • $modrewrite: If set to 1, active fancy URL Feature (Example: http://survey.example.com/123456/lang-fr/tk-sdlfkjozeiru instead of http://survey.example.com/index.php?sid=123456⟨=fr&token;=sdlfkjozeiru) . Before activate, you MUST rename "htaccess.txt" file to ".htaccess". Prerequies: Apache + mod_rewrite.

Survey Behavior

  • $allowmandbackwards: A setting of 1 for this variable will allow survey participants to move to a previous question even if they haven't answered a mandatory question. If it is set on 0, then participants will have to answer that question even to move to a previous question.
  • $deletenonvalues: This is a fairly difficult setting to explain. If set to 0, if a question (let's call it question "b") is only displayed conditionally (ie: based on the answer to a previous question - let's call it question "a"), and a survey user answers that question (question "b"), but then moves backwards through the script and changes the previous question (question "a") such that this question (question "b") no longer displays, the survey will still remember and save their answer to the no longer applicable question (question "b"). I generally prefer this to be the case, on the basis that it may be interesting to know this information anyway. But, if you would prefer that the script be consistent and refuse to store information that shouldn't logically display you can change this setting to 1, and the script will not save this redundant information.
  • $shownoanswer: When a question of a radio button/select type that contains editable answers (ie: List, Array questions) is not mandatory and $shownoanswer is set to 1, an additional entry is shown for "N/A" - so that participants may choose to not answer the question. Some people prefer this not to be available. Set this to 0 to turn this off.
  • $sessionlifetime: This setting determines how many seconds your survey participants can remain inactive (that means not changing the page) until his session times out and the data on the current page is lost. (Default: 3600)
  • $printanswershonorsconditions: This setting determines if the printaswers feature will display entries from questions that were hidden by conditions-branching. (Default: 1 [hide answers from questions hidden by conditions])
  • $hide_groupdescr_allinone: This setting is relevant for all-in-one surveys using conditions and has bene introduced in LimeSurvey 1.85RC3. When this is set to true the group name and description is hidden if all questions in the group are hidden. (Default: true (hide group name and description when all conditions in the group are hidden by conditions))
  • $showpopups:  Show popup messages if mandatory or conditional questions have not been answered correctly. 1=Show popup message (default), 0=Show message on page instead.

Development

  • $debug: With this setting you set the PHP error reporting to E_ALL. That means every little notice, warning or error with the script is shown. This setting should be only switched to 1 if you are trying to debug the application for any reason, if you are a developer switch it to 2. Don't switch it to 1 or 2 in production since it might cause path disclosure. (Default: 0)

Email Settings

  • $emailmethod:  This determines how E-mail messages are being sent. The following options are available:
    • mail: use internal PHP mailer
    • sendmail: use sendmail mailer
    • smtp:use SMTP relaying. Use this setting when you are running LimeSurvey on a host that is not your mail server.
  • $emailsmtphost: If you use 'smtp' as $emailmethod then you have to put your SMTP-server here. If you are using Google mail you might have to add the port number like $emailsmtphost = 'smtp.gmail.com:465';
  • $emailsmtpuser: If your SMTP-server needs authentication then set this to your user name, otherwise it must be blank.
  • $emailsmtppassword: If your SMTP-server needs authentication then set this to your password, otherwise it must be blank.
  • $emailsmtpssl: Set this to 'ssl' or 'tls' to use SSL/TLS for SMTP connection
  • $maxemails: When sending invitations or reminders to survey participants, this setting is used to determine how many emails can be sent in one bunch. Different web servers have different email capacities, and if your script takes too long to send a bunch of emails, the script could time out and cause errors. Most web servers can send 100 emails at a time within the default 30 second time limit for a PHP script. If you get script timeout errors when sending large numbers of emails, reduce the number in this setting.  Clicking the 'send email invitation' button on the token control toolbar, (not the button on the right of each token), sends the maxemails number of invitations, then displays a list of the addresses sent to and a warning that "There are more emails pending than could be sent in one batch. Continue sending emails by clicking below. There are ### emails still to be sent." and provides a "continue button" to proceed with the next batch. I.e., the user determines when to send the next batch after each batch gets emailed.  It is not necessary to wait with this screen active.  The admin could log off and come back at a later time to send the next batch of invites.

Statistics and Response Browsing

  • $usejpgraph: (< 1.8) The JPGraph-library lets you display the results of your survey in the statistics part of LimeSurvey  in bar- and pie charts. If you have a correctly configured jpgraph class set up on your server, you can turn this feature on or off (1=on, 0=off). Please have a look, every version of PHP needs another version of JPGraph! This feature is currently in development, so expect a few weird outcomes.
  • $jpgraphdir: (< 1.8) The physical disk location of the jpgraph class scripts. This setting is only required if $usejpgraph is equal to 1.
  • $jpgraphfont: (< 1.8) The font to use with graphs. A failsafe setting would be "FF_FONT1"
  • $embedded: If you want to integrate LimeSurvey into another page then you can turn off sending HTML headers by using this setting and point instead to the header method of a custom function. This is a dirty hack but should work for a quick integration.
  • $filterout_incomplete_answers: Control the default behaviour of  filtering incomplete answers when browsing or analyzing responses. For a discussion on incomplete Responses see Browsing survey results. Since these records can corrupt the statistics, an option is given to switch this filter on or off in several GUI forms. This parameter config.php is just the default state for the incomplete answer filter. The following options are available:
    • show: Show both complete and incomplete answers
    • filter: Show only complete answers
    • incomplete: Show only incomplete answers
  • $stripQueryFromRefurl: This setting determine if the referrer URL saves parameter or not. Default value is "false" (in this case referrer URL saves all parameter). Alternatively this value can be set to "true" and the parameter part of the referrer URL will be removed.
  • $showaggregateddata: (>=1.8) When activated there are additional values like arithmetic mean and standard deviation at statistics. Furthermore data is aggregated to get a faster overview e.g. results of scale 1+2 and 4+5 are added to have a general ranking like "good" (1/2), "average" (3) and "bad" (4/5). This only affects question types "A" (5 point array) and "5" (5 point choice).
  • PDF Export Settings: (>1.85) This feature activates PDF export for printable survey and Print Answers. The PDF export is totally experimental. The output is mostly ugly. At this point no support can be given - if you want to help to fix it please get in touch with us.
    • $usepdfexport: Set 0 to disable; 1 to enable
    • $pdfdefaultfont: Default font for the pdf Export
    • $pdffontsize: Fontsize for normal text; Surveytitle is +4; grouptitle is +2
    • $notsupportlanguages = array('zh-Hant-TW','zh-Hant-HK','zh-Hans','ja','th');
    • $pdforientation: Set L for Landscape or P for portrait format

LDAP settings

As this is an extensive topic we have moved LDAP settings to another page.

Authentication

Delegate Authentication to the Webserver

System Administrators may want to have their survey administrators authenticated against a central authentication system (Active Directory, openLdap, Radius, ...) rather than using the internal LimeSurvey database. An easy way to do this is to setup your Webserver software to use this external authentication system, and then ask LimeSurvey to trust the user identity reported by the webserver. In order to enable this feature you have to:

  • set $useWebserverAuth to true in config.php
  • enable authentication at the webserver side

Please note that:

  • LimeSurvey will then bypass its own authentication process (by using the login name reported by the webserver without asking for a password)
  • this can only replace the LimeSurvey GUI authentication system, not the survey invitation system (participant interface)

Authentication Delegation with no automatic user import

Please note however than by default Authentication Delegation doesn't bypass the LimeSurvey authorization system: this means that, even if you don't have to manage passwords in LimeSurvey, you still need to define the users in the LimeSurvey database and assign them the correct set of rights in order to let them access survey resources.

A user is then granted access to LimeSurvey if and only if:

  • he has been authenticated to the webserver
  • his login name is defined as a user in the LimeSurvey user database (the user is then granted the privileges of the user defined in the LimeSurvey user database).

Authentication Delegation with automatic user import

When managing huge user database, it is sometimes easier to auto-import user in the LimeSurvey database.

  • $WebserverAuth_autocreateUser: if set to true LimeSurvey will try to autoimport users authenticated by the webserver but not already in its users' DB
  • $WebserverAuth_autouserprofile: an array describing the default profile that will be assigned to the user (including fake First and Last name, email, privileges)

If you want to customize the user profile so that it matches the logged-in user, you'll have to develop a simple function called hook_get_autouserprofile: with this function you can retrieve from a central User account database (for instance an LDAP directory), the true First&Last; names and email of a particular user. You can even customize his privileges on the system based on his groups on the external DB.

The hook_get_autouserprofile function takes the user login name as the only argument and can return:

  • False or an empty array: in this case the user is denied access to LimeSurvey
  • an array containing all common userprofile entries as described in the  $WebserverAuth_autouserprofile

function hook_get_autouserprofile($user_name)

{

     // Retrieve user's data from your database backend (for instance LDAP) here

     ... get $user_name_from_backend

     ... get $user_email_from_backend

     ... get $user_lang_from_backend

     ... from groups defined in your backend set $user_admin_status_frombackend_0_or_1

     return Array(

                     'full_name' => "$user_name_from_backend",

                     'email' => "$user_email_from_backend",

                     'lang' => '$user_lang_from_backend',

                     'htmleditormode' => 'inline',

                     'templatelist' => 'default,basic,MyOrgTemplate',

                     'create_survey' => 1,

                     'create_user' => 0,

                     'delete_user' => 0,

                     'superadmin' => $user_admin_status_frombackend_0_or_1,

                     'configurator' =>0,

                     'manage_template' => 0,

                     'manage_label' => 0);

}

     // If user should be denied access, return an empty array

     // return Array();

User name mapping

In case some users have an external username that is different from their LimeSurvey username, you may find usefull to use a username mapping. This is done in LimeSurvey by using the $userArrayMap parameter. For instance imagine you don't have an 'admin' username defined in your external authentication database. Then in order to login to LimeSurvey as admin, you'll have to map your external username let's call it 'myname' to the admin login name ine LimeSurvey. The corresponding setup is :

 $userArrayMap = Array ('myname' => 'admin');

After a successful authentication with the 'myname' login and password to the webserver, you'll be directly authorized to use LimeSurvey as the 'admin' user.

This obviously has serious security implications, so use it with care, and please protect your config.php from write access by the Webserver.

Use one time passwords

(since 1.81)

Since version 1.81 the user can call the limesurvey login at /limesurvey/admin and pass username and a one time password which was previously written into the users table (column one_time_pw) by an external application.

This setting has to be turned on ($use_one_time_passwords = true;) to enable the usage of one time passwords (default = off/false). More information can be found at "Manage Users".

Security settings

Survey Preview (inactive survey) protection

By default, preview of inactive survey is now restricted to authenticated users only. This is set by the parameter:

  • $surveyPreview_require_Auth: true by default

If you set this to false any person can test your survey using the survey URL - without logging in to teh administration and without having to activate the survey first.

Filtering dangerous HTML tags in survey objects

By default you survey manager will not be authorized to use dangerous HTML tags in their survey/group/question/labels texts (for instance JavaScript code). This is intended to prevent a survey operator to add malicious script in order to have a true admin raise his permissions on the system. This is set by the following parameter:

  • $filterxsshtml: set to true by default

Restrict user view of other users

By default non admin users defined in the LimeSurvey management interface will only be able to see other users if they belong to at least one group this user belongs to. This is set by the following parameter:

  • usercontrolSameGroupPolicy :  set to true by default

Paramètres de répertoires avancés

Les paramètres listés ci-dessous n'empêcheront pas LimeSurvey de fonctionner si vous avez fait une installation standard (respect des différents dossiers).

Ces paramêtres ne sont modifiables que dans config-default.php, faite une sauvegarde si vous modifiez queluechose.

Ne modifiez ces valeurs que si vous avez renommé certains dossiers de LimeSurvey.php.

  • $homeurl : doit correspondre à l'URL qui permet d'accéder aux scripts d'administration. Les fichiers de ces scripts se trouvent dans le dossier /limesurvey/admin. il faut indiquer ici l'URL qui permet d'y accéder depuis le web, par exemple : "http://www.mydomain.com/limesurvey/html/admin". N'ajoutez pas de slash ("/") à la fin de cette adresse. Le paramétrage par défaut de LimeSurvey essaie de trouver automatiquement le nom de votre serveur en utilisant la variable PHP {$_SERVER['SERVER_NAME']}. La plupart du temps, vous pourrez laisser ainsi et ne modifier que le reste de l'adresse pour qu'elle corresponde bien au dossier d'installation des scripts d'administration de limeSurvey.
  • $publicurl : doit correspondre à l'URL qui permet d'accéder aux scripts de la "partie publique" de LimeSurvey. Ces scripts sont ceux situés dans le dossier limesurvey (à adapter en fonction du dossier dans lequel vous avez installé les fichiers de LimeSurvey)
  • $tempurl : doit correspondre à l'URL qui permet d'accéder au dossier temporaire de LimeSurvey (généralement "/limesurvey/tmp" mais cela peut être changé). Ce dossier doit avoir des permissions qui permettent au propriétaire du processus du serveur web d'écrire et de lire (chmod 755)
  • imagefiles : par défaut, LimeSurvey recherche les différentes images dans le dossier "/limesurvey/admin/images". Si pour une raison ou une autre vous souhaitez changer cet emplacement, il faudra adapter ce paramètre.
  • $homedir : doit correspondre à l'emplacement physique des fichiers des scripts d'administration de LimeSurvey. N'ajoutez pas de slash à la fin de ce chemin. Le paramétrage par défaut de LimeSurvey essaie de trouver automatiquement le chemin de la racine de vos documents en utilisant la variable PHP {$_SERVER['DOCUMENT_ROOT']}. La plupart du temps, vous pourrez laisser ainsi et ne modifier que le reste de l'adresse pour qu'elle corresponde bien au dossier d'installation des scripts d'administration de LimeSurvey.
  • $publicdir : doit correspondre à l'emplacement physique du dossier des scripts "publics" de LimeSurvey.
  • $tempdir : doit correspondre à l'emplacement physique du dossier /limesurvey/tmp/ afin que le programme puisse lire et écrire des fichiers.
  • $fckeditordir: url de fckeditor (utilisé pour l'editeur html)
  • $fckeditexpandtoolbar: defini sir la barre d'outil de fckeditor est ouverte ou fermée (fermée par défaut)
  • $pdfexportdir: Répertoire avec [www.tcpdf.org/|l'extensions TCPDF] tcpdf.php
  • $pdffonts: Répertoire des polices pour TCPDF, attention de n'utiliser que des polices pour lequel vous avez les droits.