質問 - はじめに
From LimeSurvey Manual
はじめに
質問グループを作成したら、グループに質問を追加することができます。いくつかのやり方がありますが、3つのやり方を紹介します。
- アンケート構成メニューから質問を追加する
- 質問グループにアクセスし、質問追加ボタンをクリックする
- Check the 概要タブをチェックし、アンケートクイックアクションにある新規質問追加を探す
フィールド説明
質問を追加するとき、質問コード・質問・ヘルプのテキスト、質問の全般オプションを設定します。
- 質問コード: 質問を容易に識別するためのID、番号、コードのこと。このフィールドは、プレゼンテーションパネルの質問番号かコードもしくは両方を表示で指定しない限り、通常はアンケート参加者に表示されません。LimeSurveyの評価機能や式マネージャを使用するときに役立ちます。
- 質問: 実際に聞かれる質問のことです。質問の長さには制限はありませんが、質問への答え方を説明したいときは、「ヘルプ」フィールドで行うこともできます。画像表示などのため、HTMLコードを使用することができます。
<img src="http://www.yourdomain.com/yourpics/pic.jpg">
- ヘルプ: この項目はオプションです。質問に説明が必要なときや回答方法を説明したいときに使用します。このフィールドにテキストを入力すると、アンケート入力画面で「クエスチョンマーク」アイコンがヘルプテキストとともに表示されます。
全般オプション
画面の右側に別のタブが表示されます。最も基本的で重要なのは全般オプションタブです。以下の質問設定をここから変更することができます。
- 質問タイプ: アンケートの回答形式を決定します。利用可能な様々なオプションの説明は質問タイプセクションを参照してください。
- 質問グループ: 質問が属する質問グループを変更する場合は、ドロップダウンリストからグループを選択します。
- 検証: これは、テキストや数値タイプの質問で使用します。標準的な正規表現を使って、質問への回答を検証し、回答が表現に反する場合は、ユーザーが回答を進める前にやり直すよう知らせます。
- その他?: この設定は特定の質問タイプで使用します。オンにすると、「その他」オプションと回答ボックスが表示され、アンケート参加者が事前に定義した選択肢に満足しないときに選択することができるようになります。
- 必須?: この設定により、アンケート参加者がすべての質問に回答しなければ先に進めないようにすることができます。順位付け質問では、すべての項目を順位付けしなければなりません。
- 関連式: 質問条件を規定する真偽式です。真の場合、質問が表示されます。偽の場合は非表示となり、無関係のデータとなるため、データベース上はnullとなります。この設定の使い方の詳細については、式マネージャーウィキセクションを参照してください。
質問のインポート
質問追加ページの上の方にいくつかのオプションツールバーがありますが、その一つがインポートです。
以下の設定が表示されます。
- 閲覧: .lsq ファイル(LimeSurveyの質問タイプフォーマット)を選択します。
- 移動先質問グループ: インポートした質問を追加する質問グループを選択します。
- 既に存在する場合には自動的に質問コードをリネームする: 質問コードが既に存在する場合、別の質問コードに変更するにはこのオプションをオンにします。2つの質問が同じ質問コードを使うことはできますが、式マネージャーなどの複雑なLimeSurvey設定を使用する場合や、エクスポートしたデータをRやSPSSで使用する場合(質問コードが値ラベルになる)に問題が生じることがあります。
- リソースリンク変換: 通常、式マネージャーとともに、高度な質問タイプを作成するときに使用します。合わせて使用することにより、複雑な分岐、評価、検証、カスタマイズなどができます。
質問をインポートするには、画面の右上にあるインポートボタンをクリックします。インポートに成功すると、インポートの概要が以下のように表示されます。
アンケート参加者テーブルの情報
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 [[Expression Manager]]. 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')}?
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 administrator to insert 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 Expression Manager 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, click on the "lime between brackets" icon and select a question from the select box. Only answers from previous pages are displayed.
Styling Questions
It is possible to generally edit the question layout/design with CSS using the theme editor.