Wikimedia

Wrap long lines in MediaWiki's "Quiz" extension

The Quiz extension is currently installed on several Wikimedia sites, such as Wikiversity.

It has a lot of long lines, that should be wrapped, split and reformatted to improve the code readability.

See: https://www.mediawiki.org/wiki/Manual:Coding_conventions#Line_continuation

Getting started

Install mediawiki locally. It is easiest (often) to use vagrant for this. Quiz is not available as a role in vagrant, so follow these directions to manually add lines to LocalSettings.php in vagrant, and include the line

require_once("$IP/extensions/Quiz/Quiz.php"); You can test that the extension is working by adding a sample quiz to your test wiki in wikitext. The quiz syntax is well documented here.

You can find the quiz extension in the vagrant repository by navigating to mediawiki/extensions/Quiz. If you haven't already, you will need to set up git, gerrit, and git-review, and install a gerrit hook to begin submitting commits to the Quiz extension.

Task tags

  • php

Students who completed this task

David Sn

Task type

  • code Code
close

2016