Actions

Optionele instellingen

From LimeSurvey Manual

Revision as of 09:39, 17 May 2013 by Rikthoff (talk | contribs)

Opmerking

Deze optionele instellingen zijn te vinden in het bestand /application/config/config-defaults.php van een standaard installatie. Sommige van deze instellingen worden gebruikt tijdens de installatie, en worden overschreven door de waarden in Globale instellingen. Als je deze instellingen wilt wijzigen, wijzig ze dan niet dit bestand, maar kopieër de instellingen naar /application/config/config.php en wijzig het daar. Alle instellingen in dit bestand gaan boven die in config-defaults.php. Sinds versie 1.87 worden de waarden uit config-defaults.php in de functie Globale instellingen niet meer gebruikt. Door deze werkwijze is het dus gemakkelijker om een nieuwe versie te installeren!

Algemene instellingen

  • sitename: Geeft je enqûetesite een naam. De naam verschijnt in de lijst met enqûetes en in het administratiepaneel. (sinds 1.87 wordt deze waarde overschreven met de waarde uit het Globale instellingen veld)
  • siteadminemail: Dit is het standaard emailadres van de websitebeheerder, waarop meldingen en contactverzoeken worden verstuurd. (sinds 1.87 wordt deze waarde overschreven met de waarden uit het Globale instellingen veld)
  • siteadminbounce: Dit is het emailadres waarnaar niet afgeleverde emails worden verstuurd. (sinds 1.87 wordt deze waarde overschreven met de waarden uit het Globale instellingen veld)
  • siteadminname: De naam van de websitebeheerder. (sinds 1.87 wordt deze waarde overschreven met de waarden uit het Globale instellingen veld)

Beveiliging

  • surveyPreview_require_Auth: standaard "aan"(true). Zet deze "uit"(false) als iedereen de enqûete kan testen, zonder in het beheergedeelte in te loggen, en zonder dat de enqûete actief is. (sinds 1.87 wordt deze waarde overschreven met de waarden uit het Globale instellingen veld)
  • usercontrolSameGroupPolicy: Standaard "aan"(true). Niet-beheerders (opgenomen in de LimeSurvey beheerinterface) zullen alleen andere gebruikers kunnen zien als ze beiden aan minstens één dezelfde groep gekoppeld zijn.
  • filterxsshtml: Als deze instelling "aan"(true) staat zal LimeSurvey enqûetes, vragen, antwoorden en groepen scannen op verdachte html-tags. Zet deze instelling alleen "uit"(false) als je je gebruikers vertrouwd met javascript, flashfilmpjes en dergelijke (sinds 1.87 wordt deze waarde overschreven met de waarden uit het Globale instellingen veld)
  • demoModeOnly: Als deze instelling "aan"(true) staat zal LimeSurvey in demo-modus werken. Dat betekend:
    • Het is niet mogelijk om het beheeraccount te wijzigen
    • Het is niet mogelijk om bestanden te uploaden in het templatebeheer
    • Het is niet mogelijk om uitnodigingen en herinneringen via email te verzenden
    • Het is niet mogelijk om een database te extraheren
    • Het is niet mogelijk om de volgende zaken aan te popassen: sitenaam, standaard taal, standaard html-editor modus, XSS filter.

Bronbeheer

  • sessionlifetime: geeft aan hoe lang de sessie van een enqûete geldig is. Standaard 3600 seconden. (sinds 1.87 wordt deze waarde overschreven met de waarden uit het Globale instellingen veld)
  • memorylimit: geeft aan hoeveel geheugen LimeSurvey mag gebruiken. 32 (Megabyte) is het minimum om goed te kunnen werken. Mocht je timeouts (of andere problemen) hebben bij het genereren van statistieken, overweeg dan om 128 of zelfs 256 te gebruiken.

Denk eraan dat deze lokale instelling altijd genegeerd kan worden door de globale serverinstellingen. Mocht het dus niet werken, probeer dan:

  • memory_limit = 128M te zetten in het php.ini-bestand op de server (als dat kan en mag)
  • memory_limit = 128M te zetten in een php.ini-bestand in de directory waar LimeSurvey staat
  • php_value memory_limit 128M te zetten in een .htaccess-bestand in de directory waar LimeSurvey staat

