Въпроси – въведение
From LimeSurvey Manual
Въведение
След като създадохте вашите групи въпроси, можете да започнете да добавяте въпроси във всяка група. Има няколко начина, по които можете да направите това. По-долу са представени две решения:
- Можете да добавяте въпроси от меню структура на анкетата;
- Достъп до група с въпроси и потърсете бутона за бързо действие „добавяне на въпрос“;
Описания на полета
Когато добавяте въпрос, ще бъдете попитани за кода на въпроса, въпроса и помощта' текстовете и общите опции за въпроси:
- 'Код на въпроса:' Той представлява ID, номер или код на въпроса, който се използва за бърза идентификация. Това поле обикновено не се показва на хората, участващи в анкетата, освен ако не е посочено в панела Презентация - Показване на номера на въпроса и/или кода. Особено полезно е, ако искате да използвате функцията за оценяване на LimeSurvey и/или ExpressionScript.
- Въпрос: Това е действително зададеният въпрос. Тук няма реално ограничение за дължината на въпроса, но ако искате да обясните как да попълните въпроса, оставете това за полето „Помощ“. HTML-кодът може да се използва например за включване на изображения:
!Н!<img src="http://www.yourdomain.com/yourpics/pic.jpg"> !Н!
- 'Помощ: Това е незадължително поле. Полезно е, ако даден въпрос се нуждае от обяснение или искате да обясните как трябва да се отговори. Когато поставите текст в това поле, на екраните за въвеждане на анкетата се появява икона „въпросителен знак“ с помощен текст точно до нея.
Общи опции
В дясната част на екрана се показват различни раздели. Най-основният и важен е разделът Общи опции. Следните настройки на въпросите могат да се променят от тук:
- 'Тип въпрос:' Това определя типа отговор, който анкетата позволява. Вижте секцията типове въпроси за описание на различните налични опции.
- 'Група въпроси': За да промените групата въпроси на въпрос, изберете от падащия списък желания група.
- Проверка: Тази функция е достъпна във всички текстови и цифрови въпроси. Можете да използвате стандартни регулярни изрази в това поле, за да потвърдите отговорите на въпроса и ако отговорите не са валидирани спрямо този израз, потребителят ще бъде подканен да опита отново, преди да може напредват по-нататък.
- Друго?: Тази опция може да се използва само с определени типове въпроси. Ако е активиран, въпросът ще включва като възможен отговор допълнителна „друга“ опция/кутия за отговор, която може да бъде избрана от участника в проучването, ако той или тя не е доволен от предварително зададените опции за отговор.
- 'Задължително ?: Тази настройка ви позволява да изисквате от участниците в проучването да отговорят на всички задължителни въпроси, преди да могат да преминат към следващия въпрос. Обърнете внимание, че за въпроса за класиране всички елементи трябва да бъдат класирани.
- Условие': Това е уравнението на ExpressionScript, което определя условията на въпроса. Ако се оцени като true (1), въпросът ще бъде показан на участника в анкетата; в противен случай той е скрит и тъй като е без значение, данните за този въпрос са NULL в базата данни. Подробности за това как да използвате тази опция можете да намерите в wiki раздела ExpressionScript.
- Шифровано: Тази настройка е налична само за някои типове въпроси и определя дали записаните данни за отговор са шифровани в базата данни. Това дава допълнителен слой на сигурност, ако вашата база данни бъде хакната. Той обаче има някои дребни недостатъци, тъй като няма да можете да търсите частични текстове в изгледа на отговора, а криптирането/декриптирането също изисква допълнителни сървърни ресурси.
- Save as default values: This setting allows you to save the settings of the current question type as default settings for new questions. If you set it to 'On', it will save the default values, then automatically reset to 'Off' after you saved.
- Clear default values: With this setting, you can reset any default values saved by the function 'Save as default values' and revert to system default values. If you set it to 'On', it will reset the default values, then automatically reset to 'Off' after you saves.
Importing a question
The following steps demonstrate how to import a question into a survey.
(1) From within a survey, click the Structure tab.
(2) From the Create question page, click Import a question at the top of the page.
The Import a question options will be displayed.
(3) Click Browse and select the .lsq file (which is the LimeSurvey question-type format).
(4) Select the Destination question group that you want to add the imported question into.
(5) Choose whether or not you would like to Automatically rename the question code if it already exits. 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).
(6) Choose whether or not to Convert resource links. This option 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.
(7) Click Import located on the upper right part of the screen.
The Question import summary will be displayed.
Information from survey participants table
You can insert information or text from the survey participants table into your question so that it can show context related information. For LimeSurvey to do this, the survey needs to be set as not anonymous (i.e: tracked) and it needs to have a survey participants table created.
The following placeholders can be used within a question:
{TOKEN:FIRSTNAME} | inserts the value from the "firstname" field located in the survey participants table |
{TOKEN:LASTNAME} | inserts the value from the "lastname" field located in the survey participants table |
{TOKEN:EMAIL} | inserts the value from the "email" field located in the survey participants table |
{TOKEN:ATTRIBUTE_1} | inserts the value from the "attribute_1" field located in the survey participants table |
{TOKEN:ATTRIBUTE_2} | inserts the value from the "attribute_2" field located in the survey participants table |
To use any of the placeholders from above, you must type it/them as written above in the question field text. For example:
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">What do you as a {TOKEN:ATTRIBUTE_1} think about your {if(TOKEN:ATTRIBUTE_1=='worker','bosses','workers')}?
You may also use JavaScript to achieve further question customization. First, you have to allow JavaScript to be used when setting up questions. This can be achieved by deactivating the XSS filter from the global settings of your LimeSurvey installation. However, deactivating this option is not always a good idea - read the following wiki section for further information. Question tailoring via JavaScript:
Hello {TOKEN:FIRSTNAME}. We sent an email to you using this address {TOKEN:EMAIL}. Is this correct?
What do you as a {TOKEN:ATTRIBUTE_1} think about your
<script type="text/javascript" language="Javascript">;
var job='{TOKEN:ATTRIBUTE_1}';
if (job=='worker') {
document.write ('bosses')
} else {
document.write('workers')
}
</script>
?
Information from previous answers
LimeSurvey allows survey administrators to insert an answer(s) from the previous question(s) into the text of a question:
- You can refer to answers on the same page and even dynamically update tailored messages as responses change on the page.
- You can use question code naming - for more details, see the ExpressionScript documentation.
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:
(1) Click the "lime between brackets" icon.
(2) Select a question from the select box.
Only answers from previous pages are displayed.
Styling questions
It is possible to edit the question layout/design with CSS using the theme editor.