Last modified: 2008-02-26 22:33:50 UTC
It seems that a recent revision of the quiz extension broke it. Compare identical wikimarkup on Wikiversity at http://en.wikiversity.org/wiki/User:McCormack/quiz_test which is running r30701 and fouls up the answers; and at http://www.qedoc.org/en/index.php?title=Quiz_Extension which is running r29381 (Jan 7) which can mark the answers correctly. I may be hanging around on #mediawiki for questions. I'm very familiar with this extension. Thanks for fixing this.
Symptoms: if you enter the answers (Stageira, Plato, Alexander; case-sensitive) on the above two pages, the one marks them correctly, the other (WV) can't mark them any more. Generally the marking is fouled up. I tested this extension extensively when it was released, and these very obvious marking errors were not there then.
After further testing I don't think it was the recent revisions of this extension which broke it. I can only think that something is conflicting with it on Wikiversity. It looks more as if the error is somewhere with the runtime scripts, which would mean that JS or CSS is at fault, not PHP. I'm not sure where to start looking.
Does lrbabe have a Bugzilla account?
I've contacted lrbabe and he started testing the code on Mediawiki 1.12a last night. I've made some comments about the bugzilla report, so perhaps he will join. Another comment: all the question types which don't use text fields are fine. It's just the text fields that don't get marked properly any more.
I've done some more testing here to try and narrow down (a little) where to look for the problem. I took a very simple 1.11.1 installation of mediawiki (no thrills attached; no funny CSS; no other extensions; etc), and verified that the quiz extension text responses worked correctly on it, which they did. I then downloaded the latest 1.12a version from SVN (20th Feb) - just the phase3 stuff, nothing more, and did a basic upgrade. I then tested the same quiz extension sample again, and it failed this time in exactly the same way as it does on Wikimedia projects. OK - it's not that big a deal, but it does at least confirm that the problem is an incompatibility with the 1.12a core code, and that it is something which got changed from 1.11.1. A cursory look at the code: it might have to do with changes in WebRequest.php.
Yes, it has to do with the recent changes in webRequest.php, I've filled a bug : https://bugzilla.wikimedia.org/show_bug.cgi?id=13139 I don't need to change many things inorder to get the extension working again, I'll try to submit a patch tomorrow (cause I don't know if I still can commit on svn)
Created attachment 4676 [details] Add a "q" at the begining of former "pure numeric" names in inputs.
Fixed in r31327. Replaced array_merge() with wfArrayMerge() which behaves in a sane fashion. Gee, I wish we didn't have to reimplement half of PHP's standard library.