Actions

Optional settings/es: Difference between revisions

From LimeSurvey Manual

(Created page with "=Comportamiento de la Encuesta= *'''$allowmandbackwards:''' Un valor de 1 para esta variable le permitirá a los participantes de la encuesta moverse a una pregunta ante...")
(Created page with "=Desarrollo= *'''$debug:''' Con esta opción puedes ajustar el reporte de errores de PHP a E_ALL. Esto significa que cada pequeño aviso, alerta o error del script...")
Line 61: Line 61:
*'''$showpopups:'''  Muestra ventanas emergentes si no se han contestado preguntas obligatorias o condicionales correctamente. 1=Mostrar ventanas emergentes (por defecto), 0=Mostrar el error en la página.
*'''$showpopups:'''  Muestra ventanas emergentes si no se han contestado preguntas obligatorias o condicionales correctamente. 1=Mostrar ventanas emergentes (por defecto), 0=Mostrar el error en la página.


=Development=
=Desarrollo=
*'''$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)
*'''$debug:''' Con esta opción puedes ajustar el reporte de errores de PHP a E_ALL. Esto significa que cada pequeño aviso, alerta o error del script se mostrará. Esta opción sólo debe ser 1 si estás intentando depurar la aplicación por alguna razón, si eres un desarrollador, debe ser 2. No lo cambies a 1 ni a 2 en la producción, ya que tal vez pueda causar la revelación de rutas. (Por defecto es 0)


= Email Settings=
= Email Settings=

Revision as of 21:01, 13 April 2013

Nota

Estas preferencias opcionales sólo se pueden encontrar en config-defaults.php de una instalación estándar - algunas de ellas sólo se usan en la primera instalación, y son anuladas en las Configuraciones globales. Si quieres cambiar estas preferencias, por favor no las cambies en config-defaults.php, sino copia esa línea en particular a config.php, y cámbiala ahí. Todas las preferencias que están en config.php anulan los valores predeterminados de config-defaults.php, y desde la versión 1.87, algunas de éstas se pueden anular desde el diálogo de Configuraciones globales. ¡Así es mucho más fácil actualizar tu instalación después!

Preferencias específicas de la base de datos

  • $databaseport: Este valor es el puerto usado por tu servidor de base de datos. En la mayoría de los casos, "default" está bien - si tu servidor de base de datos no usa un puerto estándar, sólo cambia el valor al puerto que use.
  • $databasetabletype: El motor de almacenamiento de MySQL que debe usarse cuando se creen tablas de resultados de encuestas y tablas fichas (si se usó mysql). 'MyISAM' es el valor recomendado por defecto, y es el único motor que se garantiza que funcionará.
  • $databasepersistent: Si quieres habilitar conexiones persistentes a la base de datos, debe ser 'true' - esto puede ser más fácil para algunos controladores de bases de datos. El valor por defecto es false.

Configuraciones generales

  • $sitename: Le da un nombre al sitio de la encuesta. Este nombre aparecerá en el resumen de la lista de la encuesta y en el encabezado de administración. (a partir de la versión 1.87 esta configuración se puede anular en el diálogo de Configuraciones globales)
  • $siteadminemail: Esta es la dirección por defecto del administrador del sitio, y se usa para mensajes del sistema y opciones de contacto. (a partir de la versión 1.87 esta configuración se puede anular en el diálogo de Configuraciones globales)
  • $siteadminbounce: Esta es la dirección por defecto a donde se mandarán correos rebotados. (a partir de la versión 1.87 esta configuración se puede anular en el diálogo de Configuraciones globales)
  • $siteadminname: El nombre real del administrador del sitio. (a partir de la versión 1.87 esta configuración se puede anular en el diálogo de Configuraciones globales)

Seguridad

  • $surveyPreview_require_Auth: true por defecto. Si fijas esto a falso, cualquier persona puede tomar tu encuesta usando el URL de la misma - sin tener que acceder a la administración, y sin tener que activar la encuesta primero. (a partir de la versión 1.87 esta configuración se puede anular en el diálogo de Configuraciones globales)
  • usercontrolSameGroupPolicy :  es true por defecto. Por defecto, los usuarios no administradores definidos en la interfaz de administración de LimeSurvey sólo pueden ver a otros usuarios si pertenecen a por lo menos un grupo al que pertenece el usuario. Esto es establecido por el siguiente parámetro:
  • $filterxsshtml: Esta preferencia habilita el filtro de tags sosperchosos de html en los textos de encuesta, grupos, preguntas y respuestas en la interfaz de administración. Sólo cambia esto a 'false' si confias absolutamente en los usuarios que creaste para la administración de LimeSurvey y si quieres permitirle a los usuarios que usen Javascript, Flash, etc. (a partir de la versión 1.87 esta configuración se puede anular en el diálogo de Configuraciones globales)
  • $demoModeOnly: Si esta opción es true, LimeSurvey entrará al modo de demostración. Este modo cambia las siguientes cosas:
    • Deshabilita el cambio de la información y contraseñas de los administradores
    • Deshabilita la carga de archivos en el editor de plantillas
    • Deshabilita el envío de invitaciones de correo y recondatorios
    • Deshabilita el volcado de base de datos doing a database dump
    • Deshabilita el guardado de las siguientes configuraciones: Nombre del sitio, idioma por defecto, modo de editor de HTML por defecto, filtro de XSS

Recursos

  • $memorylimit: Esto establece cuánta memoria puede accesar LimeSurvey. '16M' es lo mínimo recomendado. Si recibes errores de tiempo o tienes problemas al generar estadísticas o exportar archivos, incrementa este límite a '128M' o '256M'.
  • $sessionlifetime: Define el tiempo en segundos después del cual expira la sesión de la encuesta. Default: $sessionlifetime    =  3600; (starting with 1.87 this setting is overridden in the Global settings dialog)

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

Apariencia

  • $lwcdropdowns: Esto puede ser "L" o "R". Si es "R", las preguntas de tipo 'Lista con Comentario' serán desplegadas como botones de opción, mientras que "L" hará que se desplieguen como una lista desplegable. (Obsoleto desde la versión 2.0)
  • $dropdownthreshold: Cuando tienes seleccionado "R" para los $dropdowns, esto te permite elegir el número máximo de opciones que se desplegarán como botones de opción antes de volverse una lista desplegable. Si tienes una pregunta que tiene un gran número de opciones, se puede ver abultado si las muestras todas como botones de opción, y puede ser confuso para los usuarios. Un máximo de 25 (que es el valor por defecto) hace las listas grandes más fáciles de usar para el participante de la encuesta.
  • $repeatheadings: Con el tipo de pregunta de arreglo (flexible), usualmente tendrás un gran número de respuestas, que al desplegarse en pantalla ocupan más de una página. Ésta configuración te deja decidir cuántas respuestas desplegar antes de repetir el encabezado de la pregunta. Una buena cantidad es 15. Si no quieres que se repitan los encabezados, ajusta esto a 0 (que es el valor por defecto).
  • $minrepeatheadings: El mínimo de preguntas que se necesitan para repetir los encabezados en preguntas de arreglo (flexible).
  • $addTitleToLinks: Si esta opción es true, LimeSurvey le agregará el elemento 'title' de html a todos los vínculos usados en menús. Esto ayuda a los lectores de pantalla a analizar los menús. Sólo ajusta esto a true si estás usando un lector de pantalla y se enciman las herramientas.
  • $defaulttemplate: Esta opción especifica el tema por defecto usado para la 'lista pública' de encuestas. (a partir de la versión 1.87 esta configuración se puede anular en el diálogo de Configuraciones globales)
  • $defaulthtmleditormode: Ajusta el modo por defecto del editor integrado de HTML (a partir de la versión 1.87 esta configuración se puede anular en el diálogo de Configuraciones globales) . Las opciones válidas son: inline (por defecto), popup and none:
    • inline: Se reemplazan los campos en línea por el editor de HTML. Lento, pero conveniente y fácil de usar.
    • popup: Agrega un ícono que abre una ventana emergente con el editor de HTML. Es más rápido, pero el código html se despliega en la forma.
    • none: Sin editor de HTML

Idioma y Hora

  • $defaultlang: Esto debe ser idioma por defecto usado en los scripts de administración, así como el idioma por defecto en las encuestas públicas. Puedes cambiar esta opción para cada una de las encuestas desde los scripts de administración. (a partir de la versión 1.87 esta configuración se puede anular en el diálogo de Configuraciones globales)
  • $timeadjust: Si tu servidor web está en un huso horario diferente del lugar donde se basarán tus encuestas, pon la diferencia entre los dos aquí. Por ejemplo, yo vivo en Australia, pero uso un servidor en los Estados Unidos. El servidor web está 14 horas detrás de mi huso horario. Por lo tanto, está ajustado a "14!. En otras palabras, le agrega 14 horas a la hora del servidor web. Esta opción es particularmente importante si la encuesta guarda la hora de la respuesta. (a partir de la versión 1.87 esta configuración se puede anular en el diálogo de Configuraciones globales)
  • $modrewrite: Si es 1, activa la función de URL elegante. (Ejemplo: http://survey.example.com/123456/lang-fr/tk-sdlfkjozeiru en vez de http://survey.example.com/index.php?sid=123456⟨=fr&token;=sdlfkjozeiru). Antes de activar esto, debes renombrar el archivo "htaccess.txt" a ".htaccess". Necesitas ejecutar un servidor web Apache con el módulo mod_rewrite correctamente instalado.

Comportamiento de la Encuesta

  • $allowmandbackwards: Un valor de 1 para esta variable le permitirá a los participantes de la encuesta moverse a una pregunta anterior, aún si no han contestado una pregunta obligatoria. Si es 0, los participantes deberán contestar la pregunta antes de poder volver a una anterior.
  • $deletenonvalues: Esta es una opción un poco difícil de explicar. Si es 0, si una pregunta (digámosle pregunta "b") sólo se muestra bajo una condición (es decir, basada en la respuesta de una pregunta anterior - digámosle "a"), y el usuario contesta la pregunta "b" pero se regresa y cambia la respuesta de la pregunta "a" de tal modo que la pregunta "b" ya no aparece, la encuesta recordará y guardará la respuesta de la pregunta que ya no se desplegó (la pregunta "b"). Usualmente prefiero que este sea el caso, teniendo en cuenta que puede ser interesante saber esta información de todos modos. Pero, si prefieres que el script sea consistente y se rehuse a guardar información que no aplica, puedes cambiar el valor a 1, y el script no guardará esta información redundante.
  • $shownoanswer: Cuando una pregunta del tipo de selección o botón de opción que tiene respuestas editables (por ejemplo listas o arreglos) no es obligatoria y $shownoanswer vale 1, se muestra la opción "N/A", para permitirle a los participantes no contestar la pregunta. Algunas personas prefieren que no suceda esto. Ajusta ésta opción a 0 para deshabilitarlo. (a partir de la versión 1.87 esta configuración se puede anular en el diálogo de Configuraciones globales)
  • $printanswershonorsconditions: Esta opción determina si la función printaswers mostrará entradas de preguntas que se escondieron por ramificación condicional. Por defecto es 1, que significa esconder éstas preguntas.
  • $hide_groupdescr_allinone: Esta opcion es relevante las encuestas todo en uno que usan condiciones, y se introdujo en LimeSurvey 1.85RC3. Cuando es true, el nombre del grupo y la descripción se esconden si todas las preguntas del grupo están escondidas. Por defecto es true.
  • $showpopups:  Muestra ventanas emergentes si no se han contestado preguntas obligatorias o condicionales correctamente. 1=Mostrar ventanas emergentes (por defecto), 0=Mostrar el error en la página.

Desarrollo

  • $debug: Con esta opción puedes ajustar el reporte de errores de PHP a E_ALL. Esto significa que cada pequeño aviso, alerta o error del script se mostrará. Esta opción sólo debe ser 1 si estás intentando depurar la aplicación por alguna razón, si eres un desarrollador, debe ser 2. No lo cambies a 1 ni a 2 en la producción, ya que tal vez pueda causar la revelación de rutas. (Por defecto es 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