Extension:Evaluation WikiFlow

What can this extension do?
Evaluation WikiFlow enhance MediaWiki with evaluation workflow, supporting all the life-cycle of a certification process of the content of the wiki pages.

Evaluation workflow
Evaluation workflow is performed through the following special pages:
 * Special:AskForReview
 * Special:AssignReview
 * Special:MakeReview
 * Special:Certify

while information about article state, pending reviews and assignments can be found at these pages:
 * Special:WaitingForReviews
 * Special:AssignedReviews

Evaluation tab
All articles belonging to a category to evaluate (see configuration for details) will have the evaluation section (tab) added to the actions menu.

The evaluation section shows information about the article reviews, assignments and provide buttons to perform the following actions:

Ask for review
Users with the askforreview permission can ask for a review about the current article. Performing this action will mark the article with the custom Category Waiting for review. The same action can be performed through the special page Special:AskForReview, by typing the article's title in the form provided.

Make review
Users with the makereview permission can make reviews by clicking the related button in the evaluation section or using the special page Special:MakeReview. Review article will be created in the custom namespace Review with the title UserName about PageName. If the article object of the review belongs to category Waiting for review, annotation is deleted.

Assign review
Users with the assignreview permission can perform this operation. Clicking the button from the evaluation section will prepare the form provided by the special page Special:AssignReview with the page name precompiled. User can fill in the username of the Reviewer and assign the review. Article object of the assignment will belongs to category Review assigned. This annotation will be deleted when the reviewer will create a review through the Special:MakeReview.

Certify
Users with the certify permission can perform this action directly from the evaluation section, to precompile the form provided by the Special:Certify page with the current article's pagename.

The interface allows two modes: the move page mode and the lock and copy mode:

Certify by move
Page is renamed. Categories that marked the article as 'to evaluate' are deleted. User can also write the old name of the article, to don't perform move operation.

Certify by lock and copy
Page edition and moving is protected and content is used for a new page (all subpages are also copied, following the base page). This could be useful if site permissions are configured depending on namespaces, to let some users have different rights on articles to evaluate and certified.

Requirements
MediaWiki: 1.11.1+ is required.

Version tested are also:
 * 1.12.*
 * 1.13.0, 1.13.1, 1.13.2

Non functional for:
 * Bitnami - MediaWiki - 1.16.2

Other versions have not been tested yet... (if someone does it with newer versions, feel free to add notice here)

Required extensions:
 * Extension:SemanticMediaWiki
 * Extension:SemanticForms

Suggested extensions:
 * Extension:ParserFunctions, you need this to benefit from Evaluation WikiFlow parser functions

Download instructions
You can download the version 0.3 here

Unzip the package and copy the folder EvaluationWikiflow in your  directory.

To install this extension, you need first to run the SQL query in the file db/createtables.sql, then add the following to LocalSettings.php:

NOTE: If your wiki uses table prefixes, you need to alter table names in the createtable.sql file.

Configuration
To configure the extension you must follow these steps:

Step 1 (optional)
Define the namespace index for the reviews in your LocalSettings.php and the name of the semantic property for the relation between review and article reviewed: $ewgReviewsNS=300; $ewgPropertyReviewAbout = 'Review about';

Step 2 (optional)
Edit the file 'includes/EW_Settings.php' and define user rights and e-mail notification configurations (the ones showed are the default values): $wgGroupPermissions ['*'] [EW_ACTION_VIEW] = false; $wgGroupPermissions ['user'] [EW_ACTION_VIEW] = true; $wgGroupPermissions ['user'] [EW_ACTION_ASK] = true; $wgGroupPermissions ['user'] [EW_ACTION_MAKE] = true; $wgGroupPermissions ['bureaucrat'] [EW_ACTION_ASSIGN] = true; $wgGroupPermissions ['sysop'] [EW_ACTION_CERTIFY] = true;

$ewgNotifyAllContributors = false; $ewgNotifyAllReviewers = false; $ewgNotifyAllManagers = false; //$ewgNotifyGroups[EW_ACTION_ASK] = 'bureaucrat'; //$ewgNotifyGroups[EW_ACTION_ASSIGN] = 'bureaucrat'; //$ewgNotifyGroups[EW_ACTION_MAKE] = 'bureaucrat'; //$ewgNotifyGroups[EW_ACTION_CERTIFY] = 'bureaucrat';

