Last modified: 2007-11-14 15:39:07 UTC
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
I forgot to announce that I was French, I am sorry for the English faults.
Created attachment 3194 [details] Javascript part of the extension The code is not commented because of my low English level. Sorry.
Created attachment 3195 [details] php part of the extension The code is not commented because of my low English level. Sorry.
I would also like to know if it were possible to add this extension to the SVN. In advance thank you.
(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.
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\">"
Sorry, I don't know how to recover these variables : $wgJsMimeType and $wgScriptPath
(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; ... }
(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 ?
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
(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.
The "$parser->disableCache();" will be withdrawn in the 1.0 stable version.
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.
(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.
Created attachment 3251 [details] Javascript part of the extension
Created attachment 3252 [details] php part of the extension
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.
(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
Created attachment 3359 [details] extension code
Created attachment 3360 [details] messages and colors
The extension is now ready to be tested !
Created attachment 3364 [details] extension code
Created attachment 3365 [details] messages and colors
Created attachment 3371 [details] extension php code
Created attachment 3372 [details] extension colors and messages
Created attachment 3373 [details] extension javascript
Created attachment 3380 [details] extension php code
Created attachment 3381 [details] extension javascript
Created attachment 3382 [details] extension colors and messages
Created attachment 3384 [details] extension php code
Created attachment 3385 [details] internationalisation file
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
http://www.mediawiki.org/wiki/Extension:Quiz installed and live since March 2007 -> FIXED.