Differences

This shows you the differences between two versions of the page.

Link to this comparison view

documentation:2.1:applications:limesurvey [2017/11/23 16:45]
documentation:2.1:applications:limesurvey [2017/11/23 16:45] (current)
Line 1: Line 1:
 +====== LimeSurvey ======
  
 +{{  :​applications:​limesurvey_logo.png ​ |}}
 +
 +===== Presentation =====
 +
 +[[http://​www.limesurvey.org|LimeSurvey]] is a web survey software written in PHP. 
 +
 +===== HTTP Headers =====
 +
 +LimeSurvey has a webserver authentication mode that allows one to integrate it directly into LemonLDAP::​NG.
 +
 +To have a stronger integration,​ we will configure LimeSurvey to autocreate unknown users and use HTTP headers to fill name and mail.
 +
 +<​note>​We suppose that LimeSurvey is installed in /​var/​www/​html/​limesurvey</​note>​
 +
 +==== LimeSurvey configuration ====
 +
 +In Administration panel, go in Configuration > Parameters > Extensions manager. Select the WebServer module and configure it.
 +
 +{{ :​applications:​screenshot_limesurvey_configuration.png?​nolink |
 +}}
 +
 +This is enough for the authentication part.
 +
 +<note tip>
 +If you are blocked, you can deactivate the plugin with this request in database:
 +<​code>​
 +update lime_plugins SET active=0 where name="​Authwebserver";​
 +</​code>​
 +</​note>​
 +
 +To configure account autocreation,​ you need to edit application/​config/​config.php:​
 +The configuration is done in config.php:
 +<​code>​
 +vi /​var/​www/​html/​limesurvey/​application/​config/​config.php
 +</​code>​
 +<file php>
 +        '​config'​=>​array(
 +        // debug: Set this to 1 if you are looking for errors. If you still get no errors after enabling this
 +        // then please check your error-logs - either in your hosting provider admin panel or in some /logs directory
 +        // on your webspace.
 +        // LimeSurvey developers: Set this to 2 to additionally display STRICT PHP error messages and get full access to standard templates
 +                '​debug'​=>​0,​
 +                '​debugsql'​=>​0,​ // Set this to 1 to enanble sql logging, only active when debug = 2
 +                // Update default LimeSurvey config here
 +                '​auth_webserver_autocreate_user'​ => true,
 +                '​auth_webserver_autocreate_profile'​ => Array('​full_name'​ => $_SERVER['​HTTP_AUTH_CN'​],'​email'​ => $_SERVER['​HTTP_AUTH_MAIL'​],'​lang'​=>'​en'​),​
 +                '​auth_webserver_autocreate_permissions'​ => Array('​surveys'​ => array('​create'​=>​true,'​read'​=>​false,'​update'​=>​false,'​delete'​=>​false)),​
 +                )
 +</​file>​
 +
 +See also https://​manual.limesurvey.org/​Optional_settings#​Authentication_delegation_with_automatic_user_import
 +
 +==== LimeSurvey virtual host  ====
 +
 +Configure LimeSurvey virtual host like other [[..configvhost|protected virtual host]].
 +
 +==== LimeSurvey virtual host in Manager ====
 +
 +Go to the Manager and [[..configvhost#​lemonldapng_configuration|create a new virtual host]] for LimeSurvey.
 +
 +=== Headers ===
 +
 +^  Header name  ^  Description ​ ^
 +|  Auth-User ​ |  user login  |
 +|  Auth-Cn ​ |  user full name  |
 +|  Auth-Mail ​ |  user email  |
 +
 +=== Rules ===
 +
 +^  Rule name  ^  Expression ​ ^  Description ​ ^
 +|  Logout ​ |  /​sa/​logout$ ​ |  Logout rule (for example logout_app_sso) ​ |
 +|  Admin   ​| ​ <​html>​^/​(index\.php/​)?​admin</​html> ​ |  Allow only admin and superadmin users  |
 +|  Default ​ |  default ​ |  Allow only users with a LimeSurvey role  |
 +
 +<note tip>
 +You can set the default access to:
 +   * **accept**: all authenticated users will access surveys
 +   * **unprotect**:​ no authentication will be asked to access surveys ​
 +</​note>​