Page MenuHomePhabricator

Quiz extension text responses not markable in MW1.12a
Closed, ResolvedPublic


Author: mccormack

It seems that a recent revision of the quiz extension broke it.
Compare identical wikimarkup on Wikiversity at
which is running r30701 and fouls up the answers;
and at
which is running r29381 (Jan 7) which can mark the answers correctly.

I may be hanging around on MediaWiki-General for questions. I'm very familiar with this extension.

Thanks for fixing this.

Version: unspecified
Severity: minor



Event Timeline

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

mccormack wrote:

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.

mccormack wrote:

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.

ayg wrote:

Does lrbabe have a Bugzilla account?

mccormack wrote:

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.

mccormack wrote:

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.

lrbabe wrote:

Yes, it has to do with the recent changes in webRequest.php, I've filled a bug :
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)

lrbabe wrote:

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.