Page MenuHomePhabricator

Wrap long lines in Quiz extension
Closed, ResolvedPublic

Description

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

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

The Quiz extension was created by a volunteer and is currently installed on several WMF projects, such as Wikiversity.

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.

Event Timeline

Reedy created this task.Nov 5 2016, 7:35 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 5 2016, 7:35 PM
Reedy triaged this task as Low priority.Nov 5 2016, 7:35 PM
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptNov 5 2016, 7:43 PM
MtDu added a subscriber: MtDu.Nov 6 2016, 4:41 PM

@Reedy
Possible GCI task? Im going to participate again so I don't think I could mentor.
Thanks,
MtDu

Reedy added a comment.Nov 6 2016, 4:41 PM

Presumably, no idea why it couldn't be...

Mvolz added a subscriber: Mvolz.EditedNov 8 2016, 12:47 PM

I can mentor this in
Google-Code-In-2016

Mvolz renamed this task from Reformat code and wrap long lines to Reformat code and wrap long lines in Quiz extension.Nov 8 2016, 12:49 PM
Mvolz renamed this task from Reformat code and wrap long lines in Quiz extension to Wrap long lines in Quiz extension.
Mvolz updated the task description. (Show Details)
Mvolz updated the task description. (Show Details)Nov 8 2016, 12:53 PM
Mvolz updated the task description. (Show Details)Nov 8 2016, 12:57 PM
divadsn claimed this task.Dec 2 2016, 11:03 PM
divadsn added a subscriber: divadsn.

I will try to improve the code readability, patch following soon.

Change 325097 had a related patch set uploaded (by Divadsn):
Improve code readability in Quiz extension by reformatting code

https://gerrit.wikimedia.org/r/325097

Mvolz closed this task as Resolved.Jan 5 2017, 1:26 PM
Mvolz removed a project: Patch-For-Review.

Change 325097 merged by jenkins-bot:
Improve code readability in Quiz extension by reformatting code

https://gerrit.wikimedia.org/r/325097

divadsn added a comment.EditedJan 5 2017, 2:06 PM

Yay, finally! :)