Uiterlijk

  • $lwcdropdowns: mogelijke waarden zijn "L" of "R". Zet deze op "R" om 'Lijst met commentaar'-vragen als radioknoppen te tonen, of op "L" om deze vraag als een dropdown-selectielijst. (uitgefaseerd in 2.0)
  • $dropdownthreshold: als je $dropdowns op "R" hebt gezet, is dit het maximale aantal opties dat getoond wordt als radioknoppen, voordat LimeSurvey deze vervangt door een dropdown-selectielijst.
  • $repeatheadings: standaard '0' (niet herhalen). Zet deze op een waarde om bij vragen van het type 'array (flexible)' de kop opnieuw te tonen na dit aantal antwoorden. Een redelijk geschikte waarde is 15.
  • $addTitleToLinks: zet deze "aan"(true) als je wilt dat LimeSurvey de 'title'-tag aan ieder element in het menu. Dit helpt een schermvoorlezer de menu's te herkennen. Dit betekent echter dat de tooltips in een menu niet getoond worden.
  • $defaulttemplate: deze instelling bepaald het standaardthema dat gebruikt wordt voor het tonen van de 'publieke lijst' van enqûetes. (sinds 1.87 wordt deze waarde overschreven met de waarden uit het Globale instellingen veld)
  • $defaulthtmleditormode: bepaalt de standaardmodus waarin de HTML editor opstart. Geldige waarden zijn inline (standaard), popup en none. (sinds 1.87 wordt deze waarde overschreven met de waarden uit het Globale instellingen veld).
    • inline: inline vervanging van velden door een HTML editor. Langzaam, maar makkelijk en gebruikersvriendelijk
    • popup: voegt een icoon toe, die bij selectie de HTML Editor in een popup vertoond. Sneller, maar de html-code is zichtbaar
    • none: geen HTML Editor gebruiken

Taal & Tijd

  • $defaultlang: Zet deze op de standaardtaal waarin het beheerpaneel, en de openbare enqûetes getoond worden. Binnen een enqûete kun je zelf een afwijkende taal gebruiken (sinds 1.87 wordt deze waarde overschreven met de waarden uit het Globale instellingen veld)*$timeadjust: Als de webserver in een andere tijdzone staat dan waar jouw enqûete wordt gebruikt, zet hier dan de afwijking in uren. Dit is met name van belang voor enqûetes die tijdgecodeerd worden. (sinds 1.87 wordt deze waarde overschreven met de waarden uit het Globale instellingen veld)
  • $modrewrite: (niet geldig vanaf versie 2.0) Zet deze op "1" om fancy URL's te gebruiken. VErgeet hierbij niet de "htaccess.txt" in de directory te hernoemen naar ".htaccess". Ook moet de mod_rewrite module in Apache webserver geactiveerd zijn.

Gedrag

  • $allowmandbackwards: Zet deze op '1' om deelnemers toe te staan terug te gaan naar een vorige vraag, ook al is de huidige vraag een verplichte. '0' betekent dat de deelnemer eerst de verplichte vraag moet beantwoorden voordat ze terug kunnen gaan.
  • $deletenonvalues: Wees hier voorzichtig mee. Standaard (waarde '1') worden antwoorden die niet terzake doen opgeslagen met waarde 'NULL'. Een voorbeeld is dat een deelnemer de vraag 'geslacht?' beantwoord met 'vrouw'. Vervolgens beantwoordt hij een aantal vrouw-specifieke vragen, realiseert zich dat hij een fout gemaakt heeft, keert terug naar de geslacht-vraag, en kiest de optie 'man'. Nu zijn de antwoorden op de vrouw-vragen irrevelant, want hij krijgt (en beantwoordt) de man-specifieke vragen. Als je toch wilt dat de irrelevante antwoorden bewaard worden, zet dan deze instelling op '0'.
  • $shownoanswer: Als de antwoorden op een vraag van een selectielijst (radio/select) invulbaar zijn (List of Array-vragen) en deze instelling staat op '1', wordt er een optie toegevoegd met de waarde 'N/A'. Zo kan de gebruiker kiezen om de vraag niet te beantwoorden. '0' laat de gebruiker in ieder geval iets intypen.(sinds 1.87 wordt deze waarde overschreven met de waarden uit het Globale instellingen veld)
  • $printanswershonorsconditions: Deze instelling bepaalt of antwoorden op vragen die niet gesteld zijn vanwege één of meerdere besluit(en) toch getoond worden. '1' toont deze antwoorden.
  • $hide_groupdescr_allinone: Deze instelling wordt gebruikt door enqûetes met condities. Zet deze op de waarde "aan"(true) als je wilt dat de groepnaam en beschrijving ook verborgen worden als alle condities in de groep ook verborgen zijn.
  • $showpopups: Deze instellign bepaald of er popups getoond worden als vragen niet of niet correct beantwoord zijn. Waarde '1' (standaard) betekent dat popups getoond worden, '0' betekent dat de melding op de pagina zelf getoond wordt, en '-1' betekent dat er geen melding gedaan wordt. Gebruikers zien echter nog steeds de indicatie bij de vragen die verplicht beantwoord moeten worden.  