Step 3 (mandatory)
Define a Template for the reviews and add in the wiki text the following parser function:

This is important in order to make the system recognize pages that are Reviews and about which article.

Step 4 (mandatory)
Define a new semantic Form to use for reviews. This form must: (see Extension:SemanticForms for more details about how to configure a form):
 * use the template created above;
 * use the custom input types:
 * 'reviewaboutpage' (mandatory)
 * 'reviewer' (optional)
 * 'reviewaboutrevision' (optional)

[...]

Reviewer:

Review about:

Revision ID:

[...]

[...] IMPORTANT: The template variable in the example above must have the form input type reviewaboutpage as in the example.

You will use this form only for Review creation. For edit action you need to setup a different form.

Step 5 (mandatory)
Add to the Category page of the articles to be evaluated the semantic property Form for reviews pointing to the review Form: Form for reviews::Form:My_review_form You can setup different review forms for different categories.

Step 6 (optional)
You can configure mail notifications by editing these pages:
 * MediaWiki:EWMailAsk
 * MediaWiki:EWMailAssign
 * MediaWiki:EWMailMake
 * MediaWiki:EWMailCertify

See the section.

User rights
Evaluation WikiFlow use five new user rights:

Parser functions
EvalWF enhance wiki parser with some functions for managing revision and evaluation process, to use with Extension:ParserFunctions

About article's revision:

About evaluation workflow state:

How to configure e-mail notifications
To enable e-mail notification you have to create the pages that will hold the message template.

The following sections show informations about e-mail customization. For each action you can setup a e-mail text using some placeholders.

In these pages wikitext is not supported.

Notification for action ask for review (MediaWiki:EWMailAsk)
Recipients are: Edit the page at MediaWiki:EWMailAsk with the text of the email using the following placeholders, if needed:
 * the User who requested the review
 * users who contributed to the article (if flag $ewgNotifyAllContributors=true)
 * reviewers: users that made a review before this request (if any) (if flag $ewgNotifyAllReviewers=true)
 * managers: users who have the grant of assigning reviews (default are members of the 'bureaucrat' group) (if flag $ewgNotifyAllManagers=true)

Notification for action assign review (MediaWiki:EWMailAssign)
Recipients are: Edit the page at MediaWiki:EWMailAssign with the text of the mail using the following placeholders, if needed:
 * the user who managed this assignment
 * the user that requested a review (if any) (if flag $ewgNotifyAllContributors=true);
 * the reviewer who received the assignment;

Notification for action make review (MediaWiki:EWMailMake)
Recipients are: Edit the page at MediaWiki:EWMailAssign with the text of the mail using the following placeholders, if needed:
 * the user who made the review
 * the user that requested a review (if any)
 * users who contributed to the article (if flag $ewgNotifyAllContributors=true)
 * manager who assigned the review (if any) (if flag $ewgNotifyAllManagers=true)

Notification for action Certify
Recipients are: To configure the message, edit the page MediaWiki:EWMailCertify, using, if needed, the following placeholders:
 * users who contributed to the article (if flag $ewgNotifyAllContributors=true)
 * users who made reviews of the article (if flag $ewgNotifyAllReviewers=true)
 * users who made assignments about the article (if flag $ewgNotifyAllManagers=true</tt>)

Towards version 1.0

 * report evaluation wf -> export history in RDF
 * more easy configuration
 * multiple category/review configuration

E-mail features
 * Advise reviewer about a new assignment (added in version 0.3)
 * Advise author(s) of the proposal if a new review has been done (added in version 0.3)

Others
 * Advise the reviewer on login for new pending assignments

Versions log

 * 0.3 More improvements:
 * Added a select input to the Assign review special page for reviewers.
 * Added email notifications
 * Added Evaluation trace to the evaluation tab
 * More nice evaluation tab section
 * Categories to evaluate are detected from the Form for review property
 * 0.2 Messages added, some bugs fixed
 * 0.1