Considering the following comment about question numbering when there is only one question on a page followed by a Submit button https://www.mediawiki.org/wiki/Extension_talk:Quiz#Question_numbering, is it possible to suppress the automatic question numbering?
Description
Details
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | None | T148969 Provide some love to the Quiz extension | |||
| Resolved | Harjotsingh | T160257 Proposal : Adding Custom features while upgrading and updating Quiz extension - Gsoc17 | |||
| Open | None | T162803 Suppressing question numbering in a quiz when only one question on a page |
Event Timeline
As specified on the extension page, rather than adding an attribute to the quiz tag, It would be better that if there is only 1 question, it should not be numbered.
Change 356983 had a related patch set uploaded (by Harjotsingh; owner: Harjotsingh):
[mediawiki/extensions/Quiz@master] Suppressing question numbering in a quiz when only one question in a quiz
Change 356983 merged by jenkins-bot:
[mediawiki/extensions/Quiz@master] Suppressing question numbering in a quiz when only one question in a quiz
I'm having buyer's regret on how we did this one; I think rather than automatically removing the numbering for only one question, we should do this with CSS ala T148624. That way people can choose to hide or not the numbering. We could still set the CSS ourselves to do this automatically then, but the way it is done now there is no way to show numbering for one question if you want it.
i.e. if there is only one question in the quiz, we could give it a class "onlyQuestion" and then you could hide or show based on that class in the CSS.
This can be achieved as you said by giving class "onlyQuestion" and it can be toggled with button via JS.
But if a quiz has only one question, it would make sense to not number it as it is the only question.Also this would not work on mobile devices as currently the js is not loaded in mobile.
I don't think we would bring JS into this. Rather maybe we could allow people to basically add a style sheet somewhere in the quiz, then the stylessheet could set the style to display or not display the class.
