Actions

Questions-introduction

From LimeSurvey Manual

Revision as of 16:35, 19 May 2020 by FuzzyBot (talk | contribs) (Updating to match new version of source page)


  Attention : Please note that the explanations and screenshots from this wiki section are based on LimeSurvey 3.


Introduction

Après avoir |créé vos groupes, vous allez pouvoir y ajouter vos question. La création d'une nouvelle question se fait en cliquant sur l'icône Ajouter dans la barre de menu de Groupe à droite.



  • Access a question group and look for the add question quick action button;



Description des champs

  • Code : L'ID de la question, un nombre ou un code. Ce champ est seulement un moyen rapide d'identifier une question pour l'exportation ou l'évaluation. Essayez d'être homogène dans le codage des questions. Bien planifier ces codes rendra l'évaluation bien plus aisée par la suite. Ce champ n'est en général pas visible sur la partie publique.

Le formulaire d'ajout d'une question vous demandera le "Code", le champ "Question", le champ "Aide" et le "Type" de la question. Toutes les questions ajoutées à ce niveau seront ajoutées au groupe que vous étiez en train de visualiser lorsque vous avez cliqué sur le bouton , cependant vous pouvez changer le groupe d'appartenance de la question par la suite.



  • Question code: It represents the ID, number or code for the question that is used for quick identification. This field is normally not displayed to people taking the survey unless specified in the Presentation panel - Show question number and/or code. It is especially useful if you wish to use the LimeSurvey assessments feature and/or the ExpressionScript.
  • Question : Ce champ contient le texte de la question posée. Il n'y a pas de limite à la longueur de ce champ, cependant si vous souhaitez ajouter des explications sur la question, réservez ces commentaires pour le champ Aide.
  • Aide : C'est un champ optionnel. Il est utile si une question nécessite des explications, ou bien si vous souhaitez expliquer comment le participant doit y répondre. Lorsque vous renseignez ce champ, le texte de l'aide apparait avec une icône représentant un point d'interrogation sur le coté gauche.
  • Type : Ce champ détermine le type de réponses supportées par ce champ. Voir la section "Types de questions" pour une description des options disponibles.
  • Jeu d'étiquettes : Pour certains types de questions, vous devez choisir un jeu d'étiquettes. Seuls les jeux d'étiquettes supportant au moins la langue de base du questionnaire sont affichés.
  • Validation : Cette fonctionnalité est disponible sur toutes les réponses en texte libre ("Réponse Texte courte", "Réponse Texte  Longue", "Date" ou "Numérique"). Vous pouvez utiliser des expressions régulières standards dans ce champ pour valider les réponses à la question, et si la réponse ne répond pas aux exigences de l'expression régulière, le script demandera à l'utilisateur de recommencer avant de pouvoir continuer.
  • Autre : En fonction du type de question choisi, cette option peut apparaître. Cela permet d'ajouter une réponse supplémentaire intitulée "autre" pour cette question.
  • Obligatoire : Pour tous les types de questions, exceptées les questions de type texte, ce paramètre vous permet de rendre la réponse à la question obligatoire avant de pouvoir continuer à la question suivante.
  • Attributs de la question : Plus d'informations sur les Attributs des questions
    Note: ajouter ou modifier un attribut entraine la perte des modifications en cours sur la question.
       
<img src="http://www.yourdomain.com/yourpics/pic.jpg">
Hint: You can also use the HTML WYSIWYG editor, which offers a GUI to perform the most important tasks such as using different fonts or sizes, including images, etc. To find out more about it, read the following wiki section.
  • Help: This is an optional field. It is useful if a question needs some explanation or you want to explain how it should be answered. When you put text in this field, a "question mark" icon appears on the survey entry screens with the help text right beside it.


Note: The General options tab is accessed by default when you wish to add/edit a question (on the right side of the panel). The most important attributes can be found here such as the question type, question theme, as well as the mandatory attribute. However, you can edit further your question by making use of all the other attributes located under the rest of the tabs (see the below screenshot). To find out more about the multitude ways of designing questions in LimeSurvey, please continue reading the following wiki section.


General options

Different tabs are displayed on the right part of the screen. The most basic and important one is the General options tab. The following question settings can be changed from here:

  • Question type: This determines the type of response the survey allows. View the question types section for a description on the various available options;
  • Question group: To change the question group of a question, select from the dropdown list the desired group;
  • Validation: This feature is available in all text- and numeric- type questions. You can use standard regular expressions in this field to validate the responses to the question, and if the responses don't validate against this expression, the user will be prompted to try again before he or she can progress further;
  • Other?: This option can be used only with certain question types. If enabled, the question will include as a possible answer an extra "other" option/answer box, which can be selected by the survey participant if he or she is not satisfied with the predefined answer options;
  • Mandatory?: This setting allows you to require survey participants to answer all the mandatory questions before they can move on to the next question. Note that for ranking question, all items have to be ranked;
  • Relevance: This is the Boolean equation that specifies the question conditions. If it evaluates to true, the question will be displayed to the survey participant; otherwise it is hidden and since it is irrelevant, data for that question is NULLed in the database. Details about how to use this option can be found in the ExpressionScript wiki section.
