Actions

Optionale Einstellungen

From LimeSurvey Manual

Revision as of 20:45, 13 April 2013 by C schmitz (talk | contribs) (Created page with "=Entwicklung= *'''$debug:''' Mit diesem Wert kann festgelegt werden, dass alle PHP-Fehler angezeigt werden (E_ALL). Das bedeutet, dass wirkliche jede kleine Notiz, Warnung und...")

Hinweis

Diese optionalen Einstellungen können nur in der "config-defaults.php" einer Standard-Installation gefunden werden - einige von ihnen werden nur für die erste Installation genutzt und in den globalen Einstellungen überschrieben. Zum Ändern der Optionen sollte diese nicht in der "config-defaults.php", sondern in einer Kopie dieser namens "config.php" geändert werden! Alle Einstellungen der "config.php" überschreiben die Standard-Werte der "config-defaults.php" und ab der Version 1.87 werden einige dieser Einstellungen wiederum in den globale Einstellungen Überschrieben. Durch das Beachten dieses Hinweises ist es viel einfacher und schneller später auf eine neue Version zu updaten!

Datenbankeinstellungen

  • $databaseport: Der Port des DB-Servers. Meistens stimmt "default" - sollte der Server aber nicht den normalen Port benutzt, muss die Variable einfach zu dem entsprechenden Port geändert werden.
  • $databasetabletype: Die MySQL Storage-Energie, welche für neue Umfrage-Antworten-Tabellen und Token-Tabellen benutzt werden soll. 'MyISAM' ist die empfohlene Einstellung und die Einzige für die Funktionstüchtigkeit garantiert wird.
  • $databasepersistent: Zum aktivieren persistenter Datenbankverbindungen muss dies auf 'true' gesetzt werden - Für manche DB-Treiber schneller. Normal ist 'false'.

Generelle Einstellungen

  • $sitename: Gibt der Umfragen-Seite einen Namen. Dieser Name wird in der Umfragenliste und im Kopf des Administrationsbereiches erscheinen. (ab 1.87 wird die Einstellung durch die globalen Einstellungen überschrieben)
  • $siteadminemail: Die Emailadresse des Administrators, welche für Systemnachrichten und Kontaktmöglichkeiten genutzt wird. (ab 1.87 wird die Einstellung durch die globalen Einstellungen überschrieben)
  • $siteadminbounce: Die Mailadresse wohin zurückgeschickte Mails hinkommen. (ab 1.87 wird die Einstellung durch die globalen Einstellungen überschrieben)
  • $siteadminname: Der richtige Name des Seitenadmins. (ab 1.87 wird die Einstellung durch die globalen Einstellungen überschrieben)

Sicherheit

  • $surveyPreview_require_Auth: Standard: 'true'. Wenn 'false' kann jede Person jede Umfrage durch Eingabe der Umfrage URL testen - ohne Login als Admin oder vorausgegangener Aktivierung der Umfrage. (ab 1.87 wird die Einstellung durch die globalen Einstellungen überschrieben)
  • $usercontrolSameGroupPolicy: Standard: 'true', nicht-Admis können im LimeSurvey Management nur User sehen, welche zu einer Gruppe gehören, in der die User selbst sind.
  • $filterxsshtml: Diese Einstellung aktiviert die Filterung von HTML-Tags in Umfrage, Gruppen, Fragen und Antworten Texten im Admin-Center. Nur auf 'false' lassen, wenn den Usern, welche Umfragen erstellen können, absolut vertraut wird und ihnen erlaubt werden soll, JavaScript, Flash, usw. zu benutzen. (ab 1.87 wird die Einstellung durch die globalen Einstellungen überschrieben)
  • $demoModeOnly: Wenn diese Option aktiviert ist, geht LimeSurvey in den Demo-Mode. Der Demo-Modus ändert folgendes::
    • Man kann Admin und User Details und Passwörter nicht mehr bearbeiten
    • Im Template-Editor können keine neuen Dateien hochgeladen werden
    • Es werden keine Mail Einladungen und Erinnerungen mehr gesendet
    • Der DB-Dump wird deaktiviert
    • Folgende globale Einstellungen können nicht mehr gespeichert werden: Seitenname, Standard-Sprache, Standard-HTML-Editor Modus und XSS Filter

