Extension:Quiz/ru

Category:GPL licensed extensions/ru
Справка по расширениям MediaWiki
Quiz
Статус релиза: стабильноCategory:Stable extensions/ru
Реализация Тег Category:Tag extensions/ru, Хук Category:Hook extensions/ru
Описание Предоставляет инструментарий тестов
Автор(ы) Lrbabeобсуждение
Последняя версия 1.2.0 (2015-12-08)
MediaWiki 1.25+Category:Extensions with manual MediaWiki version/ru
Лицензия GNU General Public License 2.0 или позднее
Скачать Category:Extensions in Wikimedia version control/ru
Пример and format documentation: v:Help:Quiz
Переведите расширение Quiz, если оно доступно на translatewiki.net
Проблемы Открытые задачи · Сообщить об ошибке
Category:All extensions/ru

Расширение Quiz - инструмент для создания тестов в Викиверситете Расширение представляет из себя:

  • Простой по своему синтаксису и использованию; мощный по своим возможностям.
  • Открыт для предложений и улучшений (способствуя добавлению новых типов вопросов).

Использование

Other help pages are hosted on the Wikiversities in order to allow for working examples.

Установка

  • Скачайте и распакуйте файл(ы) в папку с названием Quiz в вашей папке extensions/.
    Вместо этого разработчикам и соавторам кода следует установить расширение из Git, используя:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Quiz
    
  • Добавьте следующий код в конце вашего файла LocalSettings.php :
    wfLoadExtension( 'Quiz' );
    
  • Yes Готово – Перейдите на страницу Special:Version на своей вики, чтобы удостовериться в том, что расширение успешно установлено.

Разработка

Добавление нового типа вопросов

Quiz was conceived to facilitate the addition of new question types. If the basic types (multiple choice with single/multiple responses) are not enough for you, you have the possibility of easily creating and integrating the type of questions which you need. For that you must have some knowledge of PHP.

  1. The first thing that you must do is choose a syntax (the simplest possible) for your question type.

    The restrictions are:

    • The syntax of the question's header is fixed. The question has to be placed between curly brackets - i.e. { and } .
    • For consistency, it is recommended to use || to mark the beginning of the feedback section ("correction").
  2. Choose a new code name for your question type (example: "questionTypeName") as well as a symbol (currently the symbol () is used for single response multiple choice because it looks like a radio button, and the symbol [] is used for multiple response multiple choice because it looks like a checkbox).
  3. Add a "case" at the beginning of the parseParameters's "switch", as follows:
    case 'symbol':
    	$this->mType = "questionTypeName";
    	break;
    
  4. Add a parser function to Quiz.php
    This function must convert a question object from quiz syntax to HTML and set a state to the question (right, wrong, error, NA or unmarked), according to syntax errors and eventually posted answers. Name the function "questionTypeNameParseObject" and implement as follows :
    /**
     * Convert a basic type object from quiz syntax to HTML.
     * 
     * @param  $input				A question object in quiz syntax
     * 
     * @return $output				A question object in HTML.
     */
    function questionTypeNameParseObject($input) {
    	// your code here.
    	$this->setState(""); // Set the state if needed.
    	return $output;
    }
    
  5. Write down your syntax specifications which will be added to the help. Please read first the existing help.
  6. Once this is all done, contact me to include officially your question type inside the extension.


См. также

Category:Extensions used on Wikimedia/ru#Quiz/ru Category:On-line learning extensions/ru Category:Poll extensions/ru
Category:All extensions/ru Category:Extensions in Wikimedia version control/ru Category:Extensions included in Miraheze/ru Category:Extensions included in MyWikis/ru Category:Extensions included in WikiForge/ru Category:Extensions used on Wikimedia/ru Category:Extensions with manual MediaWiki version/ru Category:GPL licensed extensions/ru Category:Hook extensions/ru Category:On-line learning extensions/ru Category:ParserAfterTidy extensions/ru Category:ParserFirstCallInit extensions/ru Category:Poll extensions/ru Category:Stable extensions/ru Category:Tag extensions/ru