Note: As it can be observed in the above screenshot, many other options can be used besides the general options tab to customize your question. These more advanced question settings are different for each question type! Therefore, please consult the documentation for your particular question type.


Importer une question

En bas du formulaire de création d'une question, vous pouvez observer une boite de sélection qui vous permettra d'importer un fichier de question. De là, vous pourrez importer un fichier CSV précédemment exporté d'un autre questionnaire. C'est très pratique pur réutiliser une question déjà posée dans un autre sondage.



The following options will be displayed:



  • Browse: Select the .lsq file (the LimeSurvey question-type format);
  • Destination question group: Select the question group you wish to add the imported question to;
  • Automatically rename question code if already exists: If the question code already exists, enable this option to use another question code. You can also have two questions that use the same question code. However, some issues might appear if you use more complex LimeSurvey options such as the ExpressionScript or when you work with the exported data in R or SPSS (qcode becoming a value label).
Hint: To check if the question codes are unique across your survey, use the Show logic file LimeSurvey function to highlight the similar question codes.
  • Convert resource links: It is usually used together with the ExpressionScript to create advanced question types. If you use them together, complex branching, assessments, validation, and/or tailoring can be done.

To import the question, click on the Import button located on the upper right part of the screen. If succeeded, the question import summary should look like this:



Informations de la table des invitations

Please note that the token tables are called now survey participants tables.

Vous pouvez insérer des informations/texte extraits de la table des invitations dans le texte de la question afin d'afficher des informations relatives au contexte. Pour que LimeSurvey puisse faire ces insertions, le questionnaire ne DOIT PAS être anonyme et doit posséder une table d'invitations .

Les champs contextuels disponibles sont:

The following placeholders can be used within a question:

{TOKEN:FIRSTNAME} insère la valeur du champ "prénom" de la table des invitations pour le participant courant
{TOKEN:LASTNAME} insère la valeur du champ "nom" de la table des invitations pour le participant courant
{TOKEN:EMAIL} insère la valeur du champ "mail" de la table des invitations pour le participant courant
{TOKEN:ATTRIBUTE_1} insère la valeur du champ "attribut_1" de la table des invitations pour le participant courant
{TOKEN:ATTRIBUTE_2} insère la valeur du champ "attribut_2" de la table des invitations pour le participant courant

Pour utiliser cette fonctionnalité vous devez taper le nom du champ de substitution exactement comme indiqué ci-dessus. Par exemple :

Bonjour {TOKEN:FIRSTNAME}. Nous vous avons envoyé un courriel à cette adresse  {TOKEN:EMAIL}. Est-ce correct ?

S'il y a des espaces ou des fautes de frappe, LimeSurvey ne pourra pas remplacer le champ avec la valeur de substitution adéquate.

Hello {TOKEN:FIRSTNAME}. We sent an email to you using this address {TOKEN:EMAIL}.


If you wish to further customize your questions, use the [[ExpressionScript - Presentation|ExpressionScript]]. For example, if you wish to make use of the tailoring technique, type in:

<syntaxhighlight lang="php" enclose="div">What do you as a {TOKEN:ATTRIBUTE_1} think about your {if(TOKEN:ATTRIBUTE_1=='worker','bosses','workers')}?

Un autre exemple d'utilisation plus avancé de la table des invitations utilisant le javascript:

Bonjour {TOKEN:FIRSTNAME}.

En tant que {TOKEN:ATTRIBUTE_1}, que pensez vous de vos

<script type="text/javascript" language="Javascript">;

   var job='{TOKEN:ATTRIBUTE_1}';

   if (job=='ouvrier') {

      document.write ('chefs')

   } else {

      document.write('ouvriers')

   }

</script>

?

Informations des réponses précédentes

Vous avez aussi la possibilité d'insérer des réponses à des questions précédentes si et seulement si:

  • La réponse à la question a déjà été donnée dans une page précédente du questionnaire - les réponses aux questions de la page courante du questionnaire ne sont pas disponibles. (par exemple, vous ne pouvez pas utiliser cette possibilité avec le questionnaire sur une page)
  • Vous devez utiliser l'ID du sondage (SID), du Groupe (GID) et de la question (QID) pour laquelle la réponse a été faite et faire référence à la réponse sous la forme: {INSERTANS:SIDXGIDXQID} - par exemple {INSERTANS:1X2X3}.
    Pour mieux comprendre ce mécanisme de codification, reportez-vous à la section "Identifiants SGQA". (L'éditeur html vous permet d'ajouter facilement les identifiant SGQA)

A wizard has been integrated in the WYSIWYG HTML editor (FCKeditor), so that you can easily insert previous question/answer codes. This plugin is called LimeReplacementFields. In order to use this feature in the FCKeditor, click on the "lime between brackets" icon and select a question from the select box. Only answers from previous pages are displayed.

LimeReplacementFields notice: When you want to delete a reference to a {name} tag, please select all chars from the openning bracket to the closing bracket and press delete: DO NOT erase it char by char with the Delete or Backspace key otherwise the field will appear again.

Styling Questions

It is possible to generally edit the question layout/design with CSS using the theme editor.