Ressourcen

  • $memorylimit: Wie viel Speicher LimeSurvey benutzen kann. Minimum: '16M' (M=mb). Bei Problemen wie Time-outs oder Problemen beim Export sollte das Limit auf '128M' oder '256M' erhöht werden.
  • $sessionlifetime: Mit diesem Wert kann bestimmt werden, wie lange (in Sekunden) Umfrageteilnehmer inaktiv auf einer Seite verweilen dürfen, bevor die Daten auf der entsprechenden Seite wegen Zeitüberschreitung verloren gehen. (Standardwert: 3600) ab 1.87 wird die Einstellung durch die globalen Einstellungen

Please mind that such local settings by an application can always be overruled by global server settings. To increase the memory limit to 128M you could also try adding:

  • memory_limit = 128M to your server's main php.ini file (recommended, if you have access)
  • memory_limit = 128M to a php.ini file in the LimeSurvey root
  • php_value memory_limit 128M in a .htaccess file in the LimeSurvey root

Erscheinungsbild

  • $lwcdropdowns: Dieser Wert kann auf "L" oder "R" gesetzt werden. "R" hat zur Folge, dass beim Fragetyp "Liste mit Kommentar" die Fragen mit Radio-Buttons dargestellt werden. Dagegen werden bei "L" die Fragen in einer Dropdown-Box dargestellt. (Veraltet in 2.0)
  • $dropdownthreshold: Wenn bei "$lwcdropdowns" als Einstellung "R" gewählt ist, dann kann hier der Maximalwert festgelegt werden, bevor automatisch von Radio-Buttons auf Dropdown-Box umgestellt wird. Da eine größere Anzahl an Radio-Buttons sehr schnell unübersichtlich wird, sollen hierdurch lange Listen für den Umfrageteilnehmer leichter zu verarbeiten sein. Deshalb sollte der Wert nicht allzu hoch gewählt werden. (Standard = 25)
  • $repeatheadings: Beim Verwenden des Fragetyps Feld (Flexible Beschriftung) wird m meist eine sehr große Anzahl an Antworten vorgeben, welche alle auf einer Seite dargestellt werden. Mit diesem Wert kann bestimmt werden, nach wie vielen Antworten wieder die Spalten-Überschrift angezeigt wird. Ein guter Wert, welcher sich hier eignet ist 15. Sollte keine Wiederholung der Spalten-Überschrift gewünscht sein, muss der Wert, wie er auch standardmäßig ist, auf 0 gesetzt werden.
  • $minrepeatheadings: Dieser Wert bestimmt bei Verwendung des Fragetyp Feld (Flexible Beschriftung) die Mindestanzahl von verbleibenden Fragen bevor die Spalten-Überschrift wiederholt wird.
  • $addTitleToLinks: Wenn diese Option auf 'true' gesetzt ist, wird LimeSurvey ein 'title' HTML Attribut in alle Links, die im Menü benutzt werden, setzen. Screenreader können dadurch das Menü besser analysieren. Nur aktiveren, wenn tatsächlich Screenreader benutzt werden, da die Anzeige mit Tooltips überlappt.
  • $defaulttemplate: Das Standard-Template für öffentliche Listen der Umfragen. (ab 1.87 wird die Einstellung durch die globalen Einstellungen überschrieben)
  • $defaulthtmleditormode: Standard Modus für den integrierten HTML-Editor (ab 1.87 wird die Einstellung durch die globalen Einstellungen überschrieben). Gültige Einstellungsmöglichkeiten:
    • inline: Inline Ersetzung der Felder durch einen HTML-Editor Langsam, aber Benutzerfreundlich (Standard)
    • popup: Ein Icon, welches ein Popup mit dem HTML-Editor öffnet. Schneller, aber HTML-Code wird im Formular angezeigt.
    • none: Kein HTML-Editor.

