Extension:Survey

This page is a translated version of the page Extension:Survey and the translation is 44% complete.
MediaWiki 拡張機能マニュアル
Survey
リリースの状態: 実験的
実装 特別ページ , API , ユーザー インターフェイス, Ajax
説明 SurveyはMediaWikiの拡張機能で、管理者がアンケートを作り特定の利用者グループに属する利用者のみに表示させることができます。
作者 Jeroen De Dauw
メンテナー WikiTeq team
最新バージョン 0.3.0 alpha (2014-04-02)
互換性の方針 長期間サポート リリースであるすべての MediaWiki リリースについて、拡張機能に対応するブランチが存在します。
MediaWiki 1.39
PHP 7.0+
データベースの変更 はい
ライセンス GNU 一般公衆利用許諾書 2.0 以降
ダウンロード
README
  • $wgSurveySettings
  • surveyadmin
  • surveysubmit
Quarterly downloads 4 (Ranked 140th)
translatewiki.net で翻訳を利用できる場合は、Survey 拡張機能の翻訳にご協力ください
問題点 未解決のタスク · バグを報告

The Survey extension allows administrators to define surveys that can then be shown to specified groups of users. It is not functional on any currently supported version of MediaWiki.

機能の概要

  • アンケートはポップアップフォームでwikiの利用者に表示されます。
  • Surveys can be created and modified via an admin panel (Special:Surveys).
  • Surveys can be shown to specific types of users (logged in, anonymous, editor, confirmed, …)
  • Surveys can be shown for a specified percentage of users, and only after a certain amount of page views.
  • Survey questions can have different types of inputs, of which some allow restricting answers.
  • アンケートは、wikiに掲載されてなくとも、管理者がSpecial:TakeSurveyにてテストできます。
  • 調査の集計結果は、Special:SurveyStatsで確認できます。
  • The survey submission data (i.e. user answers) can be exported via an API.

インストール

  • ダウンロードして、ファイルをextensions/フォルダー内のSurveyという名前のディレクトリ内に配置します。
    開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Survey
  • 以下のコードを LocalSettings.php ファイルの末尾に追加します:
    wfLoadExtension( 'Survey' );
    
  • 更新スクリプトを実行します。このスクリプトは、この拡張機能が必要とするデータベーステーブルを自動的に作成します。
  • 必要に応じて設定します。
  •   完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。


設定

Configuration of Survey is done by assigning to $egSurveySettings in your LocalSettings.php file. The options are listed below and their default is set in the Survey settings file.

You should NOT modify the settings file, but can have a look at it to get an idea of how to use the settings, in case the below descriptions do not suffice.

設定の変更方法の例:

$egSurveySettings['defaultEnabled'] = true;

利用できる設定:

名前 既定 説明
defaultEnabled boolean false アンケートをデフォルトで有効にする場合
defaultUserType Survey::$USER_ Survey::$USER_ALL アンケート表示の利用者のデフォルトタイプ
defaultNamespaces array array() The default namespaces in which surveys should be shown. Empty list for no namespace restrictions
defaultRatio integer 100 The default percentage of users the surveys should be shown to
defaultExpiry integer 60 * 60 * 24 * 30 The default expiry of cookies used to track survey completion of users, in seconds
defaultMinPages integer 0 The default minimum amount of pages users should visit before getting a survey
JSDebug boolean false Indicates if JavaScript debugging should be on or not. Should be false on production environments.

使用法

このセクションは、アンケートの設定・管理をするサイト管理者が対象です。通常利用者には、アンケートの参加プロセスは一目瞭然でしょう。

アンケートの作成・編集

Surveys can be created, edited and removed in Special:Surveys by people with the survey admin right, by default only sysops.

テスト調査

Surveys can be tested by clicking the survey name or "take this survey" in the admin UI. This takes you to Special:TakeSurvey, which can be used to test survey submissions. You will be able to submit as many times as you want. Only people with the survey admin right can access this page.

アンケート実施

Once a survey is enabled, it gets deployed wiki-wide for all users matching the user criterion. These users will then need to visit the minimum amount of pages before the survey gets activated, at which point a lottery is done, making sure only the specified percentage of these users gets the survey.

If you want to instead deploy a survey on one or more individual pages, you can embed the ‎<survey> tag in each one. It is called in the following way:

<survey id="" ratio="" expiry="" min-pages="" />

The ID should match the survey's ID, which is the string that shows up after "Special:TakeSurvey/". The other attributes each correspond to settings found in Special:EditSurvey.

Do note that using the survey tag is an experimental feature which might not work properly in all situations.

Keeping track of surveys

A summary of survey results can be found on Special:SurveyStats, linked from the admin UI. This is only accessible by people with the survey admin right.

APIでのデータの書き出し

Survey allows you to export surveys and submission data via the MediaWiki API using these 3 API modules:

  • ApiQuerySurveys — get the surveys matching the provided conditions — api.php?action=query&list=surveys&suids=4|2
  • ApiQuerySurveySubmissions — get the submissions for a survey — api.php?action=query&list=surveysubmissions&qsid=42
  • ApiQuerySurveyAnswers — get the answers (there is 1 for each field in a submission) — api.php?action=query&list=surveyanswers&qaid=42

These modules can only be used to query data by people that have the surveyadmin right. Full documentation for these API modules can be found at api.php on your wiki.

バージョン

Version 0.3.0 alpha is the attempt to bring this extension to compatibility with MediaWiki 1.23+.

The release notes in Git only cover up to version 2.0 at this point.

国際化

Survey is fully internationalized. Translation of Survey messages is done through translatewiki.net. The translation for this extension can be found here. To add language values or change existing ones, you should create an account on translatewiki.net, then request permission from the administrators to translate a certain language or languages on this page (this is a very simple process). Once you have permission for a given language, you can log in and add or edit whatever messages you want to in that language.

作者

Survey has been written by Jeroen De Dauw as WikiWorks consultant for the IEEE.

スクリーンショット

関連項目