<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.limesurvey.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tassoman</id>
	<title>LimeSurvey Manual - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.limesurvey.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tassoman"/>
	<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/Special:Contributions/Tassoman"/>
	<updated>2026-08-10T18:35:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381153</id>
		<title>Available third party plugins</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381153"/>
		<updated>2026-03-30T10:12:31Z</updated>

		<summary type="html">&lt;p&gt;Tassoman: /* Other plugins */ duplicate removal&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some plugin are listed in the [https://account.limesurvey.org/limestore Limestore]. If you have a plugin you would like to share with the world, feel free to add it to this page.&lt;br /&gt;
&lt;br /&gt;
== Authentication plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://survey-consulting.com/product/extended-auth-ldap-limesurvey-plugin Free Auth LDAP Plugin]&lt;br /&gt;
* [https://survey-consulting.com/product/limesurvey-saml-plugin/ SAML SSO Plugin]&lt;br /&gt;
* [https://github.com/technowhizz/LimeSurvey-RegDomainRestricter Registration Email Domain Restrictor] &lt;br /&gt;
* [http://extensions.sondages.pro/authentification-by-wordpress/ Authentification by WordPress user]&lt;br /&gt;
* [https://github.com/univlorraine/limesurvey-cas CAS Authentication plugin for LimeSurvey]&lt;br /&gt;
* [https://github.com/atlet/LimeSurvey-ShibbolethAuth LimeSurvey Shibboleth auth plugin]&lt;br /&gt;
* [https://framagit.org/Animafac/limesurvey/limesurvey-rememberme LimeSurvey RememberMe plugin]&lt;br /&gt;
&lt;br /&gt;
== Export and statistics plugins ==&lt;br /&gt;
&lt;br /&gt;
* [http://extensions.sondages.pro/exportcompleteanswers/ exportCompleteAnswers : Complete New export system allowing export Answer code and answer text in CSV. Options is manageable by super admin.]&lt;br /&gt;
* [http://extensions.sondages.pro/triple-s-export/ exportTripleS : export in Triple-S XML2 or XML1.3 format survey structure and data.]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendAdminStatitistics extendAdminStatitistics : rewriting of core statistics, actually put sub question in same table and graph]&lt;br /&gt;
* [https://github.com/reportico-web/limesurvey-reportico Reportico Reporting module for LimeSurvey]: generate charts,tables and statistics from survey data&lt;br /&gt;
&lt;br /&gt;
== Public survey plugins ==&lt;br /&gt;
* [http://extensions.sondages.pro/hideemptycolumn-for-limesurvey/ hideEmptyColumn : A plugin to add a solution to hide column of array question type with ExpressionScript of LimeSurvey ]&lt;br /&gt;
* [http://extensions.sondages.pro/moreaccessibility/ moreAccessibility : some option to add accessibility to public survey] 2.6lts compatible onlmy, deprecated in 3.0&lt;br /&gt;
* [https://git.framasoft.org/Shnoulle/addQuestionCodeClass addQuestionCodeClass : add the question code at the question wrapper class]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/radioToStarRating radioToStarRating : set any radio list to star rating system]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/moveSomeAnswers moveSomeAnswers] : If using random_order attribute : allow to always move some answers at end.&lt;br /&gt;
&lt;br /&gt;
== Data editing plugins ==&lt;br /&gt;
* [https://manual.limesurvey.org/MassAction_Plugin MassAction] : A plugin for faster survey editing by loading questions details into editable cells. Includes a search and replace feature.&lt;br /&gt;
&lt;br /&gt;
== Email plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://gitlab.com/SondagesPro/mailing/noMailToExample noMailToExample]&lt;br /&gt;
* [https://github.com/LimeSurvey/LimeSurvey/blob/develop/plugins/mailSenderToFrom/mailSenderToFrom.php mailSenderToFrom]&lt;br /&gt;
* [https://github.com/Xites/LS_mailDKIM mailDKIM]&lt;br /&gt;
* [https://github.com/Xites/LS_mailEmbedImages mailEmbedImages]&lt;br /&gt;
* [https://github.com/RegioneER/LsRerAntiphishing Anti Phishing Templates] this free software plugin, mandatory alters mail notifications templates, by displaying urls inside email messages.&lt;br /&gt;
&lt;br /&gt;
== Other plugins ==&lt;br /&gt;
&lt;br /&gt;
* [http://extensions.sondages.pro/recomputeexpression-for-limesurvey Recompute Expressions:] A Plugin for LimeSurvey to recompute expression in survey with already submitted survey. Allow to update some relevance too.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/showAdvancedSettings showAdvancedSettings:] Show advanced settings in question edit by default.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/replaceRegister  replaceRegisterː] Extra option for Register, starting point for other plugin. &lt;br /&gt;
* [http://extensions.sondages.pro/fixmaxstep-for-question-index/ fixMaxStep : Fix question index for token answer persistence survey:] Example of usage : get the complete index when user come back to the survey.&lt;br /&gt;
* [http://extensions.sondages.pro/sendmailajax-all-email-in-one/ sendMailAjax : Send token email one by one with ajaxː] Allow to send all email in one click without restriction.&lt;br /&gt;
* [http://extensions.sondages.pro/mailing-management/sendmailcron sendMailCron: Automatically send invitations and reminders using cronjobsː] Automatically sends invitations and reminders in custom intervals. Extensive configuration and debugging options&lt;br /&gt;
* [https://github.com/SteveCohen/Piwik-for-Limesurvey Piwik-for-Limesurvey Piwik for LimeSurvey]: Plugs Piwik into LimeSurvey, so you can track your survey admin users and respondents.&lt;br /&gt;
* [https://github.com/SondagesPro/surveysModel Mark surveys as &amp;quot;Survey Model/Template&amp;quot;ː] Allow admins to mark a survey as &amp;quot;Survey Model&amp;quot;, a kind of &amp;quot;master survey&amp;quot; or &amp;quot;survey template&amp;quot; which only users with appropriate rights are allowed to edit. The common user is only allowed to create copies based on such a survey template.&lt;br /&gt;
* [https://github.com/SondagesPro/LS-toolsDomDocument toolsDomDocumentː] a tools for anothers plugin&lt;br /&gt;
* [https://github.com/TonisOrmisson/limesurvey-url-templates UrlTemplateChangerː] Set respondent&#039;s interview template over an URL parameter.&lt;br /&gt;
* [https://github.com/evently-nl/zesthook  ZestHookː] Makes it possible to send a Post request on every response submission. You can set the URL to post to, as well as several other options.&lt;br /&gt;
* [https://github.com/CEric-fr/limesurvey-rgpd Extension RGPD pour LimeSurvey] Each questionnaire owner is able to interact with these conditions of use via a new submenu added in the &amp;quot;questionnaire parameters&amp;quot; entitled: GDPR configuration.&lt;br /&gt;
* [https://github.com/projeto-cade-unb/Lime2Camunda Lime2Camunda] Plugin for integration with LimeSurvey with Camunda, which at the end of completing the survey it starts a process instance in Camunda submitting all questions and answers as process variables.&lt;br /&gt;
* [https://github.com/librecodecoop/lsTelegramNotify lsTelegramNotify]: Allows you to send after survey completed event to Telegram as text, PDF or CSV.&lt;br /&gt;
* [https://github.com/LibreCodeCoop/LSNextcloud LSNextcloud]: Save all survey responses and their attachments automatically to a folder in your Nextcloud.&lt;br /&gt;
&lt;br /&gt;
== Example and demo plugins ==&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendRemoteControl extendRemoteControl] : Show how to add function to [[RemoteControl_2_API]], show how to create a new admin page too (usage of public function actionIndex() )&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Tassoman</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381152</id>
		<title>Available third party plugins</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381152"/>
		<updated>2026-03-30T10:09:58Z</updated>

		<summary type="html">&lt;p&gt;Tassoman: added anti phishing plugin&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some plugin are listed in the [https://account.limesurvey.org/limestore Limestore]. If you have a plugin you would like to share with the world, feel free to add it to this page.&lt;br /&gt;
&lt;br /&gt;
== Authentication plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://survey-consulting.com/product/extended-auth-ldap-limesurvey-plugin Free Auth LDAP Plugin]&lt;br /&gt;
* [https://survey-consulting.com/product/limesurvey-saml-plugin/ SAML SSO Plugin]&lt;br /&gt;
* [https://github.com/technowhizz/LimeSurvey-RegDomainRestricter Registration Email Domain Restrictor] &lt;br /&gt;
* [http://extensions.sondages.pro/authentification-by-wordpress/ Authentification by WordPress user]&lt;br /&gt;
* [https://github.com/univlorraine/limesurvey-cas CAS Authentication plugin for LimeSurvey]&lt;br /&gt;
* [https://github.com/atlet/LimeSurvey-ShibbolethAuth LimeSurvey Shibboleth auth plugin]&lt;br /&gt;
* [https://framagit.org/Animafac/limesurvey/limesurvey-rememberme LimeSurvey RememberMe plugin]&lt;br /&gt;
&lt;br /&gt;
== Export and statistics plugins ==&lt;br /&gt;
&lt;br /&gt;
* [http://extensions.sondages.pro/exportcompleteanswers/ exportCompleteAnswers : Complete New export system allowing export Answer code and answer text in CSV. Options is manageable by super admin.]&lt;br /&gt;
* [http://extensions.sondages.pro/triple-s-export/ exportTripleS : export in Triple-S XML2 or XML1.3 format survey structure and data.]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendAdminStatitistics extendAdminStatitistics : rewriting of core statistics, actually put sub question in same table and graph]&lt;br /&gt;
* [https://github.com/reportico-web/limesurvey-reportico Reportico Reporting module for LimeSurvey]: generate charts,tables and statistics from survey data&lt;br /&gt;
&lt;br /&gt;
== Public survey plugins ==&lt;br /&gt;
* [http://extensions.sondages.pro/hideemptycolumn-for-limesurvey/ hideEmptyColumn : A plugin to add a solution to hide column of array question type with ExpressionScript of LimeSurvey ]&lt;br /&gt;
* [http://extensions.sondages.pro/moreaccessibility/ moreAccessibility : some option to add accessibility to public survey] 2.6lts compatible onlmy, deprecated in 3.0&lt;br /&gt;
* [https://git.framasoft.org/Shnoulle/addQuestionCodeClass addQuestionCodeClass : add the question code at the question wrapper class]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/radioToStarRating radioToStarRating : set any radio list to star rating system]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/moveSomeAnswers moveSomeAnswers] : If using random_order attribute : allow to always move some answers at end.&lt;br /&gt;
&lt;br /&gt;
== Data editing plugins ==&lt;br /&gt;
* [https://manual.limesurvey.org/MassAction_Plugin MassAction] : A plugin for faster survey editing by loading questions details into editable cells. Includes a search and replace feature.&lt;br /&gt;
&lt;br /&gt;
== Email plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://gitlab.com/SondagesPro/mailing/noMailToExample noMailToExample]&lt;br /&gt;
* [https://github.com/LimeSurvey/LimeSurvey/blob/develop/plugins/mailSenderToFrom/mailSenderToFrom.php mailSenderToFrom]&lt;br /&gt;
* [https://github.com/Xites/LS_mailDKIM mailDKIM]&lt;br /&gt;
* [https://github.com/Xites/LS_mailEmbedImages mailEmbedImages]&lt;br /&gt;
* [https://github.com/RegioneER/LsRerAntiphishing Anti Phishing Templates] this free software plugin, mandatory alters mail notifications templates, by displaying urls inside email messages.&lt;br /&gt;
&lt;br /&gt;
== Other plugins ==&lt;br /&gt;
&lt;br /&gt;
* [http://extensions.sondages.pro/recomputeexpression-for-limesurvey Recompute Expressions:] A Plugin for LimeSurvey to recompute expression in survey with already submitted survey. Allow to update some relevance too.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/showAdvancedSettings showAdvancedSettings:] Show advanced settings in question edit by default.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/replaceRegister  replaceRegisterː] Extra option for Register, starting point for other plugin. &lt;br /&gt;
* [http://extensions.sondages.pro/fixmaxstep-for-question-index/ fixMaxStep : Fix question index for token answer persistence survey:] Example of usage : get the complete index when user come back to the survey.&lt;br /&gt;
* [http://extensions.sondages.pro/sendmailajax-all-email-in-one/ sendMailAjax : Send token email one by one with ajaxː] Allow to send all email in one click without restriction.&lt;br /&gt;
* [http://extensions.sondages.pro/mailing-management/sendmailcron sendMailCron: Automatically send invitations and reminders using cronjobsː] Automatically sends invitations and reminders in custom intervals. Extensive configuration and debugging options&lt;br /&gt;
* [https://github.com/SteveCohen/Piwik-for-Limesurvey Piwik-for-Limesurvey Piwik for LimeSurvey]: Plugs Piwik into LimeSurvey, so you can track your survey admin users and respondents.&lt;br /&gt;
* [https://github.com/SondagesPro/surveysModel Mark surveys as &amp;quot;Survey Model/Template&amp;quot;ː] Allow admins to mark a survey as &amp;quot;Survey Model&amp;quot;, a kind of &amp;quot;master survey&amp;quot; or &amp;quot;survey template&amp;quot; which only users with appropriate rights are allowed to edit. The common user is only allowed to create copies based on such a survey template.&lt;br /&gt;
* [https://github.com/SondagesPro/LS-toolsDomDocument toolsDomDocumentː] a tools for anothers plugin&lt;br /&gt;
* [https://github.com/TonisOrmisson/limesurvey-url-templates UrlTemplateChangerː] Set respondent&#039;s interview template over an URL parameter.&lt;br /&gt;
* [https://github.com/evently-nl/zesthook  ZestHookː] Makes it possible to send a Post request on every response submission. You can set the URL to post to, as well as several other options.&lt;br /&gt;
* [https://github.com/CEric-fr/limesurvey-rgpd Extension RGPD pour LimeSurvey] Each questionnaire owner is able to interact with these conditions of use via a new submenu added in the &amp;quot;questionnaire parameters&amp;quot; entitled: GDPR configuration.&lt;br /&gt;
* [https://github.com/projeto-cade-unb/Lime2Camunda Lime2Camunda] Plugin for integration with LimeSurvey with Camunda, which at the end of completing the survey it starts a process instance in Camunda submitting all questions and answers as process variables.&lt;br /&gt;
* [https://github.com/LibreCodeCoop/LSNextcloud LSNextcloud] Allows you to send after survey completed event to Telegram as text, PDF or CSV.&lt;br /&gt;
* [https://github.com/librecodecoop/lsTelegramNotify lsTelegramNotify]: Allows you to send after survey completed event to Telegram as text, PDF or CSV.&lt;br /&gt;
* [https://github.com/LibreCodeCoop/LSNextcloud LSNextcloud]: Save all survey responses and their attachments automatically to a folder in your Nextcloud.&lt;br /&gt;
&lt;br /&gt;
== Example and demo plugins ==&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendRemoteControl extendRemoteControl] : Show how to add function to [[RemoteControl_2_API]], show how to create a new admin page too (usage of public function actionIndex() )&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Tassoman</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Theme_editor_-_Available_Twig_functions&amp;diff=379634</id>
		<title>Theme editor - Available Twig functions</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Theme_editor_-_Available_Twig_functions&amp;diff=379634"/>
		<updated>2025-01-14T16:47:34Z</updated>

		<summary type="html">&lt;p&gt;Tassoman: /* Image and file source */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== PHP included functions ==&lt;br /&gt;
&lt;br /&gt;
* [http://php.net/array-flip array_flip]&lt;br /&gt;
* [http://php.net/array_intersect_key array_intersect_key]&lt;br /&gt;
* [http://php.net/str_replace str_replace]&lt;br /&gt;
* [http://php.net/intval intval]&lt;br /&gt;
* [http://php.net/empty empty]&lt;br /&gt;
* [http://php.net/reset reset]&lt;br /&gt;
* [http://php.net/in_array in_array]&lt;br /&gt;
* [http://php.net/array_search array_search]&lt;br /&gt;
* [http://php.net/isset isset]&lt;br /&gt;
* [http://php.net/sprintf sprintf]&lt;br /&gt;
&lt;br /&gt;
== Specific function for LimeSurvey ==&lt;br /&gt;
&lt;br /&gt;
=== Text update and management ===&lt;br /&gt;
&lt;br /&gt;
==== flatString ====&lt;br /&gt;
Get html text and remove whole not clean string.&lt;br /&gt;
Parameters are&lt;br /&gt;
* the string to flatten&lt;br /&gt;
* a boolean encode html entities (default to false)&lt;br /&gt;
&lt;br /&gt;
==== ellipsizeString ====&lt;br /&gt;
Get a flat and ellipsize string.&lt;br /&gt;
Parameters are&lt;br /&gt;
* the string to ellipsize&lt;br /&gt;
* an integer max length of the final string&lt;br /&gt;
* a float $position of the ellipsis in string (between 0 and 1), default to 1 mean the string is ellipsize at end.&lt;br /&gt;
* a string ellipsis string to shown in place of removed part, default to …&lt;br /&gt;
&lt;br /&gt;
==== processString ====&lt;br /&gt;
&lt;br /&gt;
Process ExpressionScript with any string with current page information, return a string. &lt;br /&gt;
Parameters are&lt;br /&gt;
* the string to be processed&lt;br /&gt;
* a boolean : return static string (or not), default to no.&lt;br /&gt;
* an integer : recursion (max) level to do, default to 3&lt;br /&gt;
* an array of string: replacement out of current expression know vars. The key is the value to be replaced, the value is the replacement.&lt;br /&gt;
&lt;br /&gt;
=== Image and file source ===&lt;br /&gt;
Remember, by default SVG files are blacklisted for potential security issues. Before use inside your custom theme, you need to allow them inside the templates, by editing Advanced Config.&lt;br /&gt;
&lt;br /&gt;
==== image() ====&lt;br /&gt;
Returns the HTML code needed for an image tag. Parameters are:&lt;br /&gt;
* The source of image, relative to theme directory (img/logo.png for example)&lt;br /&gt;
* alt attribute, useful for better accessibility&lt;br /&gt;
* array of extra html function (as array for twig : &amp;lt;code&amp;gt;{&amp;quot;class&amp;quot;: &amp;quot;logo img-fluid&amp;quot;}&amp;lt;/code&amp;gt;)&lt;br /&gt;
Not useful if you want display a SVG image, they are rendered differently, not by &amp;lt;code&amp;gt;&amp;lt;img /&amp;gt;&amp;lt;/code&amp;gt; tag.&lt;br /&gt;
&lt;br /&gt;
==== imageSrc() ====&lt;br /&gt;
Returns the dynamic path to a theme&#039;s image, obtained in the cache. Looks for parent&#039;s theme image, when not found in current theme. &lt;br /&gt;
* Image path relative to theme directory (img/mylogo.png for example)&lt;br /&gt;
* default value if image file was not found (img/default-avatar.png for example)&lt;br /&gt;
Can be used to render SVG. For example: &amp;lt;code&amp;gt;&amp;lt;svg&amp;gt;&amp;lt;use src=&amp;quot;&amp;lt;nowiki&amp;gt;{{ imageSrc(&#039;img/logo.svg&#039;) }}&amp;lt;/nowiki&amp;gt;&amp;quot; &amp;gt;&amp;lt;/use&amp;gt;&amp;lt;/svg&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== templateResourceUrl() ====&lt;br /&gt;
&lt;br /&gt;
Create the dynamic source of a file, using parent theme if file are not found in current one.&lt;br /&gt;
&lt;br /&gt;
* file path relative to theme directory&lt;br /&gt;
* default value if not found&lt;br /&gt;
&lt;br /&gt;
=== Language management ===&lt;br /&gt;
&lt;br /&gt;
==== gT ====&lt;br /&gt;
&lt;br /&gt;
==== ngT ====&lt;br /&gt;
&lt;br /&gt;
=== Get information ===&lt;br /&gt;
&lt;br /&gt;
==== getConfig ====&lt;br /&gt;
Get the current config part for this instance of LimeSurvey for the parameter. Return the existing config, false if not set.&lt;br /&gt;
&lt;br /&gt;
=== getPost ===&lt;br /&gt;
Get the current $_POST value for the parameter. Return the existing $_POST, null if not set.&lt;br /&gt;
&lt;br /&gt;
==== getQuery ====&lt;br /&gt;
Get the current $_GET value for the parameter. Return the existing $_GET, null if not set.&lt;br /&gt;
&lt;br /&gt;
==== getParam ====&lt;br /&gt;
Get the current $_PARAM value for the parameter. Returns the existing $_PARAM, null if not set.&lt;br /&gt;
&lt;br /&gt;
=== Script and css management ===&lt;br /&gt;
&lt;br /&gt;
* registerPublicCssFile&lt;br /&gt;
* registerTemplateCssFile&lt;br /&gt;
* registerGeneralScript&lt;br /&gt;
* registerTemplateScript&lt;br /&gt;
* registerScript&lt;br /&gt;
* registerPackage&lt;br /&gt;
* unregisterPackage&lt;br /&gt;
* registerCssFile&lt;br /&gt;
* registerScriptFile&lt;br /&gt;
* unregisterScriptFile&lt;br /&gt;
* unregisterScriptForAjax&lt;br /&gt;
* listCoreScripts&lt;br /&gt;
* listScriptFiles&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
==== getAllTokenAnswers ====&lt;br /&gt;
&lt;br /&gt;
== Adding a function ==&lt;br /&gt;
&lt;br /&gt;
=== By updating config.php ===&lt;br /&gt;
You can add any PHP existing function easily in your config.php file. This is done by adding the function in twigRenderer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt;&lt;br /&gt;
		&#039;twigRenderer&#039; =&amp;gt; array(&lt;br /&gt;
			&#039;functions&#039; =&amp;gt; array(&lt;br /&gt;
				&#039;strlen&#039; =&amp;gt; &#039;strlen&#039;,&lt;br /&gt;
			),&lt;br /&gt;
			&#039;sandboxConfig&#039; =&amp;gt; array(&lt;br /&gt;
				&#039;functions&#039; =&amp;gt; array(&lt;br /&gt;
					&#039;strlen&#039;,&lt;br /&gt;
				),&lt;br /&gt;
			),&lt;br /&gt;
		),&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== By extension ===&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/LimeSurvey/LimeSurvey/tree/master/upload/twig/extensions Custom Twig Extension for LimeSurvey]&lt;br /&gt;
&lt;br /&gt;
[[Category:Theme]]&lt;br /&gt;
[[Category:Twig]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Tassoman</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Optional_settings&amp;diff=379633</id>
		<title>Optional settings</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Optional_settings&amp;diff=379633"/>
		<updated>2025-01-14T16:28:23Z</updated>

		<summary type="html">&lt;p&gt;Tassoman: /* Allowed file upload */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt; &amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
The following section is addressed to those of you who would like to edit those configuration settings that could not be modified with the help of the GUI (Graphical User Interface) of the LimeSurvey installation. Please bear in mind that all the changes from the LimeSurvey root directory are done at your own risk. Nevertheless, in the case in which you are experiencing problems/need further guidance, join the [https://www.limesurvey.org/forum discussion forums] or the [irc://irc.freenode.net/limesurvey|IRC IRC channel] for help from the LimeSurvey community.&lt;br /&gt;
&lt;br /&gt;
=Introduction= &amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
To modify the configuration settings of the installation, you have to edit the optional settings. They can be found in the /application/config/&#039;&#039;&#039;config-defaults.php&#039;&#039;&#039;, which is located in the LimeSurvey root directory. The default settings of the standard installation can be found in config-defaults.php. Some of them can be overridden by using the [[Global settings|global settings]] dialog, while the others will have to be manually edited.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
{{Alert|If you want to change these settings, please do not change them in config-defaults.php, but copy the particular setting/line to /application/config/&#039;&#039;&#039;config.php&#039;&#039;&#039; in &amp;lt;nowiki&amp;gt;&#039;config&#039;=&amp;gt;array( )&amp;lt;/nowiki&amp;gt; and change it there. All the newly modified/introduced settings from the config.php file will override the default values from config-defaults.php.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
When an upgrade occurs, only the config-defaults.php settings are changed. Therefore, editing the config.php file will save your customized settings. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
To update/add the LimeSurvey settings in /application/&#039;&#039;&#039;config/config.php&#039;&#039;&#039;, you have to update the config array:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt;&lt;br /&gt;
    &#039;config&#039;=&amp;gt;array(&lt;br /&gt;
        &#039;debug&#039;=&amp;gt;0,&lt;br /&gt;
        &#039;debugsql&#039;=&amp;gt;0,&lt;br /&gt;
        &#039;LimeSurveySetting&#039;=&amp;gt;&#039;New value&#039;, // Update default LimeSurvey config here&lt;br /&gt;
    )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Yii settings= &amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
LimeSurvey uses the Yii framework, which has its own configuration parameters in application/config/&#039;&#039;&#039;internal.php&#039;&#039;&#039; and application/config/&#039;&#039;&#039;config.php&#039;&#039;&#039; file. You can also access some specific configuration settings of LimeSurvey via the Yii configuration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
Since config.php array is merged to the whole config, you can replace any Yii params in the config.php file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
The Yii specific settings are set in the components array:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt;&lt;br /&gt;
    &#039;components&#039; =&amp;gt; array(&lt;br /&gt;
        &#039;db&#039; =&amp;gt; array(&lt;br /&gt;
            ....&lt;br /&gt;
        ),&lt;br /&gt;
        &#039;Specific settings&#039;=&amp;gt;array(&lt;br /&gt;
            ....&lt;br /&gt;
        ),&lt;br /&gt;
    ),&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
{{Note|For more information about the Yii framework, please access the [http://www.yiiframework.com/doc-2.0/guide-index.html following link.]}}&lt;br /&gt;
&lt;br /&gt;
==Database settings== &amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
The database settings are written to config.php by the installer file when you install LimeSurvey for the first time. If needed, you can update this part of the config.php file. Please remember that you do this at your own risk!&lt;br /&gt;
See also the [http://www.yiiframework.com/doc/blog/1.1/en/prototype.database#establishing-database-connection Yii documentation] and please remember that LimeSurvey supports only the following types of database: mysql, pgsql, dblib, mssql, and sqlsrv.&lt;br /&gt;
&lt;br /&gt;
==Session settings== &amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
You can set some session parameters in config.php (check the two examples from below). You can uncomment/add the part needed in config.php. See the [http://www.yiiframework.com/doc/api/1.1/CHttpSession Yii Documentation] for other settings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
{{Alert|If you need to update session settings to have multiple LimeSurvey instances running on the same server, check if you don&#039;t have to update [[Optional_settings#Request_settings|request settings]] for crsf cookie.}}&lt;br /&gt;
&lt;br /&gt;
===Use table-based sessions=== &amp;lt;!--T:101--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:102--&amp;gt;&lt;br /&gt;
LimeSurvey can use table-based sessions, you find a commented part on the default config.php generated file. To use table-based session, remove the // before each line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:103--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt;&lt;br /&gt;
        &#039;session&#039; =&amp;gt; array (&lt;br /&gt;
            &#039;class&#039; =&amp;gt; &#039;application.core.web.DbHttpSession&#039;,&lt;br /&gt;
            &#039;connectionID&#039; =&amp;gt; &#039;db&#039;,&lt;br /&gt;
            &#039;sessionTableName&#039; =&amp;gt; &#039;{{sessions}}&#039;,&lt;br /&gt;
        ),&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
{{Alert|Table-based sessions are currently not supported on MSSQL server.}}&lt;br /&gt;
&lt;br /&gt;
===Other sessions update=== &amp;lt;!--T:105--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
If you use SSL (&#039;https&#039;) for your LimeSurvey installation, adding the following lines to your config.php will increase the security of the session:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt;        // Set the cookie via SSL&lt;br /&gt;
        &#039;session&#039; =&amp;gt; array (&lt;br /&gt;
            &#039;cookieParams&#039; =&amp;gt; array(&lt;br /&gt;
                    &#039;secure&#039; =&amp;gt; true, // use SSL for cookies&lt;br /&gt;
                    &#039;httponly&#039; =&amp;gt; true // Cookies may not be used by other protocols - experimental&lt;br /&gt;
                ),&lt;br /&gt;
            ),&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
If you want to fix the domain for a cookie, use the following syntax in config.php:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt;        // Set the domain for cookie&lt;br /&gt;
        &#039;session&#039; =&amp;gt; array (&lt;br /&gt;
            &#039;cookieParams&#039; =&amp;gt; array(&lt;br /&gt;
                    &#039;domain&#039; =&amp;gt; &#039;.example.org&#039;,&lt;br /&gt;
                ),&lt;br /&gt;
            ),&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:95--&amp;gt;&lt;br /&gt;
If you have mutiples installation on the same server, it can be more quick and easy to set different session name for each LimeSurvey instance. This can be need for IE11 in some condition (see [https://bugs.limesurvey.org/view.php?id=12083#c42892 issue 12083])&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt;        // Set the name of the session&lt;br /&gt;
        &#039;session&#039; =&amp;gt; array (&lt;br /&gt;
            &#039;sessionName&#039; =&amp;gt; &amp;quot;LimeSurveyN1&amp;quot;,&lt;br /&gt;
            ),&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Request settings== &amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
The request settings are important, but the default settings are already optimized for LimeSurvey usage. To read more about them, see the [http://www.yiiframework.com/doc/api/1.1/CHttpRequest Yii Documentation].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
For example, the LimeSurvey request settings configuration may be modified in the following way (at your own risk) :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt;        // Disable CSRF protection&lt;br /&gt;
        &#039;request&#039; =&amp;gt; array(&lt;br /&gt;
            &#039;enableCsrfValidation&#039;=&amp;gt;false,    &lt;br /&gt;
            ),&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt;        // Enforce a certain URL base &lt;br /&gt;
        &#039;request&#039; =&amp;gt; array(&lt;br /&gt;
            &#039;hostInfo&#039; =&amp;gt; &#039;http://www.example.org/&#039;  &lt;br /&gt;
            ),&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt;        // Set the cookie domain name and path for CSRF protection, path is used if you have different instance on same domain&lt;br /&gt;
        &#039;request&#039; =&amp;gt; array(&lt;br /&gt;
            &#039;csrfCookie&#039; =&amp;gt; array( &lt;br /&gt;
                &#039;domain&#039; =&amp;gt; &#039;.example.com&#039;,&lt;br /&gt;
                &#039;path&#039; =&amp;gt; &#039;/limesurvey/&#039;,&lt;br /&gt;
            )&lt;br /&gt;
        ),&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:82--&amp;gt;&lt;br /&gt;
If you need to update only the url for token emails, set your [[Optional_settings#Advanced_path_settings|publicurl]] in your config.php file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Allow usage of session and Csrf Validation in iFrame {{NewIn|v=3.24.3}}== &amp;lt;!--T:118--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:119--&amp;gt;&lt;br /&gt;
After allow [[Global_settings#Security|Iframe embedding]] you need to update some configuration part. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:136--&amp;gt;&lt;br /&gt;
{{Alert|Attention, even with all settings : allow form in iframe can broke on some browser or with user specific settings. This settings was tested with Firefox 81.0.2 to 115 and Chromium 85.0.4183.121 to 119, and119 Edge with default settings. &#039;&#039;&#039;No support on this feature, only community support&#039;&#039;&#039;.}}&lt;br /&gt;
&lt;br /&gt;
===Allow session start in iframe=== &amp;lt;!--T:120--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:121--&amp;gt;&lt;br /&gt;
The session needs to be secure (valid https) , httponly and samesite to None. All settings must be set to all lowercase.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:122--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt; 		 &#039;session&#039; =&amp;gt; array (&lt;br /&gt;
			&#039;sessionName&#039;=&amp;gt;&#039;LS-VBXZZORFJZCAKGYI&#039;,&lt;br /&gt;
			// Uncomment the following lines if you need table-based sessions.&lt;br /&gt;
			// Note: Table-based sessions are currently not supported on MSSQL server.&lt;br /&gt;
			// &#039;class&#039; =&amp;gt; &#039;application.core.web.DbHttpSession&#039;,&lt;br /&gt;
			// &#039;connectionID&#039; =&amp;gt; &#039;db&#039;,&lt;br /&gt;
			// &#039;sessionTableName&#039; =&amp;gt; &#039;{{sessions}}&#039;,&lt;br /&gt;
			&#039;cookieParams&#039; =&amp;gt; array(&lt;br /&gt;
				&#039;secure&#039; =&amp;gt; true,&lt;br /&gt;
				&#039;httponly&#039; =&amp;gt; true,&lt;br /&gt;
				&#039;samesite&#039; =&amp;gt; &#039;None&#039;,&lt;br /&gt;
			),&lt;br /&gt;
		 ),&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Allow csrf cookie in iframe=== &amp;lt;!--T:123--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:124--&amp;gt;&lt;br /&gt;
Same as session: must be secure and sameSite set to None. The whole array must be added at the same level as session.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:125--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt;		&#039;request&#039; =&amp;gt; array(&lt;br /&gt;
			&#039;enableCsrfValidation&#039;=&amp;gt;true,&lt;br /&gt;
			&#039;csrfCookie&#039; =&amp;gt; array(&lt;br /&gt;
				&#039;sameSite&#039; =&amp;gt; &#039;None&#039;,&lt;br /&gt;
				&#039;secure&#039; =&amp;gt; true,&lt;br /&gt;
			),&lt;br /&gt;
		),&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==URL settings== &amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:127--&amp;gt;&lt;br /&gt;
{{Alert|If you need to update only the url for token and other emails, set your [[Optional_settings#Advanced_url_settings|publicurl]] in your config.php file.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:128--&amp;gt;&lt;br /&gt;
To change the default URL settings, update the urlManager:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt;       // Use short URL&lt;br /&gt;
		&#039;urlManager&#039; =&amp;gt; array(&lt;br /&gt;
			&#039;urlFormat&#039; =&amp;gt; &#039;path&#039;,&lt;br /&gt;
			&#039;showScriptName&#039; =&amp;gt; false,&lt;br /&gt;
		),&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:129--&amp;gt;&lt;br /&gt;
You can also add .html after the survey id in the following way:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt;       // Use short URL&lt;br /&gt;
		&#039;urlManager&#039; =&amp;gt; array(&lt;br /&gt;
			&#039;urlFormat&#039; =&amp;gt; &#039;path&#039;,&lt;br /&gt;
			&#039;rules&#039; =&amp;gt; array (&lt;br /&gt;
			    &#039;&amp;lt;sid:\d+&amp;gt;&#039; =&amp;gt; array(&#039;survey/index&#039;,&#039;urlSuffix&#039;=&amp;gt;&#039;.html&#039;,&#039;matchValue&#039;=&amp;gt;true),&lt;br /&gt;
			 ),&lt;br /&gt;
			&#039;showScriptName&#039; =&amp;gt; false,&lt;br /&gt;
		),&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
For more information, check the [http://www.yiiframework.com/doc/guide/1.1/en/topics.url Yii documentation].&lt;br /&gt;
&lt;br /&gt;
==Logging settings== &amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
Yii provides different solutions to generate logs. To find out more about them, check the [http://www.yiiframework.com/doc/guide/1.1/en/topics.logging logging special topic]. LimeSurvey uses &#039;1&#039; or &#039;2&#039; by default, which allows every web user to see the logs. You can create your own settings using Yii directly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
For example, a quick solution to log errors and warnings in files is: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt;&lt;br /&gt;
return array(&lt;br /&gt;
	&#039;components&#039; =&amp;gt; array(&lt;br /&gt;
		/* Other component part here &#039;db&#039; for example */&lt;br /&gt;
		&#039;log&#039; =&amp;gt; array(&lt;br /&gt;
			&#039;routes&#039; =&amp;gt; array(&lt;br /&gt;
				&#039;fileError&#039; =&amp;gt; array(&lt;br /&gt;
					&#039;class&#039; =&amp;gt; &#039;CFileLogRoute&#039;,&lt;br /&gt;
					&#039;levels&#039; =&amp;gt; &#039;warning, error&#039;,&lt;br /&gt;
					&#039;except&#039; =&amp;gt; &#039;exception.CHttpException.404&#039;,&lt;br /&gt;
				),&lt;br /&gt;
			),&lt;br /&gt;
		),&lt;br /&gt;
		/* Other component part here &#039;urlManager&#039; for example */&lt;br /&gt;
	),&lt;br /&gt;
	/* Final part (with &#039;runtimePath&#039; &#039;config&#039; for example) */&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:89--&amp;gt;&lt;br /&gt;
{{Hint|Text=The file is saved by default to &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;limesurvey/tmp/runtime/application.log&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, which is located in the LimeSurvey root folder.}}&lt;br /&gt;
{{Alert|Yii uses runtime path. By default, the logs are web accessible. They may contain a lot of information from your server. It is better to use a directory that cannot be accessed via the web. You can set it in routes or by updating  the [[Optional settings#Yii settings#Runtime path|Runtime path]].}}.&lt;br /&gt;
&lt;br /&gt;
==Runtime path== &amp;lt;!--T:90--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
[http://www.yiiframework.com/doc/guide/1.1/en/basics.convention#directory The runtime path] must be a readable and writable directory for the “web user”. However, the runtime path contains files with potential security information that are located in the public web access area. LimeSurvey collects these files in the temp directory of the LimeSurvey root directory. In order to eliminate the access to such important data, you can set the runtime path outside the public web access by editing the respective lines in the /application/config/config.php file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:92--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt; &lt;br /&gt;
return array(&lt;br /&gt;
  &#039;components&#039; =&amp;gt; array(&lt;br /&gt;
    […]&lt;br /&gt;
    &#039;runtimePath&#039;=&amp;gt;&#039;/var/limesurvey/runtime/&#039;,&lt;br /&gt;
    &#039;config&#039;=&amp;gt;array(&lt;br /&gt;
    […]&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=General settings= &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;sitename&#039;&#039;&#039;: Gives your survey site a name. This name will appear in the survey list overview and in the administration header. The default value is &#039;LimeSurvey&#039; and it can be overridden in the [[Global settings|global settings]] dialog or edited in config.php.&lt;br /&gt;
*&#039;&#039;&#039;siteadminemail:&#039;&#039;&#039; This is the default email address of the site administrator and it is used for system messages and contact options. This setting is used only as default value and can be overridden in the [[Global settings|global settings]] dialog.&lt;br /&gt;
*&#039;&#039;&#039;showEmailInError:&#039;&#039;&#039; Use default site admin email (siteadminemail) for mailto link in error page. Disable to shown only the administrator name. Default to avoid more spam on administration email.&lt;br /&gt;
*&#039;&#039;&#039;siteadminbounce:&#039;&#039;&#039; This is the email address where bounced emails will be sent to. This setting is used only as default value and can be  overridden by the [[Global settings|global settings]] dialog.&lt;br /&gt;
*&#039;&#039;&#039;siteadminname:&#039;&#039;&#039; The real name of the site administrator. This setting is used only as default value and can be overridden in the [[Global settings|global settings]] dialog).&lt;br /&gt;
*&#039;&#039;&#039;proxy_host_name:&#039;&#039;&#039; This is the host name of your proxy server (it has to be mentioned if you are behind a proxy and you want to update LimeSurvey using [[ComfortUpdate|ComfortUpdate]]).&lt;br /&gt;
*&#039;&#039;&#039;proxy_host_port:&#039;&#039;&#039; This is the port of your proxy server (it has to be mentioned if you are behind a proxy and you want to update LimeSurvey  using [[ComfortUpdate|ComfortUpdate]]).&lt;br /&gt;
&lt;br /&gt;
= Security= &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;maxLoginAttempt&#039;&#039;&#039;: This is the number of attempts a user has to enter the correct password before he or she gets her or his IP address blocked/locked out. The default value is 3 and it can be modified from config.php. &lt;br /&gt;
* &#039;&#039;&#039;timeOutTime&#039;&#039;&#039;: If the user enters the password incorrectly for &amp;lt;maxLoginAttempt&amp;gt;, she or he gets locked out for &amp;lt;timeOutTime&amp;gt; seconds. The default value is 10 minutes and it can be modified from config.php.&lt;br /&gt;
* &#039;&#039;&#039;maxLoginAttemptParticipants&#039;&#039;&#039;: This is the number of attempts a participant has to enter a valid token before he or she gets her or his IP address blocked/locked out. The default value is 3 and it can be modified from config.php. &lt;br /&gt;
* &#039;&#039;&#039;timeOutParticipants&#039;&#039;&#039;: If the participant enters the token incorrectly for &amp;lt;maxLoginAttemptParticipants&amp;gt;, she or he gets locked out for &amp;lt;timeOutParticipants&amp;gt; seconds. The default value is 10 minutes and it can be modified from config.php.&lt;br /&gt;
* &#039;&#039;&#039;surveyPreview_require_Auth&#039;&#039;&#039;: Set to true by default. If you set this to &#039;false&#039;, any person can test your survey using the survey URL, without logging in to the administration panel and without having to activate the survey first. This setting is a default value and can be overridden in the [[Global settings|global settings]] dialog or edited in config.php.&lt;br /&gt;
* &#039;&#039;&#039;usercontrolSameGroupPolicy&#039;&#039;&#039;: Set to true by default. By default, non-admin users defined in the LimeSurvey management interface will only be able to see users they create or users that belong to at least one same group. The default value can be overridden in the [[Global settings|global settings]] dialog or edited in config.php.&lt;br /&gt;
*&#039;&#039;&#039;filterxsshtml:&#039;&#039;&#039; This setting enables the filtering of suspicious html tags located within surveys, groups, and questions and answer texts in the administration interface. Leave this to &#039;false&#039; only if you absolutely trust the users you created for the administration of LimeSurvey and if you want to allow these users to be able to use Javascript, Flash Movies, etc.. &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;The super admins never have their HTML filtered&amp;lt;/span&amp;gt;.  The default value can be overridden in the [[Global settings|global settings]] dialog or edited in config.php.&lt;br /&gt;
*&#039;&#039;&#039;demoMode:&#039;&#039;&#039; If this option is set to &#039;true&#039; in config.php, then LimeSurvey will go into demo mode. The demo mode changes the following things:&lt;br /&gt;
** Disables admin user&#039;s details and password changing;&lt;br /&gt;
** Disables the upload of files on the template editor;&lt;br /&gt;
** Disables sending email invitations and reminders;&lt;br /&gt;
** Disables the creation of a database dump;&lt;br /&gt;
** Disables the ability to modify the following global settings: site name, default language, default HTML editor mode, XSS filter.&lt;br /&gt;
*&#039;&#039;&#039;forcedsuperadmin:&#039;&#039;&#039; Array of user id whith all rights on all LimeSurvey. This settings can only be updated in config.php file.  This user&#039;s rights can not be edited in [[Manage_users#Set_global_permissions_for_a_user|global permissions for a user]] even by other forced super administrator. By default : user with this rights is user with id : 1. The first user created just after installation.&lt;br /&gt;
*&#039;&#039;&#039;force_ssl:&#039;&#039;&#039; forces LimeSurvey to run through HTTPS or to block HTTPS. See [https://manual.limesurvey.org/Global_settings#Security Force HTTPS] in global settings admin GUI.&lt;br /&gt;
*&#039;&#039;&#039;ssl_emergency_override:&#039;&#039;&#039; This setting forces SSL off. If You&#039;ve turned HTTPS/SSL on in the global settings but your server doesn&#039;t have HTTPS enabled, the only way to turn it off is by changing a value in the database directly. This allows you to force HTTPS off while you change the global settings for Force Secure. This should always be false except in emergencies where you change it to true until you fix the problem. This setting can be only set via config.php file.&lt;br /&gt;
*&#039;&#039;&#039;ssl_disable_alert:&#039;&#039;&#039; Disable alert for super-admin about unforced SSL, if you really can not or don&#039;t want to force ssl.  This setting can be only set via config.php file.&lt;br /&gt;
&lt;br /&gt;
== Allowed file upload ==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;allowedthemeimageformats&#039;&#039;&#039; : Image file types allowed to be uploaded in the themes section., By default SVG file are disabled due to potential XSS attack.&lt;br /&gt;
*&#039;&#039;&#039;allowedthemeuploads&#039;&#039;&#039; : Other file types allowed to be uploaded in the themes section (zip file)&lt;br /&gt;
*&#039;&#039;&#039;allowedfileuploads&#039;&#039;&#039; : file type allowed for file uploads&lt;br /&gt;
*&#039;&#039;&#039;allowedresourcesuploads&#039;&#039;&#039; : File types allowed to be uploaded in the resources sections, and with the HTML Editor&lt;br /&gt;
*&#039;&#039;&#039;allowedpluginuploads&#039;&#039;&#039; : File type allowed when upload plugin zip file.&lt;br /&gt;
&lt;br /&gt;
Just enter a string of comma separated extensions. For example: &amp;lt;pre&amp;gt;&#039;allowedthemeimageformats&#039; =&amp;gt; &#039;jpg,jpeg,gif,png,webm,svg&#039;,&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Warning: Always be careful when allowing file uploads. Malicious activities could be expected.&lt;br /&gt;
&lt;br /&gt;
== Plugins ==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;usePluginWhitelist&#039;&#039;&#039; : If true plugins that are not in the allowlist (see &#039;pluginWhitelist&#039;) cannot be installed nor loaded. This may disable already installed plugins.&lt;br /&gt;
*&#039;&#039;&#039;pluginWhitelist&#039;&#039;&#039; : List of plugin names allowed to be installed and loaded when &#039;usePluginWhitelist&#039; is true. Core plugins are implicitly allowlisted.&lt;br /&gt;
*&#039;&#039;&#039;corePluginBlacklist&#039;&#039;&#039; : List of core plugin names forbidden when &#039;usePluginWhitelist&#039; is true.&lt;br /&gt;
*&#039;&#039;&#039;disablePluginUpload&#039;&#039;&#039; :  When this setting is true, the &amp;quot;Plugin Upload&amp;quot; feature is disabled&lt;br /&gt;
&lt;br /&gt;
= Resources= &amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;sessionlifetime:&#039;&#039;&#039; Defines the time in seconds after which a survey session expires. It applies only if you are using database sessions. If you do use database sessions, change the parameter in config.php or override the default value from the [[Global settings|global settings]] dialog.&lt;br /&gt;
*&#039;&#039;&#039;memorylimit:&#039;&#039;&#039; This determines how much memory LimeSurvey can access. &#039;128 MB&#039; is the minimum (MB=Megabyte) recommended. If you receive time out errors or have problems generating statistics or exporting files, raise this limit to &#039;256 MB&#039; or higher. If your web server has set a higher limit in config.php, then this setting will be ignored. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;warningbox&amp;quot;&amp;gt;&#039;&#039;&#039;Please bear in mind that such local settings can always be overruled by the changes done in the global settings dialog&#039;&#039;&#039;.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
To increase the memory limit to 128M you could also try adding:&lt;br /&gt;
*memory_limit = 128M to your server&#039;s main php.ini file (recommended, if you have access)&lt;br /&gt;
*memory_limit = 128M to a php.ini file in the LimeSurvey root&lt;br /&gt;
*php_value memory_limit 128M in a .htaccess file in the LimeSurvey root&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:94--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;max_execution_time:&#039;&#039;&#039; Set the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error. To be allowed to export big survey data and statistics, LimeSurvey try to set it by default to 1200 seconds. You can set a bigger time or a lower time if needed. Only accessible via php config file.&lt;br /&gt;
&lt;br /&gt;
=Appearance= &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;dropdownthreshold&#039;&#039;&#039;{{ObsoleteIn|2.50}}: When &amp;quot;R&amp;quot; is selected for &amp;lt;code&amp;gt;$dropdowns&amp;lt;/code&amp;gt;, the administrator is allowed to set a maximum number of options that will be displayed as radio buttons, before converting back to a dropdown list. If there is a question that has a large number of options, displaying all of them at once as radio buttons can look unwieldy, and can become counter-intuitive to users. Setting this to a maximum of, say 25 (which is the default) means that large lists are easier to be used by the administrators for the survey participant.&lt;br /&gt;
*&#039;&#039;&#039;repeatheadings:&#039;&#039;&#039; With the Array question type, you&#039;ll often have a lot of subquestions, which - when displayed on screen - take up more than one page. This setting lets you decide how many subquestions should be displayed before repeating the header information for the question. A good setting for this is around 15. If you don&#039;t want the headings to repeat at all, set this to 0. This setting is overridden in the [[Global settings|global settings]] dialog {{NewIn|2.05}}.&lt;br /&gt;
*&#039;&#039;&#039;minrepeatheadings:&#039;&#039;&#039; The minimum number of remaining subquestions that are required before repeating the headings in Array questions. The default value is 3 and it can be edited in config.php. &lt;br /&gt;
*&#039;&#039;&#039;defaulttemplate:&#039;&#039;&#039; This setting specifies the default theme used for the &#039;public list&#039; of surveys. This setting can be overridden in the [[Global settings|global settings]] dialog or edited in config.php.&lt;br /&gt;
*&#039;&#039;&#039;defaulthtmleditormode:&#039;&#039;&#039; Sets the default mode for the integrated HTML editor. This setting can be overridden in the [[Global settings|global settings]] dialog or edited in config.php. The valid settings are:&lt;br /&gt;
** &#039;inline&#039; - Inline replacement of fields by an HTML editor. Slow but convenient and user friendly;&lt;br /&gt;
** &#039;popup&#039; - Adds an icon that runs the HTML editor in a popup if needed. Faster, but HTML code is displayed in the form;&lt;br /&gt;
** &#039;none&#039;-  No HTML editor;&lt;br /&gt;
*&#039;&#039;&#039;column_style:&#039;&#039;&#039; Defines how columns are rendered for survey answers when using [[QS:Display_columns|display_columns]]. It can be edited in the config.php file. The valid settings are: &lt;br /&gt;
** &#039;css&#039; - it uses one of the various CSS methods to create columns (see the template style sheet for details);&lt;br /&gt;
** &#039;ul&#039; - the columns are rendered as multiple floated unordered lists (default);&lt;br /&gt;
** &#039;table&#039; - it uses conventional-tables-based layout;&lt;br /&gt;
** NULL - it disables the use of columns.&lt;br /&gt;
&lt;br /&gt;
=Language &amp;amp; time= &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;defaultlang:&#039;&#039;&#039; 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 survey list. This setting can be overridden in the [[Global settings|global settings]] dialog or edited in config.php.&lt;br /&gt;
*&#039;&#039;&#039;timeadjust:&#039;&#039;&#039; 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 I use a US web server. The web server is 14 hours behind my local time zone. So my setting here is &amp;quot;14&amp;quot;. In other words, it adds 14 hours to the web servers time. This setting is particularly important when surveys timestamp the responses. This setting can be overridden in the [[Global settings|global settings]] dialog or edited in config.php.&lt;br /&gt;
&lt;br /&gt;
=Survey behavior= &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;deletenonvalues:&#039;&#039;&#039; Use this feature with caution. By default (a value of 1), irrelevant questions are NULLed in the database. This ensures that the data in your database is internally consistent. However, there are rare cases where you might want to hold onto irrelevant values, in which case you can set the value to 0. For example, you ask a male person his gender, and he accidentally says &#039;female&#039; and then answers some female-specific questions (questions that are conditioned on being female, so are only relevant for women). Then, he realizes his mistake, backs up, sets the gender to &#039;male&#039;, and continues with the survey.  Now, the female-specific questions are irrelevant. If &amp;lt;code&amp;gt;$deletenonvalues==1&amp;lt;/code&amp;gt;, those irrelevant values will be cleared (NULLed) in the database. If &amp;lt;code&amp;gt;$deletenonvalues==0&amp;lt;/code&amp;gt;, his erroneous answers will not be deleted, so they will still be present in the database when you analyze it. &lt;br /&gt;
*&#039;&#039;&#039;shownoanswer:&#039;&#039;&#039; When a radio button/select type question that contains editable answers (i.e.: List, Array questions) is not mandatory and &#039;shownoanswer&#039; is set to 1, an additional &#039;No answer&#039; entry is shown - so that participants may choose to not answer the question. Some people prefer this not to be available. This setting can be overridden from the [[Global settings|global settings]] dialog or edited in config.php. Valid values are:&lt;br /&gt;
**&#039;0&#039;: No; &lt;br /&gt;
**&#039;1&#039;: Yes;&lt;br /&gt;
**&#039;2&#039;: The Survey admin can choose.  &lt;br /&gt;
*&#039;&#039;&#039;printanswershonorsconditions:&#039;&#039;&#039; This setting determines if the printanswers feature will display entries from questions that were hidden by conditions-branching (Default: 1 = hide answers from questions hidden by conditions).&lt;br /&gt;
*&#039;&#039;&#039;hide_groupdescr_allinone:&#039;&#039;&#039; This setting is relevant for all-in-one surveys using conditions . When this is set to &#039;true&#039;, the group name and description is hidden if all questions in the group are hidden. The default value is &#039;true&#039;  - hides group name and description when all questions in the group are hidden by conditions. It can be edited in config.php.&lt;br /&gt;
*&#039;&#039;&#039;showpopups:&#039;&#039;&#039;  Show popup messages if mandatory or conditional questions have not been answered correctly:&lt;br /&gt;
**   &#039;2&#039; = defined by Theme option (default)&lt;br /&gt;
**   &#039;1&#039;= show popup message;&lt;br /&gt;
**   &#039;0&#039;= show message on page instead;&lt;br /&gt;
** &#039;-1&#039;= do not show the message at all (in this case, users will still see the question-specific tips indicating which questions must be answered).&lt;br /&gt;
&lt;br /&gt;
== Numerical question type behavior  == &amp;lt;!--T:111--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;bFixNumAuto:&#039;&#039;&#039; Numeric fields can be automatically filtered to remove all non numeric values. By default this is enable, you can disable it globally. This settings is related to &#039;&#039;Fix automatically numeric value&#039;&#039; in core theme options. It was enable for &#039;&#039;Yes&#039;&#039;, disable for &#039;&#039;Only for expression&#039;&#039; and &#039;&#039;No&#039;&#039;.&lt;br /&gt;
*&#039;&#039;&#039;bNumRealValue:&#039;&#039;&#039; Numeric fields used in expression manager can be fixed or not. It&#039;s fixed by default. If NUMERIC is a numerical question : disable or 0 : {NUMERIC} with bad caracters send &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;, enable or 1 : {NUMERIC} send all character entered. This settings is related to &#039;&#039;Fix automatically numeric value&#039;&#039; in core theme options. It was enable for &#039;&#039;Yes&#039;&#039; and &#039;&#039;Only for expression&#039;&#039; and  disable for &#039;&#039;No&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=Development and debugging= &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;debug:&#039;&#039;&#039; With this setting, you set the PHP error reporting to E_ALL. This means that every little notice, warning or error related to the script is shown. This setting should be only switched to &#039;1&#039; if you are trying to debug the application for any reason. If you are a developer, switch it to &#039;2&#039;. Don&#039;t switch it to &#039;1&#039; or &#039;2&#039; in production since it might cause path disclosure. The default value is &#039;0&#039; and it can be edited in config.php. &lt;br /&gt;
*&#039;&#039;&#039;debugsql:&#039;&#039;&#039; Activate this setting if you want to display all SQL queries executed for the script on the bottom of each page. Very useful for the optimization of the the number of queries. In order to activate it, change the default value to &#039;1&#039; from the config.php file.&lt;br /&gt;
*&#039;&#039;&#039;use_asset_manager:&#039;&#039;&#039; By default : debug mode disable asset manager, you can allow you to use asse manager with debug mode enable. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
In the case in which you experience an error in the application, we strongly recommend to activate the debug setting in order to get a more detailed error that you can submit with the bug report:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt;&lt;br /&gt;
    &#039;config&#039;=&amp;gt;array(&lt;br /&gt;
        &#039;debug&#039;=&amp;gt;2,&lt;br /&gt;
        &#039;debugsql&#039;=&amp;gt;0,&lt;br /&gt;
    )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:126--&amp;gt;&lt;br /&gt;
If you work on plugin and need a quick way to dump variables on screen : you can use traceVar function. If debug is set : this function use CWebLogRoute to be shown on HTML page. Usage &amp;lt;code&amp;gt;traceVar($MyVariable)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Email settings= &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
All the settings from below can be overridden in the [[Global settings|global settings]] dialog.&lt;br /&gt;
*&#039;&#039;&#039;emailmethod:&#039;&#039; This determines how email messages are being sent. The following options are available:&lt;br /&gt;
**&#039;mail:&#039; it uses internal PHP mailer;&lt;br /&gt;
**&#039;sendmail:&#039; it uses sendmail mailer;&lt;br /&gt;
**&#039;smtp:&#039; it uses SMTP relaying. Use this setting when you are running LimeSurvey on a host that is not your mail server.&lt;br /&gt;
*&#039;&#039;&#039;emailsmtphost:&#039;&#039; If you use &#039;smtp&#039; as &amp;lt;code&amp;gt;$emailmethod&amp;lt;/code&amp;gt;, 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 = &#039;smtp.gmail.com:465&#039;.&lt;br /&gt;
*&#039;&#039;emailsmtpuser:&#039;&#039; If your SMTP-server needs authentication then set this to your user name, otherwise it must be blank.&lt;br /&gt;
*&#039;&#039;emailsmtppassword:&#039;&#039; If your SMTP-server needs authentication then set this to your password, otherwise it must be blank.&lt;br /&gt;
*&#039;&#039;emailsmtpssl:&#039;&#039; Set this to &#039;ssl&#039; or &#039;tls&#039; to use SSL/TLS for SMTP connection.&lt;br /&gt;
*&#039;&#039;maxemails:&#039;&#039; 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 &#039;send email invitation&#039; button from the token control toolbar (not the button situated on the right of each token) sends the &amp;lt;maxemails&amp;gt; number of invitations, then it displays a list of the addresses of the recipients and a warning that &#039;&#039;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.&#039;&#039; and provides a &amp;quot;continue button&amp;quot; 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 out and come back at a later time to send the next batch of invites.&lt;br /&gt;
&lt;br /&gt;
= Statistics and response browsing= &amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;filterout_incomplete_answers:&#039;&#039;&#039; Control the default behavior of filtering incomplete answers when browsing or analyzing responses. For a discussion on incomplete responses see our [[Responses &amp;amp; statistics#Responses summary|browsing survey results wiki]]. Since these records can corrupt the statistics, an option is given to switch this filter on or off in several GUI forms. The parameter can be edited in the config.php. The following options are available:&lt;br /&gt;
**&#039;show&#039;: Allows you to visualize both complete and incomplete answers;&lt;br /&gt;
**&#039;filter&#039;: It shows only complete answers;&lt;br /&gt;
**&#039;incomplete&#039;: Show only incomplete answers.&lt;br /&gt;
*&#039;&#039;&#039;strip_query_from_referer_url&#039;&#039;&#039;: This setting determines if the referrer URL saves the parameter or not. The default value is &#039;false&#039; (in this case, the referrer URL saves all parameters). Alternatively, this value can be set to &#039;true&#039; and the parameter part of the referrer URL will be removed.&lt;br /&gt;
*&#039;&#039;&#039;showaggregateddata:&#039;&#039;&#039; when activated, additional statistical values such as the arithmetic mean and standard deviation are shown. Furthermore, the data is aggregated to get a faster overview. For example, results of scale 1+2 and 4+5 are added to have a general ranking like &amp;quot;good&amp;quot; (1/2), &amp;quot;average&amp;quot; (3) and &amp;quot;bad&amp;quot; (4/5). This only affects question types  &amp;quot;A&amp;quot; (5 point array) and &amp;quot;5&amp;quot; (5 point choice).&lt;br /&gt;
* &#039;&#039;&#039;PDF Export Settings:&#039;&#039;&#039; This feature activates PDF export for printable surveys and Print Answers. The PDF export function is totally experimental and the output is far from being perfect. Unfortunately, no support can be given at the moment - if you want to help to fix it, please get in touch with us.&lt;br /&gt;
**&#039;usepdfexport&#039;: Set &#039;0&#039; to disable and &#039;1&#039; to enable;&lt;br /&gt;
**&#039;pdfdefaultfont&#039;: It represents the default font that will be used by the pdf export function. The default value is &#039;auto&#039;. To change it, you have to set it to one of the [https://tcpdf.org/docs/fonts/ PDF core fonts]. &lt;br /&gt;
**&#039;alternatepdffontfile&#039;: It&#039;s an array with language keys and their corresponding font. The default font for each language can be replaced in the config.php file;&lt;br /&gt;
**&#039;pdffontsize&#039;: it shows the font size for normal texts; For the title of the survey, it is &amp;lt;pdffontsize&amp;gt;+4, while for the group title is &amp;lt;pdffontsize&amp;gt;+2. It can be edited in the config.php file or from the [Global settings|global settings]] dialog;&lt;br /&gt;
**&#039;notsupportlanguages&#039;: it includes a list with the languages for which no PDF font was found. The list includes Amharic (&#039;am&#039;), Sinhala (&#039;si&#039;), and Thai (&#039;th&#039;), and it can be found in the config-defaults.php file;&lt;br /&gt;
**&#039;pdforientation&#039;: Set &#039;L&#039; for Landscape or &#039;P&#039; for portrait format. It can be edited from the config.php file.&lt;br /&gt;
*&#039;&#039;&#039;Graph setting&#039;&#039;&#039;&lt;br /&gt;
**&#039;chartfontfile&#039;: Sets the font file name that is used to create the statistical charts. The file has to be located in the fonts directory, located in the LimeSurvey root folder. It can be edited in the config.php file;&lt;br /&gt;
**&#039;alternatechartfontfile&#039;: It&#039;s an array with language keys and their corresponding font. It can be edited in the config.php file.&lt;br /&gt;
*&#039;&#039;&#039;showsgqacode:&#039;&#039;&#039; This setting is used at the printable survey feature and defaults to &#039;false&#039;&#039;. If you set showsgqacode = &#039;true&#039;;, the IDs of 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.&lt;br /&gt;
&lt;br /&gt;
= [[LDAP settings]]= &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
As this is an extensive topic we have moved [[LDAP settings]] to [[LDAP settings|another page.]]&lt;br /&gt;
&lt;br /&gt;
= Authentication= &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
Starting with LimeSurvey 2.05, authentication will be handled by plugins. As a result, the information below might be outdated. See [[Plugins|the plugins wiki]] for most up to date information.&lt;br /&gt;
&lt;br /&gt;
== Authentication delegation to the webserver== &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
System administrators may want to have their &#039;&#039;&#039;survey administrators&#039;&#039;&#039; 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 web server software to use this external authentication system, and then ask LimeSurvey to trust the user identity reported by the web server. In order to enable this feature, you have to:&lt;br /&gt;
* set &#039;&#039;&#039;auth_webserver&#039;&#039;&#039; to &#039;true&#039; in config.php;&lt;br /&gt;
* enable authentication from the web server side.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
Please note that:&lt;br /&gt;
* LimeSurvey will then bypass its own authentication process (by using the login name reported by the web server without asking for a password);&lt;br /&gt;
* this can only replace the LimeSurvey GUI authentication system, &#039;&#039;&#039;not the survey invitation system&#039;&#039;&#039; (participant interface).&lt;br /&gt;
&lt;br /&gt;
== Authentication delegation with no automatic user import== &amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
Please note that &amp;lt;u&amp;gt;Authentication Delegation doesn&#039;t bypass the LimeSurvey authorization system by default&amp;lt;/u&amp;gt; - meaning that, even if you don&#039;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 the administration panel.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
A user is then granted access to LimeSurvey if and only if:&lt;br /&gt;
* he has been authenticated to the web server;&lt;br /&gt;
* 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).&lt;br /&gt;
&lt;br /&gt;
== Authentication delegation with automatic user import== &amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
When managing a huge user database, it is sometimes easier to auto-import users in the LimeSurvey database:&lt;br /&gt;
*&#039;&#039;&#039;auth_webserver_autocreate_user&#039;&#039;&#039;: If set to &#039;true&#039;, LimeSurvey will try to auto-import users authenticated by the web server but not already in its users DB.&lt;br /&gt;
*&#039;&#039;&#039;auth_webserver_autocreate_profile&#039;&#039;&#039;: An array describing the default profile that will be assigned to the user, including the full (fake) name, email, and privileges.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
If you want to customize the user profile so that it matches the logged-in user, you&#039;ll have to develop a simple function called &#039;&#039;&#039;hook_get_autouserprofile&#039;&#039;&#039; - with this function you can retrieve from a central user account database (for instance, from a LDAP directory) the true full name, names, and email of a particular user. You can even customize his privileges on the system based on the groups he is allocated in the external database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
The &#039;&#039;&#039;hook_get_auth_webserver_profile&#039;&#039;&#039; function takes the user login name as the only argument and can return:&lt;br /&gt;
* False or an empty array - in this case the user is denied access to LimeSurvey;&lt;br /&gt;
* an array containing all common userprofile entries as described in the &amp;lt;code&amp;gt;$WebserverAuth_autouserprofile&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;function hook_get_auth_webserver_profile($user_name)&lt;br /&gt;
{&lt;br /&gt;
     // Retrieve user&#039;s data from your database backend (for instance LDAP) here&lt;br /&gt;
     ... get $user_name_from_backend&lt;br /&gt;
     ... get $user_email_from_backend&lt;br /&gt;
     ... get $user_lang_from_backend&lt;br /&gt;
     ... from groups defined in your backend set $user_admin_status_frombackend_0_or_1&lt;br /&gt;
     return Array(&lt;br /&gt;
                     &#039;full_name&#039; =&amp;gt; &amp;quot;$user_name_from_backend&amp;quot;,&lt;br /&gt;
                     &#039;email&#039; =&amp;gt; &amp;quot;$user_email_from_backend&amp;quot;,&lt;br /&gt;
                     &#039;lang&#039; =&amp;gt; &#039;$user_lang_from_backend&#039;,&lt;br /&gt;
                     &#039;htmleditormode&#039; =&amp;gt; &#039;inline&#039;,&lt;br /&gt;
                     &#039;templatelist&#039; =&amp;gt; &#039;default,basic,MyOrgTemplate&#039;,&lt;br /&gt;
                     &#039;create_survey&#039; =&amp;gt; 1,&lt;br /&gt;
                     &#039;create_user&#039; =&amp;gt; 0,&lt;br /&gt;
                     &#039;delete_user&#039; =&amp;gt; 0,&lt;br /&gt;
                     &#039;superadmin&#039; =&amp;gt; $user_admin_status_frombackend_0_or_1,&lt;br /&gt;
                     &#039;configurator&#039; =&amp;gt;0,&lt;br /&gt;
                     &#039;manage_template&#039; =&amp;gt; 0,&lt;br /&gt;
                     &#039;manage_label&#039; =&amp;gt; 0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
     // If user should be denied access, return an empty array&lt;br /&gt;
&lt;br /&gt;
     // return Array();&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
{{Alert|The optionnal &#039;hook_get_auth_webserver_profile&#039; function is for advanced user usage only! For further details, please read the comments from the config-defaults.php file.}}&lt;br /&gt;
&lt;br /&gt;
== User name mapping== &amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
In the case in which 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 &#039;&#039;&#039;auth_webserver_user_map&#039;&#039;&#039; parameter. For instance, imagine you don&#039;t have an &#039;admin&#039; user name defined in your external authentication database. Then, in order to login to LimeSurvey as admin, you&#039;ll have to map your external user name (let&#039;s call it &#039;myname&#039;) to the admin login name in LimeSurvey. The corresponding setup is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&#039;config&#039;=&amp;gt;array(&lt;br /&gt;
...&lt;br /&gt;
&#039;auth_webserver_user_map&#039; =&amp;gt; array (&#039;myname&#039; =&amp;gt; &#039;admin&#039;);&lt;br /&gt;
)&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
After a successful authentication with the &#039;myname&#039; login and web server password, you&#039;ll be directly authorized to use LimeSurvey as the &#039;admin&#039; user. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
This has serious security implications, so use it with care. Also, protect your config.php from write access by the web server.&lt;br /&gt;
&lt;br /&gt;
== Use one-time passwords== &amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
A user can open the LimeSurvey login page at default.com/limesurvey/admin and type the username and the one-time password which was previously written into the users table (column one_time_pw) by an external application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
This setting has to be turned on config.php file to enable the usage of one-time passwords (default = false).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt;&lt;br /&gt;
    &#039;config&#039;=&amp;gt;array(&lt;br /&gt;
        &#039;debug&#039;=&amp;gt;0,&lt;br /&gt;
        &#039;debugsql&#039;=&amp;gt;0,&lt;br /&gt;
        &#039;use_one_time_passwords&#039;=&amp;gt;true,&lt;br /&gt;
    )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:96--&amp;gt;&lt;br /&gt;
More information can be found in the [[Manage users#Use one-time passwords|&amp;quot;Manage Users&amp;quot; section]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Encryption settings {{NewIn|4.0.0}} = &amp;lt;!--T:113--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:114--&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=Once set, encryption keys should never be changed, otherwise all encrypted data could be lost !}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:115--&amp;gt;&lt;br /&gt;
{{Note|When update or install, this parameters was generated by LimeSurvey and set in &amp;lt;code&amp;gt;application/config/security.php&amp;lt;/code&amp;gt; file. You can move this settings in config.php if you want or leave in security.php.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:116--&amp;gt;&lt;br /&gt;
See [[data encryption]] for detail on this feature.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:117--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;encryptionkeypair&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;encryptionpublickey&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;encryptionsecretkey&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Advanced url settings= &amp;lt;!--T:130--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:131--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;publicurl:&#039;&#039;&#039; This should be set to the URL location of your &#039;public scripts&#039;. The public scripts are those located in the &amp;quot;limesurvey&amp;quot; folder (or whatever name you gave to the directory that all the other scripts and directories are kept in). &#039;&#039;&#039;This settings is available in config.php and it is used when LimeSurvey need an absolute url (for example when token emails are sent).&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;homeurl:&#039;&#039;&#039; This should be set to the URL location of your administration scripts. These are located in the /limesurvey/admin folder. This should be set to the WEB URL location - for example, &#039;&#039;http://www.example.com/limesurvey/html/admin&#039;&#039;. Don&#039;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 - &amp;lt;code&amp;gt;{$_SERVER&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&#039;SERVER_NAME&#039;]}&amp;lt;/code&amp;gt;. &#039;&#039;&#039;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.&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;tempurl:&#039;&#039;&#039; This should be set to the URL location of your &amp;quot;/limesurvey/tmp&amp;quot; directory - or to a directory in which you would like LimeSurvey to use to serve temporary files. &lt;br /&gt;
*&#039;&#039;&#039;uploadurl:&#039;&#039;&#039; This should be set to the URL location of your &amp;quot;/limesurvey/upload&amp;quot; directory - or to a directory in which you would like LimeSurvey to use to serve uploaded files. This allow you to set uploaded files on another url domain.&lt;br /&gt;
&lt;br /&gt;
= Advanced path settings= &amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:132--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;homedir:&#039;&#039;&#039; This should be set to the physical disk location of your administration scripts - for example &amp;quot;/home/usr/htdocs/limesurvey/admin&amp;quot;. Don&#039;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  &amp;lt;code&amp;gt;{$_SERVER&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&#039;DOCUMENT_ROOT&#039;]}&amp;lt;/code&amp;gt;. 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.&lt;br /&gt;
*&#039;&#039;&#039;publicdir:&#039;&#039;&#039; This should be set to the physical disk location of your &#039;public scripts&#039;.&lt;br /&gt;
*&#039;&#039;&#039;tempdir:&#039;&#039;&#039; This should be set to the physical disk location of your /limesurvey/tmp directory so that the script can read and write files.&lt;br /&gt;
*&#039;&#039;&#039;uploaddir:&#039;&#039;&#039; This should be set to the physical disk location of your /limesurvey/upload directory so that the script can read and write files.&lt;br /&gt;
*&#039;&#039;&#039;sCKEditorURL:&#039;&#039;&#039; url of the fckeditor script.&lt;br /&gt;
*&#039;&#039;&#039;fckeditexpandtoolbar:&#039;&#039;&#039; defines if the fckeditor toolbar should be opened by default.&lt;br /&gt;
*&#039;&#039;&#039;pdfexportdir:&#039;&#039;&#039; This is the directory with the tcpdf.php extensiontcpdf.php.&lt;br /&gt;
*&#039;&#039;&#039;pdffonts:&#039;&#039;&#039; This is the directory for the TCPDF fonts.&lt;br /&gt;
&lt;br /&gt;
= Other advanced settings= &amp;lt;!--T:108--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Upload files== &amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:110--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;allowedthemeuploads:&#039;&#039;&#039; File types allowed to be uploaded in theme editor&lt;br /&gt;
*&#039;&#039;&#039;allowedresourcesuploads:&#039;&#039;&#039; File types allowed to be uploaded in the resources sections, and with the HTML Editor&lt;br /&gt;
*&#039;&#039;&#039;allowedfileuploads&#039;&#039;&#039; {{NewIn|4.0.0}} Global restriction on file type to be uploaded&lt;br /&gt;
*&#039;&#039;&#039;magic_database:&#039;&#039;&#039; {{NewIn|3.17.17}} Allow to use a different MIME database for [https://www.php.net/manual/en/function.finfo-open.php finfo_open]. Can be updated only in config.php file. Example : &amp;lt;code&amp;gt;/usr/share/misc/magic.mgc&amp;lt;/code&amp;gt; for redhat based linux.&lt;br /&gt;
*&#039;&#039;&#039;magic_file:&#039;&#039;&#039; {{NewIn|3.17.17}} Allow to use a different file to get the array of extension by mime type than the [https://github.com/LimeSurvey/LimeSurvey/blob/master/application/core/utils/fileExtensions.php included one]. Must be a PHP file return an array. Can be updated only in config.php file.&lt;br /&gt;
&lt;br /&gt;
== Update == &amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:107--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;updatable:&#039;&#039;&#039; This setting is in version.php. Can be true or false. If you set to true : when an super admin user log in : LimeSurvey checks if an update is available and show you a warning. If set to false : no check is done and you can&#039;t use ComfortUpdate. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tassoman</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Debugging&amp;diff=379453</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Debugging&amp;diff=379453"/>
		<updated>2024-12-19T23:46:57Z</updated>

		<summary type="html">&lt;p&gt;Tassoman: moah fixing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Debugging=&lt;br /&gt;
&lt;br /&gt;
Working with a framework can sometimes be hard to debug. In Yii we have some tools at our disposal to help debug the application. The very first thing to do is modify &#039;&#039;&#039;application/config/config.php&#039;&#039;&#039; and to set [[Optional_settings#Development_and_debugging|debug = 2]] at the end. Now we get more errors presented and we can use a trace function to see what a variable&#039;s content is at any time during program execution.&lt;br /&gt;
&lt;br /&gt;
If you want to see what queries are sent to the database, you can also enable debugsql by setting it to 1.&lt;br /&gt;
&lt;br /&gt;
To do a dump of a variable you can use the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;$variable = $this-&amp;gt;someMethod();  // What would this return?&lt;br /&gt;
&lt;br /&gt;
Yii::trace(CVarDumper::dumpAsString($variable), &#039;vardump&#039;);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make use of the &amp;lt;nowiki&amp;gt;Yii::trace()&amp;lt;/nowiki&amp;gt; method, and pass it the result of the static call to &amp;lt;nowiki&amp;gt;CVarDumper::dumpAsString()&amp;lt;/nowiki&amp;gt;. What it does is is similar to var_dump but it allows a little more control if you need if. The second parameter &#039;vardump&#039; makes sure our messages gets logged. All this is a lot of typing and since programmers are lazy, we created a global function to save you some trouble. Instead of the lines above you can also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;traceVar($variable);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a bonus you will also get the file and line that called the traceVar function to assist in debugging.&lt;/div&gt;</summary>
		<author><name>Tassoman</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Debugging&amp;diff=379452</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Debugging&amp;diff=379452"/>
		<updated>2024-12-19T23:46:19Z</updated>

		<summary type="html">&lt;p&gt;Tassoman: fixing syntax&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Debugging=&lt;br /&gt;
&lt;br /&gt;
Working with a framework can sometimes be hard to debug. In Yii we have some tools at our disposal to help debug the application. The very first thing to do is modify &#039;&#039;&#039;application/config/config.php&#039;&#039;&#039; and to set [[Optional_settings#Development_and_debugging|debug = 2]] at the end. Now we get more errors presented and we can use a trace function to see what a variable&#039;s content is at any time during program execution.&lt;br /&gt;
&lt;br /&gt;
If you want to see what queries are sent to the database, you can also enable debugsql by setting it to 1.&lt;br /&gt;
&lt;br /&gt;
To do a dump of a variable you can use the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;$variable = $this-&amp;gt;someMethod();  // What would this return?&lt;br /&gt;
&lt;br /&gt;
Yii::trace(CVarDumper:dumpAsString($variable), &#039;vardump&#039;);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We make use of the &amp;lt;nowiki&amp;gt;Yii::trace()&amp;lt;/nowiki&amp;gt; method, and pass it the result of the static call to &amp;lt;nowiki&amp;gt;CVarDumper::dumpAsString()&amp;lt;/nowiki&amp;gt;. What it does is is similar to var_dump but it allows a little more control if you need if. The second parameter &#039;vardump&#039; makes sure our messages gets logged. All this is a lot of typing and since programmers are lazy, we created a global function to save you some trouble. Instead of the lines above you can also use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;traceVar($variable);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a bonus you will also get the file and line that called the traceVar function to assist in debugging.&lt;/div&gt;</summary>
		<author><name>Tassoman</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Yii&amp;diff=173685</id>
		<title>Yii</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Yii&amp;diff=173685"/>
		<updated>2022-05-11T13:26:19Z</updated>

		<summary type="html">&lt;p&gt;Tassoman: /* Yii */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Yii=&lt;br /&gt;
&lt;br /&gt;
Table of contents:{toc}&lt;br /&gt;
&lt;br /&gt;
This page is intended to help people get started on the Yii branch of the code and to provide some guidance in coding. At the moment I am just getting started with the branch myself and run into some stuff I think needs to be adressed. Please feel free to help improve this page and correct me if I&#039;m wrong ;-)&lt;br /&gt;
&lt;br /&gt;
First some useful links:&lt;br /&gt;
&lt;br /&gt;
[https://www.yiiframework.com/doc/guide/1.1/ Userguide of the Yii framework v1.1]&lt;br /&gt;
&lt;br /&gt;
[http://www.yiiframework.com/wiki/83/netbeans-ide-and-yii-projects/ Some hints on code completion in NetBeans IDE]&lt;br /&gt;
&lt;br /&gt;
==Controllers==&lt;br /&gt;
&lt;br /&gt;
Most important stuff to know is in [http://www.yiiframework.com/doc/guide/1.1/en/basics.controller] where the basics of controllers / actions are described.&lt;br /&gt;
&lt;br /&gt;
For LimeSurvey we use our own controller class LSYii_Controller to extend instead of the CController class. This helps us by providing the necessary libraries and some convenience methods and it also helps to have a single point to inject future extensions.&lt;br /&gt;
&lt;br /&gt;
==Actions==&lt;br /&gt;
&lt;br /&gt;
In Yii controllers can encapsulate actions when we use a method with a special name that is prefixed with &#039;action&#039;. So a method actionSubmit would be the submit action. Actions can also be separated from their controller for various reasons. In LimeSurvey we try to do this as much as possible, placing the action classes in a subdirectory below the controllers directory with the lowercased name of the controller they belong to.&lt;br /&gt;
&lt;br /&gt;
==Inline documentation==&lt;br /&gt;
&lt;br /&gt;
To help our fellow coders understand what a method is supposed to do, we try to document using [http://en.wikipedia.org/wiki/PHPDoc docblocks] as much as possible. Providing type hints on return values helps in most IDE for code completion. Sometimes working like this can feel like more typing for the coder who knows his way around the code but for other who are not familiar with the code it can be of great value. So please document as much as possible.&lt;/div&gt;</summary>
		<author><name>Tassoman</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Plugins_-_advanced&amp;diff=173680</id>
		<title>Plugins - advanced</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Plugins_-_advanced&amp;diff=173680"/>
		<updated>2022-05-05T15:29:39Z</updated>

		<summary type="html">&lt;p&gt;Tassoman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview == &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Starting from LimeSurvey 2.05, LimeSurvey will officially support plugins. Some plugins will be supported by the LimeSurvey team and will go into core. Some will be supported by others outside the LimeSurvey team. To help find them, check out the [[Available third party plugins]] and add your own plugin to it!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
Plugins allow users to customize the functionality of their installation while still being able to benefit from regular software updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
This documentation is meant for developers that are extending LimeSurvey for their own use or for their clients; end users will not be helped by this documentation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
Plugins must implement the [https://github.com/LimeSurvey/LimeSurvey/blob/master/application/libraries/PluginManager/iPlugin.php iPlugin] interface. We recommend extending your plugin class from the [https://github.com/LimeSurvey/LimeSurvey/blob/master/application/libraries/PluginManager/PluginBase.php PluginBase] class. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
Plugins are developed around an [http://manual.limesurvey.org/Plugin_events event] mechanism.&lt;br /&gt;
&lt;br /&gt;
== Plugin settings == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
By extending you benefit from common functionality required by plugins that we already have implemented for you. One of these function is the implementation of the getPluginSettings function. This function must return an array describing the configuration options for the user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
The example plugin exposes just 1 configurable setting, the message it&#039;ll show.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
protected $settings = array(&lt;br /&gt;
    &#039;logo&#039; =&amp;gt; array(&lt;br /&gt;
          &#039;type&#039; =&amp;gt; &#039;logo&#039;,&lt;br /&gt;
          &#039;path&#039; =&amp;gt; &#039;assets/logo.png&#039;&lt;br /&gt;
     ),&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
     &#039;message&#039; =&amp;gt; array(&lt;br /&gt;
          &#039;type&#039; =&amp;gt; &#039;string&#039;,&lt;br /&gt;
          &#039;label&#039; =&amp;gt; &#039;Message&#039;&lt;br /&gt;
     )&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
The array contains a name for each setting as a key. The values are arrays containing the required meta data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
Supported types are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
* logo&lt;br /&gt;
* int (integer number)&lt;br /&gt;
* string (alphanumeric)&lt;br /&gt;
* html&lt;br /&gt;
* choice&lt;br /&gt;
* relevance&lt;br /&gt;
* info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
Besides type a number of other keys are available:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
* label, defines a label &lt;br /&gt;
* default, defines a value to show if no value is specified (only for global settings, not for survey settings)&lt;br /&gt;
* current, defines the current value.&lt;br /&gt;
* readOnly : shown the settings as readonly&lt;br /&gt;
* htmlOptions, the htmlOptions of the input part ( see Yii manual [[https://www.yiiframework.com/doc/api/1.1/CHtml]])&lt;br /&gt;
* pluginOptions, for some settings (html or select) : set the widget option&lt;br /&gt;
* labelOptions : htmlOptions of the label&lt;br /&gt;
* controlOptions : htmlOptions of the wrapper of label and input&lt;br /&gt;
&lt;br /&gt;
You can find a plugin example using all actual settings at [https://framagit.org/Shnoulle/exampleSettings exampleSettings] &lt;br /&gt;
=== Read and write plugin settings === &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
It&#039;s possible to read and write plugin settings directly from your plugin code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$mySetting = $this-&amp;gt;get(&#039;mySetting&#039;);&lt;br /&gt;
$this-&amp;gt;set(&#039;mySetting&#039;, $mySetting + 1);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
You can get a default value if the setting happens to be null:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$mySetting = $this-&amp;gt;get(&#039;mySetting&#039;, null, null, 10);  // 10 is default&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events == &amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Plugins subscribe to events and can interact with LimeSurvey when the event is fired. For a list of currently available events check [[Plugin events]].&lt;br /&gt;
&lt;br /&gt;
== API == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
Plugins should only extend LimeSurvey via its &amp;quot;public&amp;quot; API. This means that directly using classes found in the source code is a bad practice. Though we can&#039;t force you not to, you risk having a broken plugin with every minor update we do.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
As much as possible interact with LimeSurvey only via methods described [http://api.limesurvey.org/classes/LimeSurvey.PluginManager.LimesurveyApi.html here]. Same as for events.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
The API object is available via &amp;lt;code&amp;gt;$this-&amp;gt;api&amp;lt;/code&amp;gt; when extending from PluginBase, otherwise you can get it from the PluginManager instance that is passed to your plugins&#039; constructor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
New functions can be added to the API object upon request.&lt;br /&gt;
&lt;br /&gt;
== Localization {{NewIn|v=3}} == &amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
It&#039;s possible for plugins to add their own locale files. File format used is .mo, same as core translations. The files must be stored in &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
&amp;lt;plugin root folder&amp;gt;/locale/&amp;lt;language&amp;gt;/&amp;lt;language&amp;gt;.mo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
where &amp;quot;&amp;lt;language&amp;gt;&amp;quot; is a two letter word like &amp;quot;de&amp;quot; or &amp;quot;fr&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
To use the specific locale file, use the plugin function gT:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;gT(&amp;quot;A plugin text that needs to be translated&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
If the given string can&#039;t be found in the plugin specific locale file, the function will look in the core locale files. So it&#039;s safe to use strings like &amp;quot;Cancel&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;gT(&amp;quot;Cancel&amp;quot;);  // Will be translated even if &amp;quot;Cancel&amp;quot; is not in the plugin locale file&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
If you are using views together with your plugin, you should use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$plugin-&amp;gt;gT(&amp;quot;Translate me&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
to do plugin specific translation in your view.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:95--&amp;gt;&lt;br /&gt;
You can use the [https://github.com/LimeSurvey/LimeSurvey/blob/master/locale/_template/limesurvey.pot limesurvey.pot] file as an example of how a pot file can look like. This is imported into your translation tool.&lt;br /&gt;
&lt;br /&gt;
=== Tools === &amp;lt;!--T:96--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
One open-source tool to edit po- and mo-files is [https://poedit.net/ Poedit].&lt;br /&gt;
&lt;br /&gt;
== Logging {{NewIn|v=3}}  == &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
If you want to log something from your plugin, just write&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;log(&amp;quot;Your message&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
The default logging level is trace, but you can give another log level as an optional second argument:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;log(&amp;quot;Something went wrong!&amp;quot;, CLogger::LEVEL_ERROR);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
The log file can be found in folder&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
&amp;lt;limesurvey root folder&amp;gt;/tmp/runtime/plugin.log&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
Your plugin name is automatically used as category. A nice way to see only the errors from your plugin is using grep (on Linux):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
 $ tail -f tmp/runtime/plugin.log | grep &amp;lt;your plugin name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
More info about configuring logging in Yii 1: [[Optional_settings#Logging_settings]].&lt;br /&gt;
&lt;br /&gt;
== Extension updates {{NewIn|v=4}} == &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
Since LimeSurvey version 4.0.0, there&#039;s a system in place to deal with plugin and other extension updates. To use this system, your extension config.xml file needs to include updater configuration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;updaters&amp;gt;&lt;br /&gt;
    &amp;lt;updater&amp;gt;&lt;br /&gt;
        &amp;lt;stable&amp;gt;1&amp;lt;/stable&amp;gt;&lt;br /&gt;
        &amp;lt;type&amp;gt;rest&amp;lt;/type&amp;gt;&lt;br /&gt;
        &amp;lt;source&amp;gt;https://comfortupdate.limesurvey.org/index.php?r=limestorerest&amp;lt;/source&amp;gt;&lt;br /&gt;
        &amp;lt;manualUpdateUrl&amp;gt;https://somedownloadlink.com/maybegithub&amp;lt;/manualUpdateUrl&amp;gt;&lt;br /&gt;
    &amp;lt;/updater&amp;gt;&lt;br /&gt;
&amp;lt;/updaters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
(The source tag above points to the LimeStore REST API, which will be used for all extensions available in our LimeStore.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Updater tag descriptions&lt;br /&gt;
|-&lt;br /&gt;
! Tag &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| stable &lt;br /&gt;
| &amp;quot;1&amp;quot; if this source only gives you stable version numbers; &amp;quot;0&amp;quot; if the source will also provide unstable versions, like &amp;lt;code&amp;gt;0.3.3-beta&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| type &lt;br /&gt;
| For now, only type &amp;lt;code&amp;gt;rest&amp;lt;/code&amp;gt; is supported. It&#039;s easy to add new updater types (version checkers), like git, wget, etc.&lt;br /&gt;
|-&lt;br /&gt;
| source &lt;br /&gt;
| The URL to fetch new versions from.&lt;br /&gt;
|-&lt;br /&gt;
| manualUpdateUrl &lt;br /&gt;
| URL which the user can go to to update the latest version of the extension.&lt;br /&gt;
|-&lt;br /&gt;
| automaticUpdateUrl &lt;br /&gt;
| TODO&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
If you don&#039;t want to supply an updater, you should put the following text in your config XML file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;updaters disabled=&amp;quot;disabled&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/updaters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
This way, you tell the system that you purposefully disabled the update system, and didn&#039;t just forget to add it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
The new plugin &#039;&#039;&#039;UpdateCheck&#039;&#039;&#039; - installed and activated by default - checks for new updates for &#039;&#039;all&#039;&#039; installed extensions when a super admin logs in, asynchronously, max one time every 24 hours. If any new versions are found, a notification is pushed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
[[File:availableupdates.png||Available updates]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
If a new security update is found, the notification will open automatically and be styled in &amp;quot;danger&amp;quot; class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
[[File:availablesecurityupdates.png||Available security updates]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
You can manually check for updates by going to the plugin manager view and click on &amp;quot;Check updates&amp;quot;. Note that this button is only visible if the UpdateCheck plugin is activated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
[[File:manuallycheckforupdates.png||Manually check for updates]]&lt;br /&gt;
&lt;br /&gt;
=== Under the hood === &amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
This section provides a brief overview over the extension updater implementation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
The extension updater is part of the ExtensionInstaller library. Below is a UML diagram for the classes related to the updater process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
[[File:extensionupdateruml.png||Extension updater UML diagram]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
Program flow when Yii starts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Yii init&lt;br /&gt;
   VersionFetcherServiceLocator-&amp;gt;init()&lt;br /&gt;
     Add REST version fetcher&lt;br /&gt;
   ExtensionUpdaterServiceLocator-&amp;gt;init()&lt;br /&gt;
     Add PluginUpdater&lt;br /&gt;
     TODO: Add an updater for each extension type (theme, question template, ...)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
Program flow when running the UpdaterCheck plugin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Get all updaters from ExtensionUpdaterServiceLocator&lt;br /&gt;
 Loop each updater&lt;br /&gt;
   For each updater, loop through version fetchers configured by &amp;lt;updater&amp;gt; XML&lt;br /&gt;
     For each version fetcher, contact remote source and get version information&lt;br /&gt;
 Compose all versions into a notification&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
The [https://github.com/LimeSurvey/LimeSurvey/blob/develop/application/core/plugins/UpdateCheck/UpdateCheck.php#L130 checkAll] method in the UpdateCheck plugin provides an example of how to query all extensions for new versions.&lt;br /&gt;
&lt;br /&gt;
==== Adding new version fetchers ==== &amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
To add a new custom version fetcher, run this during Yii initialization:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$service = \Yii::app()-&amp;gt;versionFetcherServiceLocator&lt;br /&gt;
$service-&amp;gt;addVersionFetcherType(&lt;br /&gt;
  &#039;myNewVersionFetcherType&#039;,&lt;br /&gt;
  function (\SimpleXMLElement $updaterXml) {&lt;br /&gt;
    return new MyNewVersionFetcher($updaterXml);&lt;br /&gt;
  }&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
Of course, the class &amp;lt;code&amp;gt;MyNewVersionFetcher&amp;lt;/code&amp;gt; has to subclass &amp;lt;code&amp;gt;VersionFetcher&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:82--&amp;gt;&lt;br /&gt;
To use your new version fetcher, configure the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; tag in the updater XML to use &lt;br /&gt;
&amp;lt;code&amp;gt;myNewVersionFetcherType&amp;lt;/code&amp;gt; (instead of e.g. &amp;lt;code&amp;gt;rest&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
==== Adding new extension updaters ==== &amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
To add a new custom extension updater, run this during Yii initialization:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$service = \Yii::app()-&amp;gt;extensionUpdaterServiceLocator;&lt;br /&gt;
$service-&amp;gt;addUpdaterType(&lt;br /&gt;
  &#039;myNewExtensionUpdater&#039;,&lt;br /&gt;
  function () {&lt;br /&gt;
    return MyNewExtensionUpdater::createUpdaters();&lt;br /&gt;
  }&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
Class &amp;lt;code&amp;gt;MyNewExtensionUpdater&amp;lt;/code&amp;gt; has to subclass &amp;lt;code&amp;gt;ExtensionUpdater&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
The top &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; tag in config.xml (&#039;plugin&#039;, &#039;theme&#039;, ...) will control which extension updater are used for this extension. The system is not fully customizable  yet, since you also need to add a custom ExtensionInstaller, menu items, etc. But in theory, and maybe in the future, it should be possible to add a new type of extension this way.&lt;br /&gt;
&lt;br /&gt;
== Extension installer == &amp;lt;!--T:89--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:90--&amp;gt;&lt;br /&gt;
The extension installer library consists of two abstract classes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
* ExtensionInstaller&lt;br /&gt;
* FileFetcher&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:92--&amp;gt;&lt;br /&gt;
The ExtensionInstaller is subclassed for each extension type, like PluginInstaller, QuestionThemeInstaller, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
The FileFetcher is subclassed for each different way to fetch files. Currently, only uploaded zip files are supported, but in the future, there could be a Github or LimeStore fetcher too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:94--&amp;gt;&lt;br /&gt;
[[File: extensioninstalleruml.png]]&lt;br /&gt;
&lt;br /&gt;
== Special plugins == &amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
* [[Authentication plugin development]]&lt;br /&gt;
* [[Export plugin development]]&lt;br /&gt;
&lt;br /&gt;
== Available plugins == &amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
* [[Authentication plugins]]&lt;br /&gt;
* [[Audit log]]&lt;br /&gt;
* [[CintLink]]&lt;br /&gt;
* [[Available third party plugins]]&lt;br /&gt;
&lt;br /&gt;
== Tutorial == &amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
[https://medium.com/@evently/creating-limesurvey-plugins-adcdf8d7e334 This] step-by-step tutorial shows how to create a plugin that sends a post request on every survey response submission. The tutorial shows you how to create and save global and per-survey settings, how to register events and more.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tassoman</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Using_regular_expressions&amp;diff=171998</id>
		<title>Using regular expressions</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Using_regular_expressions&amp;diff=171998"/>
		<updated>2022-01-19T17:43:08Z</updated>

		<summary type="html">&lt;p&gt;Tassoman: adding multiline email validation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt; &amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Regular Expressions must start and finish with a forward slash (&amp;quot;/&amp;quot;). You can find a good library of regular expressions at http://www.regexlib.net/. These patterns will almost always work if they are surrounded by forward slashes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
To test your regex you can [https://regex101.com/ use this regex tester].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
{{Note|To improve this wiki section, we kindly ask you to add your successfully tested regular expression(s) to provide a better understanding of this feature to the new LimeSurvey (potential) users.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text= Please note that all the below examples are written on one line!}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Important: Regular Expressions in conditions= &amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
Note that when using regular expressions in the condition editor, do NOT include the beginning and ending slash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Email validation= &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:123--&amp;gt;&lt;br /&gt;
Update (12/2018): Since these days domain names cannot only hold special characters like “ü” but also use more than 3 characters as domain name like .&#039;&#039;tech&#039;&#039; or .&#039;&#039;company&#039;&#039;, the below email regex only checks if “@” and “.” exists within the entered email address.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
/^.+?@.+?\..+$/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to validate one address per line, in a multiline long text field:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
/^(((\w+([-+.&#039;]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*(\r\n)?\n?)+)*)$/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this outdated regex the domain name is limited to 3 characters which doesn&#039;t cover all available domains:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
/^(\w[-._+\w]*\w@\w[-._\w]*\w\.\w{2,3})$/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Postcodes= &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Australian postcodes:== &amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^[0-9]{4}/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Brazilian postcodes== &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^[0-9]{2}\.[0-9]{3}-[0-9]{3}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Canadian postcodes== &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^[a-zA-Z]\d{1}[a-zA-Z](\-| |)\d{1}[a-zA-Z]\d{1}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==US postal codes== &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^[0-9]{5}([- /]?[0-9]{4})?$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:141--&amp;gt;&lt;br /&gt;
For the postal code to start with zero, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:142--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^[0-9]{5}(?:-[0-9]{4})?$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UK postcodes== &amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^[A-Z][A-Z]?[0-9][A-Z0-9]? ?[0-9][ABDEFGHJLNPQRSTUWXYZ]{2}$/i&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Note that this is not very exact, and a more exact validation is much more complex. For example, see [https://stackoverflow.com/questions/164979/uk-postcode-regex-comprehensive StackOverflow answer] and [https://en.wikipedia.org/wiki/Talk:Postcodes_in_the_United_Kingdom#Regular_Expressions Wikipedia] for more information.&lt;br /&gt;
&lt;br /&gt;
==French postcodes== &amp;lt;!--T:133--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:134--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/(^[0-8]\d\d{3}$)|(^9[0-5]\d{3}$)|(^97[1-6]\d{2}$)|(^98[46-8]\d{2}$)/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
The above expression is very precise and it will check whether or not the French Department exists (first two digits), including overseas Departments and overseas Territories (DOM-TOM).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Phone numbers= &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==US phone numbers== &amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:135--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:\([2-9]\d{2}\)\ ?|[2-9]\d{2}(?:\-?|\ ?))[2-9]\d{2}[- ]?\d{4}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^[\(\)\.\- ]{0,}[0-9]{3}[\(\)\.\- ]{0,}[0-9]{3}[\(\)\.\- ]{0,}[0-9]{4}[\(\)\.\- ]{0,}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
This second option will match all phone Canadian and US phone numbers that include non-digit symbols including:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt; . ( ) - (space)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
This will allow you to match phone numbers which resemble below:&lt;br /&gt;
*(555)555 5555&lt;br /&gt;
*555.555.5555&lt;br /&gt;
*555 555 5555&lt;br /&gt;
*(555)-555-5555&lt;br /&gt;
*555-555-5555&lt;br /&gt;
*555555555&lt;br /&gt;
&lt;br /&gt;
==Australian phone numbers== &amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
The following patterns match all various Australian mobile and landline phone numbers including with &amp;quot;+61&amp;quot; country prefix:&lt;br /&gt;
*(02) 9123 6535&lt;br /&gt;
*03 1234-5345&lt;br /&gt;
*0412 345 678&lt;br /&gt;
*+61 2 3456 789&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
But not:&lt;br /&gt;
* 234 3450 234&lt;br /&gt;
*a234 534 3432&lt;br /&gt;
*134567&lt;br /&gt;
*123456789013&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
Brackets, white space and hypens are ignored.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
The &#039;Very precise:&#039; versions listed here match against the first four or five digits in a number to ensure that they are valid Australian numbers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
The &#039;Not very precise:&#039; only match against the first and second digit so may allow invaid numbers.&lt;br /&gt;
&lt;br /&gt;
===All Australian phone numbers (mobile and landline - area code required)=== &amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
Very precise:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^\(?(?:\+?61|0)(?:(?:2\)?[ -]?(?:3[ -]?[38]|[46-9][ -]?[0-9]|5[ -]?[0-35-9])|3\)?(?:4[ -]?[0-57-9]|[57-9][ -]?[0-9]|6[ -]?[1-67])|7\)?[ -]?(?:[2-4][ -]?[0-9]|5[ -]?[2-7]|7[ -]?6)|8\)?[ -]?(?:5[ -]?[1-4]|6[ -]?[0-8]|[7-9][ -]?[0-9]))(?:[ -]?[0-9]){6}|4\)?[ -]?(?:(?:[01][ -]?[0-9]|2[ -]?[0-57-9]|3[ -]?[1-9]|4[ -]?[7-9]|5[ -]?[018])[ -]?[0-9]|3[ -]?0[ -]?[0-5])(?:[ -]?[0-9]){5})$/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
Not very precise:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:\+?61|0)[2-478](?:[ -]?[0-9]){8}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===All Australian phone numbers (landlines only - area code required)=== &amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
Very precise:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^\(?(?:\+?61|0)(?:2\)?[ -]?(?:3[ -]?[38]|[46-9][ -]?[0-9]|5[ -]?[0-35-9])|3\)?(?:4[ -]?[0-57-9]|[57-9][ -]?[0-9]|6[ -]?[1-67])|7\)?[ -]?(?:[2-4][ -]?[0-9]|5[ -]?[2-7]|7[ -]?6)|8\)?[ -]?(?:5[ -]?[1-4]|6[ -]?[0-8]|[7-9][ -]?[0-9]))(?:[ -]?[0-9]){6}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
Not very precise:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:\+?61|\(?0)[2378]\)?(?:[ -]?[0-9]){8}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===New South Wales landline phone numbers (area code optional)=== &amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
Very precise:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:\(?(?:\+?61|0)2\)?[ -]?)?(?:3[ -]?[38]|[46-9][ -]?[0-9]|5[ -]?[0-35-9])(?:[ -]?[0-9]){6}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
Not very precise:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:\(?(?:\+?61|0)2\)?(?:[ -]?[0-9]){7}[0-9]$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Victorian and Tasmanian landline phone numbers (area code optional)=== &amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
Very precise:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:\(?(?:\+?61|0)3\)?[ -]?)?(?:4[ -]?[0-57-9]|[57-9][ -]?[0-9]|6[ -]?[1-67])(?:[ -]?[0-9]){6}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
Not very precise:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:\(?(?:\+?61|0)3\)?(?:[ -]?[0-9]){7}[0-9]$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Queensland landline phone numbers (area code optional)=== &amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
Very precise:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:\(?(?:\+?61|0)7\)?[ -]?)?(?:[2-4][ -]?[0-9]|5[ -]?[2-7]|7[ -]?6)(?:[ -]?[0-9]){6}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
Not very precise:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:\(?(?:\+?61|0)7\)?(?:[ -]?[0-9]){7}[0-9]$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===South Australia, Northern Territory, Western Australia landline phone numbers (area code optional)=== &amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
Very precise:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:\(?(?:\+?61|0)8\)?[ -]?)?(?:5[1-4]|6[0-8]|[7-9][0-9])$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
Not very precise:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:\(?(?:\+?61|0)8\)?(?:[ -]?[0-9]){7}[0-9]$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Australian mobile phone numbers only=== &amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
Very precise:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:\+?61|0)4 ?(?:(?:[01] ?[0-9]|2 ?[0-57-9]|3 ?[1-9]|4 ?[7-9]|5 ?[018]) ?[0-9]|3 ?0 ?[0-5])(?: ?[0-9]){5}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
Not very precise:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:\(?(?:\+?61|0)4\)?(?:[ -]?[0-9]){7}[0-9]$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Belgian phone number== &amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^((\+|00)32\s?|0)(\d\s?\d{3}|\d{2}\s?\d{2})(\s?\d{2}){2}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
==Belgian mobile phone number==&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^((\+|00)32\s?|0)4(60|[789]\d)(\s?\d{2}){3}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
==French phone number==&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^((\+|00)33\s?|0)[1-59](\s?\d{2}){4}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
==French mobile phone number==&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^((\+|00)33\s?|0)[67](\s?\d{2}){4}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
==Luxemburg phone number==&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^((\+|00\s?)352)?(\s?\d{2}){3,4}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
==Luxemburg mobile phone number==&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^((\+|00\s?)352)?\s?6[269]1(\s?\d{3}){2}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
=German marks (with optional plus or minus)=&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^[1-6]{1}[\+|\-]?$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Age validation= &amp;lt;!--T:136--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:137--&amp;gt;&lt;br /&gt;
Example: Age 20-99&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/([2-9][0-9])/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:124--&amp;gt;&lt;br /&gt;
Example: Age 18-35&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/(1[8-9]|2[0-9]|3[0-5])/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:125--&amp;gt;&lt;br /&gt;
Example: Age 19-65&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(1[8-9]|[2-5][0-9]|6[0-5])$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Number validation= &amp;lt;!--T:138--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Numbers from 1 to 99999== &amp;lt;!--T:126--&amp;gt;&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^([1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9])$/&amp;lt;/source&amp;gt;&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^[1-9][0-9]{0,4}$/ does the same as above but should run a little faster&amp;lt;/source&amp;gt;&lt;br /&gt;
==Numbers from 1 to 999, 1.000 to 999.999 to 999.999.999==&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^[1-9][0-9]{0,2}(?:\.[0-9]{3}){0,2}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
Accepts numbers from 1 to 999, 1.000 to 999.999 to 999.999.999 but&lt;br /&gt;
rejects numbers like 999.1.1 , 94.22.22, 999.1.22, 999.11.1, 999.1.333&lt;br /&gt;
&lt;br /&gt;
==Number validation with optional decimal (for price)== &amp;lt;!--T:127--&amp;gt;&lt;br /&gt;
Accepts numbers from 0 to 199, with 2 decimal optional:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^([1][0-9][0-9]|[1-9][0-9]|[0-9])((\.)[0-9][0-9])?$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Number validation with thousand separator== &amp;lt;!--T:143--&amp;gt;&lt;br /&gt;
Space as separator, no minus&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?!0)\d{1,3}(\ \d{3})*$/&amp;lt;/source&amp;gt;&lt;br /&gt;
Dot as separator, minus allowed&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^-?(?!0)\d{1,3}(\.\d{3})*$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:128--&amp;gt;&lt;br /&gt;
It forces two decimal points and accepts numbers from 1.00 to 999,999,999.00 with an optional comma delimiting thousands/millions&lt;br /&gt;
including all of the following: 1.00, 1,000.00, 12,345.67, 12345,02, 123,456,468.00, 1234566.00, 123456789.00&lt;br /&gt;
but not 1,23.00, 12,3.4 or 1234,43.04&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^[1-9][0-9]{0,2}(?:,?[0-9]{3}){0,3}\.[0-9]{2}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Similar to the above: Forces two decimal points but accepts a &amp;quot;0&amp;quot; before decimal separator &amp;quot;,&amp;quot;.&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/[0-9]{0,2}(?:,?[0-9]{3}){0,3}\.[0-9]{2}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:129--&amp;gt;&lt;br /&gt;
Same as above, but the two decimal points are optional:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^[1-9][0-9]{0,2}(?:,?[0-9]{3}){0,3}(?:\.[0-9]{2})?$/ &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Month (1-12)== &amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
If you want to ask for the month a person was born you can validate the input as follows:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^[0]*[1-9]$|^[0]*1[0-2]$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Minimum width (set to 3 in this example)= &amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^.{3,}$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Currency= &amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==US currency (dollar sign and cents optional)== &amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:82--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^\$?\d+(\.(\d{2}))?$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:132--&amp;gt;&lt;br /&gt;
Check for comma usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^\$?\d{1,3}(\d+(?!,))?(,\d{3})*(\.\d{2})?$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Swiss price== &amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
A number with two decimal numbers after the decimal point of which the last one is either a 5 or a 0:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(\d+)(\.\d(05)?)?$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Validate score= &amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==1-10== &amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^[1-9]{1}$|^10$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==1-100== &amp;lt;!--T:89--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:90--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^[1-9]?[0-9]{1}$|^100$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Text validation= &amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:92--&amp;gt;&lt;br /&gt;
The [[Question type - Multiple short text|multiple short text question type]] doesn&#039;t support minimum or maximum answers at the moment. One way around this is to use a [[Question type - Long free text|long free text question type]] with a regular expression.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
The below expression tests for at least one word per line for at least 3 lines and no more than 10 lines:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:94--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/(?:[^,.;:?!&amp;amp; \n\r]+(?: [^,.;:?!&amp;amp; \n\r]+)*)(?:[,.;:?!&amp;amp; \n\r]?(?:\n|\r|\n\r|\r\n)(?:[^,.;:?!&amp;amp; \n\r]+(?: [^,.;:?!&amp;amp; \n\r]+)*)){2,10}/is&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:95--&amp;gt;&lt;br /&gt;
If you want, say five words per line, you could change the first and last star/asterisk to {4,}:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:96--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/(?:[^,.;:?!&amp;amp; \n\r]+(?: [^,.;:?!&amp;amp; \n\r]+){4,})(?:[,.;:?!&amp;amp; \n\r]?(?:\n|\r|\n\r|\r\n)(?:[^,.;:?!&amp;amp; \n\r]+(?: [^,.;:?!&amp;amp; \n\r]+){4,})){2,10}/is&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
If you wanted one or more words per line (between line 1 and line 5), you can change the content located within the last curly braces to &#039;&#039;&#039;0,4&#039;&#039;&#039; (note you use 0 because you&#039;re already matching the first line).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/(?:[^,.;:?!&amp;amp; \n\r]+(?: [^,.;:?!&amp;amp; \n\r]+)*)(?:[,.;:?!&amp;amp; \n\r]?(?:\n|\r|\n\r|\r\n)(?:[^,.;:?!&amp;amp; \n\r]+(?: [^,.;:?!&amp;amp; \n\r]+)*)){0,4}/is&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Word count== &amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
The following restricts the number of words allowed to a minimum of 1 and a maximum of 200:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:101--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^[-\w]+(?:\W+[-\w]+){0,199}\W*$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:102--&amp;gt;&lt;br /&gt;
To increase the minimum change the zero part of {0,199}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:103--&amp;gt;&lt;br /&gt;
To increase or decrease the maximum change the &amp;quot;199&amp;quot; part of {0,199}.&lt;br /&gt;
&lt;br /&gt;
=Time validation= &amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:105--&amp;gt;&lt;br /&gt;
There are a number of ways to write time formats. Some of the possible options are 12 hour or 24 hour, with seconds or without. Although it is an option to use the [[Question type - Date|date question type]] (it can also capture time) you can use the [[Question type - Short free text|short free text question type]] with one of the below validation regular expressions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
The following three validation strings test for 24 hour time (in order of appearances) without seconds, with optional seconds lastly with seconds required:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:107--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:[01][0-9]|2[0-3]):[0-5][0-9]$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:108--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9])?$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:130--&amp;gt;&lt;br /&gt;
The following three match 12 hour time, as above with seconds, optional seconds and with seconds required:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:110--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?&amp;quot;&amp;gt;00:[0-5][0-9] (?:am|AM)|(?:0[1-9]|1[01]):[0-5][0-9] (?:[ap]m|[AP]M)|12:[0-5][0-9] (?:pm|PM))$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:111--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:00:[0-5][0-9](?::[0-5][0-9])? (?:am|AM)|(?:0[1-9]|1[01]):[0-5][0-9](?::[0-5][0-9])? (?:[ap]m|[AP]M)|12:[0-5][0-9](?::[0-5][0-9])? (?:pm|PM))$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:00:[0-5][0-9]:[0-5][0-9] (?:am|AM)|(?:0[1-9]|1[01]):[0-5][0-9]:[0-5][0-9] (?:[ap]m|[AP]M)|12:[0-5][0-9]:[0-5][0-9] (?:pm|PM))$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:131--&amp;gt;&lt;br /&gt;
The following three match either 12 or 24 hour time as above with seconds, optional seconds and with seconds required:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:113--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:(?:00:[0-5][0-9] (?:am|AM)|(?:0[1-9]|1[01]):[0-5][0-9] (?:[ap]m|[AP]M)|12:[0-5][0-9] (?:pm|PM))|(?:[01][0-9]|2[0-3]):[0-5][0-9])$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:114--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:(?:00:[0-5][0-9](?[0-5][0-9])? (?:am|AM)|(?:0[1-9]|1[01]):[0-5][0-9](?[0-5][0-9])? (?:[ap]m|[AP]M)|12:[0-5][0-9](?[0-5][0-9])? (?:pm|PM))|(?:[01][0-9]|2[0-3]):[0-5][0-9](?[0-5][0-9])?)$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:115--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?:(?:00:[0-5][0-9]:[0-5][0-9] (?:am|AM)|(?:0[1-9]|1[01]):[0-5][0-9]:[0-5][0-9] (?:[ap]m|[AP]M)|12:[0-5][0-9]:[0-5][0-9] (?:pm|PM))|(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9])$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=US states= &amp;lt;!--T:116--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:117--&amp;gt;&lt;br /&gt;
To validate for one state use the following (example is Texas):&lt;br /&gt;
*TX uppercase only: &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(TX)$/&amp;lt;/source&amp;gt;&lt;br /&gt;
*tx lowercase only: &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(tx)$/&amp;lt;/source&amp;gt;&lt;br /&gt;
*TX upper or lowercase: &amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^([T|t][X|x])$/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Profanity Filter= &amp;lt;!--T:118--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:119--&amp;gt;&lt;br /&gt;
To filter profanity words from an answer:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:120--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;/^(?i)((?!\bENTERPROFANITYHERE\b).)*$(?-i)/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:121--&amp;gt;&lt;br /&gt;
Replace &amp;quot;ENTERPROFANITYHERE&amp;quot; with your bad word.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:122--&amp;gt;&lt;br /&gt;
The \b will allow passing of words such as &amp;quot;assassination&amp;quot; and &amp;quot;hello&amp;quot; if you enter &amp;quot;ass&amp;quot; or &amp;quot;hell&amp;quot; as your profanity word. This also works if you are trying to omit other words, names etc. from answers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Helpful links= &amp;lt;!--T:139--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:140--&amp;gt;&lt;br /&gt;
In the beginning of this wiki section, we recommend you to use https://regex101.com/ to test/create regular expressions. You can also use https://www.regextester.com/ to create expressions in case you are unhappy about the first option.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tassoman</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Manage_users/it&amp;diff=142952</id>
		<title>Manage users/it</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Manage_users/it&amp;diff=142952"/>
		<updated>2019-05-29T14:29:52Z</updated>

		<summary type="html">&lt;p&gt;Tassoman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Gestione Utente =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
La gestione degli utenti ti permette di aggiungere degli utenti amministratori addizionali a LimeSurvey. In questo capitolo li chiameremmo semplicemente &#039;utenti&#039;. Non devono essere confusi con [[Survey participants|survey participants]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creare utenti==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Per creare un nuovo utente, aprire il gestore utenti&lt;br /&gt;
(&amp;quot;Configurazioni&amp;quot; -&amp;gt; &amp;quot;Utenti&amp;quot; -&amp;gt; &amp;quot;Gestione degli amministratori delle indagini&amp;quot;):&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:LimeSurveyBenuzerVerwaltung.jpg]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, click on &#039;&#039;&#039;Add user&#039;&#039;&#039; located in the upper right area of &#039;&#039;&#039;User control&#039;&#039;&#039; table. A window will show up asking you to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
[[File:LimeSurveyAddUser.jpg]]&lt;br /&gt;
* inserire lo username desiderato nel campo &#039;&#039;&#039;Username&#039;&#039;&#039;.&lt;br /&gt;
* inserire l&#039;indirizzo email nel campo di testo &#039;&#039;&#039;e-mail&#039;&#039;&#039;. Nota:&lt;br /&gt;
** Se non vuoi che l&#039;utente riceva l&#039;email di conferma con il link all&#039;istanza LimeSurvey, lo username, la password, puoi spedire l&#039;email di conferma al tuo indirizzo di posta elettronica e solo in un secondo momento sostituirlo con quello dell&#039;utente.&lt;br /&gt;
** LimeSurvey invierà una mail di conferma all&#039;indirizzo inserito in questo campo.&lt;br /&gt;
* inserisci il nome completo dell&#039;utente nel campo &#039;&#039;&#039;Nome Completo&#039;&#039;&#039;. Nota:&lt;br /&gt;
** Il nome completo inserito sarà utilizzato come nominativo standard nelle indagini create da quest&#039;utente.&lt;br /&gt;
* Clicca su &#039;&#039;&#039;Salva&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:LimeSurveyAddUser.jpg]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Quindi, hai appena creato un nuovo utente. Potrai saperne di più su come impostare i permessi degli utenti, se continuerai a leggere oltre.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:LimeSurveyBleistiftSymbol.jpg]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see below, there are four options under the &#039;&#039;&#039;Action&#039;&#039;&#039; column that allow you to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Edit users.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*edit the general aspects of a user - by clicking the pen symbol.&lt;br /&gt;
*delete the user from the survey administrators database - by clicking the wastebin button.&lt;br /&gt;
*set global permissions for a user - by clicking the lock symbol.&lt;br /&gt;
*set theme permissions for a user - by clicking the pen-and-lock symbol.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
==Modifica Utenti==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Puoi usare il simbolo della &#039;penna&#039; per modificare un utente:&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Puoi impostare un nuovo indirizzo email, nome completo ed anche cambiare la password. Quando hai terminato, clicca su &#039;&#039;&#039;Salva&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Delete user== &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Per eliminare un account utente semplicemente clicca sul bottone del cestino nella linea corrispondente all&#039;account utente che dovrebbe essere eliminato e premi &#039;&#039;&#039;OK&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
==Impostare permessi generali per un utente==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Alert|Global permissions apply to the whole LimeSurvey application. If you want to set permissions only for a specific survey, you can use the [[Manage users#Setting permissions for a single survey|survey permissions settings]].}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Per settare i permessi globali per un utente basta cliccare sul simbolo del lucchetto.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:User_global_permission.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Il sistema utilizza CRUD (create, read, update and delete) come impostazioni dei permessi di un&#039;indagine.  Selezionando il primo input, si selezionato tutti i permessi CRUD per quella riga. Nel settare i permessi, si raccomanda fortemente di estendere la schermata utilizzando il bottone con la freccia sopra la colonna con le checkbox.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:User_global_permission_complete.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Ora puoi aggiungere o rimuovere le seguenti autorizzazioni.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Panel Partecipanti&#039;&#039;&#039;: see [[Central participants database]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Set di etichette&#039;&#039;&#039;: permesso di creare, aggiornare, utilizzare (visualizzare/leggere) e cancellare set di etichette. Questi non hanno specifici permessi (a differenza dei modelli).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Impostazioni &amp;amp; plugin&#039;&#039;&#039;: con questi permessi un utente può controllare l&#039;integrità dei dati, salvare il database SQL in un file .sql, settare le impostazioni generali, visualizzare le informazioni PHP nelle impostazioni generali e gestire tutti i plugin.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Indagini&#039;&#039;&#039;: permette l&#039;accesso a tutte le indagini. Per permettere ad un utente solamente di creare e gestire le proprie indagini, bisogna concedergli solo i permessi &#039;Creare&#039;. Il creatore di un sondaggio è il proprietario dell&#039;indagine e sarà sempre in grado di gestirla. Ricorda che ogni questionario può avere delle autorizzazioni specifiche, quelle globali sono applicate prima delle autorizzazioni specifiche dell&#039;indagine.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Modello&#039;&#039;&#039;: permette all&#039;utente di utilizzare tutti i modelli e di modificare tutti quelli non standard. Una persona con questi diritti dovrebbe avere sufficienti conoscenze in termini di HTML, JavaScript e CSS. Se un utente non ha familiarità con queste cose e si suppone di utilizzare un modello specifico, sarebbe meglio dargli solo il permesso di &#039;Leggere&#039;. Ogni template può avere permessi specifici.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Gruppi di utenti&#039;&#039;&#039;: questi permessi permettono ad un utente di creare/visualizzare/aggiornare/cancellare gruppi di utenti.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Utenti&#039;&#039;&#039;: con questi permessi un utente può creare, modificare e cancellare i proprio utenti amministratori. I nuovi utenti non possono avere dei permessi maggiori di quelli del &#039;genitore&#039; che li ha creati - inoltre non saranno in grado di modificare gli utenti appartenenti ad altri amministratori. Se ciò deve esser fatto, deve esser prima concessa un&#039;autorizzazione da SuperAdmin.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;SuperAdministrator&#039;&#039;&#039;: questo permesso può essere aggiunto o rimosso solo dall&#039;utente chiamato &#039;&#039;&#039;admin&#039;&#039;&#039; e garantisce autorizzazioni complete sull&#039;intera istanza LimeSurvey. &#039;&#039;&#039;Nota&#039;&#039;&#039;: quest&#039;autorizzazione è molto potente e dovresti stare molto attento nel concederla.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Use internal database authentication&#039;&#039;&#039;: This permission allows users to access LimeSurvey&#039;s panel via the authentication page (e.g. &#039;&#039;http://domain/admin/authentication/sa/login&#039;&#039;). If it is unchecked and the respective user tries to connect to LimeSuvey&#039;s panel, he will get the following error: &#039;Internal database authentication method is not allowed for this user&#039;.&lt;br /&gt;
&lt;br /&gt;
{{Note|All the permissions mentioned above that belong to the [[Optional_settings#Security|forced super administrator]] cannot be removed via the GUI.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
==Impostare permessi su modelli per un utente==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Con i permessi sui modelli puoi impostare quale design template un utente può selezionare quanto crea o modifica un&#039;indagine. Potrebbe esser una buona idea quella di restringere i modelli che un utente può selezionare allo scopo di prevenire utilizzi indesiderati di un template che non è adatto ad un particolare tipo di indagine/utente.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Nota&#039;&#039;&#039;: se hai uno specifico modello di design per un gruppo di utenti o clienti, potresti voler restringere il loro accesso ai solo modelli creati ai loro scopi.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Per settare/modificare i permessi sui modelli per un semplice utente, cliccare sul simbolo &#039;penna-e-lucchetto&#039;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:LimeSurveySetDesignTemplatesLS.jpg]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Ora è possibile selezionare i modelli di design che quell&#039;utente può selezionare. Dopo aver completato la selezione/deselezione, clicca semplicemente su &#039;&#039;&#039;Salva&#039;&#039;&#039; nell&#039;angola in alto a destra;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
I più importanti casi d&#039;uso per garantire i diritti degli utenti sono raccolti nelle parte &#039;&#039;&#039;casi d&#039;uso&#039;&#039;&#039; di quest&#039;articolo.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Utilizzare one-time password=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Dalla versione 1.81 un utente può richiamare il login di LimeSurvey da /limesurvey/admin e passare il nome utente e una one-time password che era stata precedentemente inserita nella tabella utenti (colonna one_time_pw) da un&#039;applicazione esterna.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Per abilitare questo metodo di accesso [[Optional settings#Use_one_time_passwords |bisogna attivare un&#039;impostazione]] ($use_one_time_passwords = true;) in config.php.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
L&#039;URL deve contenere le seguenti variabili:&lt;br /&gt;
*&#039;&#039;&#039;Utente&#039;&#039;&#039;: l&#039;username normalmente utilizzato per accedere a LimeSurvey. Questo nome utente deve esistere nella tabella &#039;users&#039; del database.&lt;br /&gt;
*&#039;&#039;&#039;onepass&#039;&#039;&#039;: il testo in chiaro della password che sarà poi comparata con la password contenuta nella tabella &#039;users&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Un valido accesso utilizzando una one-time password potrebbe assomigliare a questo ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;http://www.yourdomain.org/limesurvey/index.php/admin/authentication/login?user=myusername&amp;amp;onepass=secretpassword&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&#039;simplebox&#039;&amp;gt; [[File:help.png]] The &#039;secretpassword&#039; field is plain text, not MD5 code.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Cose a cui prestare attenzione&#039;&#039;&#039;:&lt;br /&gt;
* le one-time password devono essere abilitate settando &amp;quot;$suse_one_time_password = true;&amp;quot; (per v1.92) rispettivamente &amp;quot;use_one_time_password =&amp;gt; true&amp;quot; (per v2.0 + nella sezione &#039;Configurazione&#039;) in config.php.&lt;br /&gt;
* Lo username trasmetto deve realmente esistere nella tabella &#039;utenti&#039; di LimeSurvey.&lt;br /&gt;
* La one-time password, che può essere impostata da un&#039;applicazione esterna, deve essere memorizzata come [http://www.php.net/md5 MD5 hash] nella colonna &amp;quot;one_time_pw&amp;quot; della tabella &#039;utenti&#039;.&lt;br /&gt;
* Il testo in chiaro della password trasmesso sarà convertito utilizzando la funzione md50 e poi sarà comparato con il valore memorizzato in &#039;one_time_ppw&#039; della tabella &#039;utenti&#039;. Le due password devono essere combaciare.&lt;br /&gt;
* Dopo il primo accesso con la one-time password, questa password sarà eliminata dal database. L&#039;utente non sarà più in grado di accedere utilizzando la stessa password una seconda volta.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=Impostare i permessi per una singola indagine=&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Queste autorizzazioni si applicano solamente ad una singola indagine. Se sei interessato a settare le autorizzazioni per l&#039;intero sistema puoi utilizzare i permessi globali.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Nota&#039;&#039;&#039;: è richiesto un account utente esistente per impostare le autorizzazioni per una singola indagine. Se l&#039;account non esiste devi prima crearlo, poi potrai cambiare i permessi sull&#039;indagine. Non devi applicare nessun permesso globale all&#039;utente, è necessario solamente che l&#039;account utente in se esista.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note| By default, an user (non-admin) cannot grant survey permissions to users that are not part of the same group as the survey administrator. This is a security option enabled by &#039;&#039;&#039;default&#039;&#039;&#039; in LimeSurvey. To change this, you need to deactivate option [[Global_settings#Security|Group member can only see own group]], located in the &#039;&#039;&#039;Global settings&#039;&#039;&#039;, under the &#039;&#039;&#039;Security tab&#039;&#039;&#039;. However, if you feel unsure about disabling this option, you can create groups containing those users that can be seen and be granted survey permissions by a survey creator.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Per cambiare le autorizzazioni su un&#039;indagine devi selezionare &#039;&#039;&#039;Permessi Indagine&#039;&#039;&#039; dal menù &#039;&#039;&#039;Proprietà indagine&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:LimeSurveySurveyPermissions.jpg]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:LimeSurveySurveyPermissionsRights.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
==Impostare i permessi dell&#039;utente sulla singola indagine==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
nel prossimo step seleziona l&#039;utente a cui vuoi cambiare i diritti sull&#039;indagine e poi clicca su &#039;&#039;&#039;Aggiungi utente&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:LimeSurveyAddSurveyPermission.jpg]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Dopo aver cliccato su &#039;&#039;&#039;Imposta i permessi per l&#039;indagine&#039;&#039;&#039; verrà visualizzata la matrice delle autorizzazioni per l&#039;indagine.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:LimeSurveyUserPermissionMatrix.jpg]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
In questa matrice puoi impostare i diritti per le diverse funzionalità e parti dell&#039;indagine. Semplicemente devi cliccare in un checkbox se vuoi aggiungere o rimuovere un permesso. Selezionando una delle checkbox nella prima colonna, tutti i diritti su quella riga saranno selezionati o rimossi.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Nelle altre colonne puoi scegliere se un utente può eseguire una certa azione su quella parte/funzione.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
I più importanti casi d&#039;uso per garantire i diritti degli utenti sono raccolti nelle parte &#039;&#039;&#039;casi d&#039;uso&#039;&#039;&#039; di quest&#039;articolo.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Grant survey permissions to a user group==&lt;br /&gt;
&lt;br /&gt;
Click on add a user group and select the user group to which you would like to add the permission rights.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:LimeSurveyPermissionRightsUserGroup.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the next step,  select  the permissions that you will allocate to the members of that user group. Do not forget to click on the double right arrowhead to get an extended view of the permissions matrix.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:UserGroupSurveyPermissions.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Dopo aver concluso le modifiche ai permessi dell&#039;indagine, cliccare su &#039;&#039;&#039;Salva&#039;&#039;&#039; o &#039;&#039;&#039;Salva e chiudi&#039;&#039;&#039; nell&#039;angolo in alto a destra.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some examples are provided [[Manage_users#Examples|below]] in order to help you get a better understanding of the Limesurvey&#039;s survey permissions system.&lt;br /&gt;
&lt;br /&gt;
{{Note|[[Manage user groups|The user group function]] is still experimental. Use our [https://bugs.limesurvey.org/ bugs tracker] to describe any kind of inconsistencies.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=Casi d&#039;uso=&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
In questa parte dell&#039; articolo ti forniremo alcune idee su casi d&#039;uso che possono esistere e su come e quali diritti sarebbe una buona scelta.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
==Aggiunta di un nuovo responsabile per la gestione di LimeSurvey==&lt;br /&gt;
* Accedi come &#039;&#039;&#039;admin&#039;&#039;&#039;&lt;br /&gt;
* Crea un nuovo account utente&lt;br /&gt;
* Imposta i permessi globali per l&#039;utente a &#039;&#039;&#039;SuperAdministrator&#039;&#039;&#039;&lt;br /&gt;
* facoltativo: imposta i permessi sui modelli a &#039;&#039;&#039;SuperAdministrator&#039;&#039;&#039; come diritti su tutti i modelli.&lt;br /&gt;
* facoltativo: imposta i permessi dell&#039;indagine a &#039;&#039;&#039;SuperAdministrator&#039;&#039;&#039; come permessi per tutte le indagini.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
==Un nuovo utente vuole creare le proprie indagini==&lt;br /&gt;
* Accedi come &#039;&#039;&#039;admin&#039;&#039;&#039; od utente con dei permessi da &#039;&#039;&#039;SuperAdministrator&#039;&#039;&#039;.&lt;br /&gt;
* Crea un nuovo account utente.&lt;br /&gt;
* imposta i permessi globali dell&#039;utente a &#039;&#039;&#039;Creare Indagini&#039;&#039;&#039;&lt;br /&gt;
* imposta i permessi sui template dell&#039;utente ai soli modelli che saranno utilizzati dall&#039;utente o dal gruppo.&lt;br /&gt;
* facoltativo: imposta i permessi sull&#039;indagine (il creatore dell&#039;indagine possiede tutte le autorizzazioni sui propri sondaggi).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
==Il creatore di un&#039;indagine ha bisogno di un&#039;altra persona per modificare il proprio sondaggio==&lt;br /&gt;
* accedi come &#039;&#039;&#039;admin&#039;&#039;&#039; o come utente con permessi da &#039;&#039;&#039;SuperAdministrator&#039;&#039;&#039;-&lt;br /&gt;
* crea un nuovo utente&lt;br /&gt;
* imposta &#039;&#039;&#039;nessun permesso globale&#039;&#039;&#039; per l&#039;utente&lt;br /&gt;
* Imposta &#039;&#039;&#039;nessun permesso sui modelli&#039;&#039;&#039; per l&#039;utente&lt;br /&gt;
* imposta i permessi dell&#039;indagine come preferisci. Questo dipende da cosa deve fare il nuovo utente e di quanti permessi necessità. Se deve essere in possesso di tutti i permessi sull&#039;indagine puoi selezionare la checkbox nella prima colonna (quella con il pulsante &#039;&#039;&#039;&amp;lt;&amp;lt;&#039;&#039;&#039; o &#039;&#039;&#039;&amp;gt;&amp;gt;&#039;&#039;&#039; come intestazione).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
==Un responsabile del sondaggio vuole vedere i risultati dell&#039;indagine ed esportarli==&lt;br /&gt;
* accedi come &#039;&#039;&#039;admin&#039;&#039;&#039; o come utente con permessi da &#039;&#039;SuperAdministrator&#039;&#039;&#039;.&lt;br /&gt;
* crea un nuovo account utente&lt;br /&gt;
* imposta &#039;&#039;&#039;nessun permesso globale&#039;&#039;&#039; per l&#039;utente&lt;br /&gt;
* imposta &#039;&#039;&#039;nessun permesso sui modelli&#039;&#039;&#039; per l&#039;utente&lt;br /&gt;
* imposta i permessi dell&#039;indagine a: &#039;&#039;&#039;Risposte&#039;&#039;&#039;: &#039;&#039;&#039;Visualizzare/Leggere&#039;&#039;&#039; e &#039;&#039;&#039;Esportare&#039;&#039;&#039;; &#039;&#039;&#039;Statistiche&#039;&#039;&#039;: &#039;&#039;&#039;Visualizzare/Leggere&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:LimeSurveyCusomerOwnStatistics.jpg]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==I need help from two interns that can help me with the translation of my survey==&lt;br /&gt;
* Log in as &#039;&#039;admin&#039;&#039; (or as a user that has the &#039;&#039;Superadministrator&#039;&#039; permission).&lt;br /&gt;
* Create &#039;&#039;n&#039;&#039; user accounts (where n is the number of translators).&lt;br /&gt;
* Create a user group called &#039;&#039;Translators&#039;&#039; and add the &#039;&#039;n&#039;&#039; accounts to this group.&lt;br /&gt;
* Go to the &#039;&#039;&#039;Survey permissions&#039;&#039;&#039; and click on &#039;&#039;&#039;Add a user group&#039;&#039;&#039;.&lt;br /&gt;
* If they only do translations, then offer them the &#039;&#039;&#039;Quick translation&#039;&#039;&#039; permission.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Ci sono diverse classi di persone che hanno accesso all&#039;installazione LimeSurvey. Solo un set di persone è definito &#039;&#039;&#039;utente&#039;&#039;&#039; all&#039;interno del codice e della documentazione. Quindi, capiamo che cosa e quali sono queste classi di persone in modo da comprendere meglio la terminologia del programma.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tassoman</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Translations:Manage_users/2/it&amp;diff=142951</id>
		<title>Translations:Manage users/2/it</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Translations:Manage_users/2/it&amp;diff=142951"/>
		<updated>2019-05-29T14:29:52Z</updated>

		<summary type="html">&lt;p&gt;Tassoman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Gestione Utente =&lt;/div&gt;</summary>
		<author><name>Tassoman</name></author>
	</entry>
</feed>