Ontwikkeling

  • $debug: Met deze instelling zet je de PHP-errormededelingen op niveau E_ALL. Dit betekent dat elke afwijking op een script getoond wordt. Zet $debug op '1' als je de applicatie aan het debuggen bent, of '2' als je een ontwikkelaar bent. Laat deze waarde in productieomgeving op (de standaard) '0' staan, anders kunnen hackers mogelijk belangrijke informatie inzien.

Emailinstellingen

Opmerking: Sinds 1.87 worden alle waarden overschreven met de waarden uit het Globale instellingen veld.

  • $emailmethod: Bepaalt via welke methode emailberichten verzonden worden:
    • mail: via de interne PHP mailer
    • sendmail: via sendmail
    • smtp: via smtp-verwijzing. Gebruik deze optie als je LimeSurvey draait op een computer die niet je mailserver is.
  • $emailsmtphost: Als je als mailmethode 'smtp' gekozen hebt, vul hier dan de SMTP-server in. Als je bijvoorbeeld Google-mail gebruikt, vul dan in
 $emailsmtphost = 'smtp.gmail.com:465';
  • $emailsmtpuser: Vul hier de gebruikersnaam voor de SMTP-server in. Als de server geen toegangscontrole heeft, laat het dan leeg
  • $emailsmtppassword: Vul hier het wachtwoord voor de SMTP-server in. Als de server geen toegangscontrole heeft, laat het dan leeg
  • $emailsmtpssl: Vul hier de waarde 'ssl' of 'tls' in om SSL/TLS te gebruiken voor de connectie met de SMTP-server
  • $maxemails: Als je uitnodigingen of herinneringen stuurt aan deelnemers bepaalt deze instelling hoeveel mails er in een batch maximaal verstuurd mogen worden. Als dit getal te hoog staat kan het zijn dat het mailscript in een timeout loopt. Een gemiddelde webserver kan ongeveer 100 mails versturen in de 30 seconden dat een script draait. Krijg je daarbij timeouts, zet dan hier een lager aantal neer.

Statistieken and Respons bekijken

  • usejpgraph: (uitgefaseerd in 1.8) De JPGraph-bibliotheek geeft de mogelijkheid om statistieken in staaf- en taartgrafieken te tonen. Als je een goed geconfigureerde jpgraph hebt geinstalleerd, zet dan deze instelling op "1". Laat 'm anders op "0" staan. Let op: redelijk expirimenteel, verwacht wat vreemde resultaten.
  • jpgraphdir: (uitgefaseerd in 1.8) De fysieke lokatie van de jpgraph bibliotheek.
  • jpgraphfont: (uitgefaseerd in 1.8) Het lettertype dat gebruikt wordt in de grafieken. Een goed werkende instelling is "FF_FONT1".
  • embedded: Als je LimeSurvey wilt integreren in een andere websitepagina, dan kun je hier het versturen van HTML-headers uitzetten. Denk er dan wel aan dat je in de code gaat verwijzen naar de header-verzending van de bovenliggende pagina!
  • filterout_incomplete_answers: Bepaal het standaardgedrag van de respons bij niet compleet gegeven antwoorden. Omdat deze de statistieken kunnen vervuilen, zit er een optie in de interface om deze uit te zetten. Het standaardgedrag kan als volgt ingesteld worden:
    • show: Toon zowel de compleet, als de niet compleet gegeven antwoorden
    • filter: Toon alleen de complete gegeven antwoorden
    • incomplete: Toon alleen de niet compleet gegeven antwoorden
  • 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 instellingen

Gezien de uitgebreidheid van dit onderwerp is deze verplaatst naar deze pagina.

Authenticatie

Delegeren van authenticatie naar de 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