Page MenuHomePhabricator

Requesting installation of the wikiquiz extension on "wikiversité"
Closed, ResolvedPublic

Assigned To
None
Authored By
bzimport
Feb 7 2007, 1:16 PM
Referenced Files
F3681: Quiz.i18n.php
Nov 21 2014, 9:35 PM
F3680: Quiz.php
Nov 21 2014, 9:35 PM
F3679: quiz.js
Nov 21 2014, 9:35 PM

Description

Author: lrbabe

Description:
I proposed the extension wikiquiz (http://meta.wikimedia.org/wiki/Wikiquiz) to
the administrators of wikiversité and those accepted
(http://fr.wikiversity.org/wiki/Wikiversit%C3%A9:La_salle_caf%C3%A9/5_f%C3%A9vrier_2007).

I thus ask for the installation of this extension on wikiversity.

In advance thank you. Lrbabe


Version: unspecified
Severity: normal
URL: http://fr.wikiversity.org/wiki/Accueil

Details

Reference
bz8913

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:35 PM
bzimport set Reference to bz8913.
bzimport added a subscriber: Unknown Object (MLST).

lrbabe wrote:

I forgot to announce that I was French, I am sorry for the English faults.

lrbabe wrote:

Javascript part of the extension

The code is not commented because of my low English level. Sorry.

attachment wikiquiz.js ignored as obsolete

lrbabe wrote:

php part of the extension

The code is not commented because of my low English level. Sorry.

attachment wikiquiz.php ignored as obsolete

lrbabe wrote:

I would also like to know if it were possible to add this extension to the SVN.
In advance thank you.

ssanbeg wrote:

(In reply to comment #4)

I would also like to know if it were possible to add this extension to the SVN.
In advance thank you.

Yes, it will need to be tested and added to SVN before being installed.

ssanbeg wrote:

Currently, the extension won't work if it's in a subdirectory, since it won't
find the javascript. It would be better to change the intallation instructions
to install it as extensions/WikiQuiz/wikiquiz.php, then include the javascript
similar to how CategoryTree does it:

<script type=\"{$wgJsMimeType}\"
src=\"{$wgScriptPath}/extensions/CategoryTree/CategoryTree.js\">"

lrbabe wrote:

Sorry, I don't know how to recover these variables :
$wgJsMimeType and $wgScriptPath

ssanbeg wrote:

(In reply to comment #7)

Sorry, I don't know how to recover these variables :
$wgJsMimeType and $wgScriptPath

You can just declare them as global in your function, i.e.

function myfunction() {

global $wgJsMimeType, $wgScriptPath;
...

}

lrbabe wrote:

(In reply to comment #8)

(In reply to comment #7)

Sorry, I don't know how to recover these variables :
$wgJsMimeType and $wgScriptPath

You can just declare them as global in your function, i.e.

function myfunction() {

global $wgJsMimeType, $wgScriptPath;
...

}

Ok, code was changed, following your suggestions. I just replaced the old script
insertion with :
global $wgJsMimeType, $wgScriptPath;
$output .= "<script type=\"{$wgJsMimeType}\"
src=\"{$wgScriptPath}/extensions/wikiquiz/wikiquiz.js\"></script>\n";

Installation instructions will be corrected soon, as well. Must I attach the new
wikiquiz.php file to this bug or are these instructions enough ?

ssanbeg wrote:

It may be better to attach it, and mark the old one obsolete; but as long as it
can be found I guess it's OK.

BTW, to import an article, it may be better to use PARSER::fetchTemplate than
make SQL statements, since that will give more consistent handling, and not
break if the schema changes. You can see an example of that in
extensions/LabeledSectionTransclusion/lst.php

lrbabe wrote:

(In reply to comment #10)

It may be better to attach it, and mark the old one obsolete; but as long as it
can be found I guess it's OK.

BTW, to import an article, it may be better to use PARSER::fetchTemplate than
make SQL statements, since that will give more consistent handling, and not
break if the schema changes. You can see an example of that in
extensions/LabeledSectionTransclusion/lst.php

I was searching for the "cleanest" way to make it and I was quite sure that SQL
statements was not the best way. Thanks a lot ! I'm gonna change it this week end.

lrbabe wrote:

The "$parser->disableCache();" will be withdrawn in the 1.0 stable version.

lrbabe wrote:

I've tried to to use PARSER::fetchTemplate but I failed :

$title = Title::makeTitleSafe( NS_MEDIAWIKI, "a valid page name");
$text = $parser->fetchTemplate($title);

$text is always "false" (instead of containing the text of the included page). I
need help on this function.
Thanks.

ssanbeg wrote:

(In reply to comment #13)

I've tried to to use PARSER::fetchTemplate but I failed :

$title = Title::makeTitleSafe( NS_MEDIAWIKI, "a valid page name");
$text = $parser->fetchTemplate($title);

$text is always "false" (instead of containing the text of the included page). I
need help on this function.
Thanks.

NS_MEDIAWIKI is for system messages; NS_MAIN would be a better default, and
should allow fetching pages without a leading : before the title.

lrbabe wrote:

Javascript part of the extension

attachment wikiquiz.js ignored as obsolete

lrbabe wrote:

php part of the extension

attachment wikiquiz.php ignored as obsolete

lrbabe wrote:

This is the 0.9.9.9 version.
This version is ready to be tested in order to be validated.
Syntax is final and the pages of the extension were translated into English.
The only bug remaining is impossibility of including two quiz in the same page.
This bug will be corrected with version 1.0 available soon.

What do I have to do so that this extension is tested ?
In advance thank you.

lrbabe wrote:

(In reply to comment #17)

This is the 0.9.9.9 version.
This version is ready to be tested in order to be validated.
Syntax is final and the pages of the extension were translated into English.
The only bug remaining is impossibility of including two quiz in the same page.
This bug will be corrected with version 1.0 available soon.

What do I have to do so that this extension is tested ?
In advance thank you.

This version is not definitive and syntax is not final...
Wait a little bit more for the 1.0

lrbabe wrote:

extension code

attachment quiz.php ignored as obsolete

lrbabe wrote:

messages and colors

attachment quizParameters.php ignored as obsolete

lrbabe wrote:

The extension is now ready to be tested !

lrbabe wrote:

extension code

attachment quiz.php ignored as obsolete

lrbabe wrote:

messages and colors

attachment quizParameters.php ignored as obsolete

lrbabe wrote:

extension php code

attachment quiz.php ignored as obsolete

lrbabe wrote:

extension colors and messages

attachment quizParameters.php ignored as obsolete

lrbabe wrote:

extension javascript

attachment quiz.js ignored as obsolete

lrbabe wrote:

extension php code

attachment quiz.php ignored as obsolete

lrbabe wrote:

extension javascript

Attached:

lrbabe wrote:

extension colors and messages

attachment quizParameters.php ignored as obsolete

lrbabe wrote:

extension php code

Attached:

lrbabe wrote:

internationalisation file

Attached:

lrbabe wrote:

By the way, they asked for the installation of the Brion's syntax highliting
extension as well : http://bugzilla.wikimedia.org/show_bug.cgi?id=9322