Sprache und Zeit

  • $defaultlang: Mit diesem Wert bestimmt man die Standardsprache, welche im Administratoren-Skript und als Standardspracheinstellung für öffentliche Umfrage verwendet wird. Über das Administratoren-Skript kann dieser Wert für öffentliche Umfragen für jede Umfrage einzeln festgelegt werden. (ab 1.87 wird die Einstellung durch die globalen Einstellungen überschrieben)
  • $timeadjust: Sollte der Webserver in einer anderen Zeitzone beheimatet sein, als Umfrage durchgeführt wird, kann hier die Differenz Server und der Umfragen-Zeitzone eingetragen werden. Beispiel: Umfrage in Australien und Webserver in den USA, dann ist der Webserver 14 Stunden hinter der Uhrzeit vor Ort. In diesem Fall muss hier der Wert "14" eingetragen werden. Dann werden 14 Stunden zur Uhrzeit des Webservers addiert. Diese Einstellung ist besonders bei Umfragen in Kombination mit Zeit- und Datumsstempel wichtig. (ab 1.87 wird die Einstellung durch die globalen Einstellungen überschrieben)
  • $modrewrite: Wenn auf 1 gesetzt, wird das "schöne-URL Feature" aktiviert (Beispiel: http://survey.example.com/123456/lang-fr/tk-sdlfkjozeiru statt http://survey.example.com/index.php?sid=123456⟨=fr&token;=sdlfkjozeiru). Vor der Aktivierung muss== die "htaccess.txt" in ".htaccess" umbenannt werden. Dazu ist ein Apache Web-Server mit korrekt installiertem mod_rewrite-Module Pflicht!

Umfrageverhalten

  • $allowmandbackwards: Ein Wert von "1" erlaubt es Umfrageteilnehmern zu einer früheren Frage zurückzukehren, auch wenn die Teilnehmer eine Frage, welche unbedingt beantwortet werden muss ausgelassen haben.  Bei einem Wert von "0" muss diese Frage beantwortet werden, ansonsten kann man nicht zur früheren Frage zurückkehren.
  • $deletenonvalues: Dieser Wert bestimmt, ob die Antwort einer Frage, welche durch eine Änderung einer vorhergehenden Frage nicht beantwortet werden muss gespeichert werden soll oder nicht. Was damit gemeint wird, kann man wohl am Besten mit einem Beispiel erklären: Bei einem Wert von "0", wird die Antwort auf Frage "B", welche nur gezeigt wird, wenn bei Frage "A" eine bestimme Antwort gewählt wird gespeichert, auch wenn im Nachhinein die Antwort auf Frage "A" geändert wird und Frage "B" dann gar nicht mehr angezeigt wird. Einige Benutzer wünschen diese Einstellung, nach dem Motto, man kann gar nicht genug Informationen sammeln, andere wiederum wollen nur Antworten haben, welche bei einem korrekten und logischen Fragebogendurchlauf gesammelt werden. Bei einem Wert von "1" werden die redundanten Informationen nicht gespeichert.
  • $shownoanswer: Mit einem Wert von "0" kann man bei Frage, welche nicht beantwortet werden müssen die Antwortkategorie "keine Antwort" global abschalten. Bei einem Wert von "1" wird bei editierbaren Antwortkategorien (Liste, Feld), welche nicht verpflichtend beantwortet werden müssen automatisch die Kategorie "keine Antwort" hinzugefügt. (ab 1.87 wird die Einstellung durch die globalen Einstellungen überschrieben)
  • $printanswershonorsconditions: Diese Einstellung legt fest, ob beim "Fragen drucken"-Feature die Fragen ausgeblendet werden, die wegen vom Nutzer gesetzter Bedingungen nicht angezeigt wurden. (Standard: 1 = zeige durch Bedingungen ausgeblendete Fragen nicht an)
  • $hide_groupdescr_allinone: Diese Einstellung ist relevant für alle 'all-in-one' Umfragen, welche Bedingungen benutzen, welche in LimeSurvey 1.85RC3 eingeführt wurden. Wenn aktiviert, werden der Gruppenname und die Beschreibung von allen Fragen der Gruppe versteckt. (Standard: true (Verstecke Gruppennamen und Beschreibungen wenn alle Bedingungen in der Gruppe durch Bedingungen versteckt werden))
  • $showpopups: Zeige Popups, wenn Fragen nicht richtig beantwortet wurden. 1 = Popup (Standard), 0 = Nachricht stattdessen auf der Seite anzeigen.

Entwicklung

  • $debug: Mit diesem Wert kann festgelegt werden, dass alle PHP-Fehler angezeigt werden (E_ALL). Das bedeutet, dass wirkliche jede kleine Notiz, Warnung und Fehler im Skript berichtet wird. Diese Einstellung sollte nur aktiviert werden (=1), wenn einem Fehler im Skript auf den Grund gegangen werden soll. Programmierer sollten ihn auf 2 setzen. Des Weiteren sollte dieser Wert nicht aktiviert werden, wenn LimeSurvey zu produktiven Zwecken eingesetzt wird. (Standardeinstellung: 0)

Email Settings

Note: Starting with 1.87 the settings in this section are overridden in the Global settings dialog.

  • $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
  • strip_query_from_referer_url: 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
  • $showsgqacode: (>1.91) This setting is used at the printable survey feature {IMG(attId="78",height="16",width="16")} and defaults to false. If you set showsgqacode = true; the IDs for each question - and answer if applicable - will be shown; these IDs match the column heading at the Lime_survey_12345 table which holds the answer data for a certain survey. These Ids can be used for a code book for manual database queries.
  • {IMG(attId="79",height="200",width="400")}

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 auth_webserver 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.

  • auth_webserver_autocreate_user: if set to true LimeSurvey will try to autoimport users authenticated by the webserver but not already in its users' DB
  • auth_webserver_autocreate_profile: 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_auth_webserver_profile 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_auth_webserver_profile($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();

An example of using a hook with Atlassian's Crowd as a backend is available here.

User name mapping

In case some users have an external user name that is different from their LimeSurvey user name, you may find useful to use a user name mapping. This is done in LimeSurvey by using the auth_webserver_user_map 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 :

$config['auth_webserver_user_map'] = 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 web server.

Use one time passwords

(since 1.81)

A 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 = false). More information can be found at "Manage Users".

Advanced Path Settings

If possible do no touch these settings. Additionally these settings can only be adjusted on config-defaults.php.

  • $homeurl: This should be set to the URL location of your administration scripts. These are the scripts in the /limesurvey/admin folder. This should be set to the WEB URL location - for example "http://www.mydomain.com/limesurvey/html/admin". Don't add a trailing slash to this entry. The default setting in config.php attempts to detect the name of your server automatically using a php variable setting - {$_SERVER['SERVER_NAME']}. In most cases you can leave this and just modify the remainder of this string to match the directory name you have put the LimeSurvey scripts in.
  • $publicurl: This should be set to the URL location of your 'public scripts'. The public scripts are those located in the "limesurvey" folder (or whatever name you gave to the directory that all the other scripts and directories are kept in).
  • $tempurl: This should be set to the URL location of your "/limesurvey/tmp" directory - or a directory which you would like LimeSurvey to use to store temporary files, including uploads. This directory must be set to read & write for your webserver (e.g. chmod 755)
  • $imagefiles: By default you should leave this pointing to the URL location of /limesurvey/admin/images - where the images are installed initially. You may, however, prefer to move these images to another location and if so point this to the URL directory where they are stored.
  • $homedir: This should be set to the physical disk location of your administration scripts - for example "/home/usr/htdocs/limesurvey/admin". Don't add a trailing slash to this entry. The default setting in config.php attempts to detect the default root path of all your documents using the php variable setting - {$_SERVER['DOCUMENT_ROOT']}. In most cases you can leave this and just modify the remainder of this string to match the directory name you have put the LimeSurvey scripts in.
  • $publicdir: This should be set to the physical disk location of your 'public scripts'.
  • $tempdir: This should be set to the physical disk location of your /limesurvey/tmp directory so that the script can read and write files.
  • $fckeditordir: url of the fckeditor script
  • $fckeditexpandtoolbar: defines if the FCKeditor toolbar should be opened by default
  • $pdfexportdir: Directory with the tcpdf.php extensiontcpdf.php
  • $pdffonts: Directory for the TCPDF fonts