Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[[question_parts]] block #1244

Open
georgekinnear opened this issue Aug 7, 2024 · 0 comments
Open

[[question_parts]] block #1244

georgekinnear opened this issue Aug 7, 2024 · 0 comments

Comments

@georgekinnear
Copy link
Collaborator

This block would provide a syntax for marking up multi-part questions. It would allow for more consistent styling, that could be controlled across questions - similar to how the .HELM_parts class was used to do this across the HELM materials.

Here is an example of the sort of syntax I have in mind:

[[question_parts id="equations" labels="(a)"]]

[[qpart id="roots"]]
  <p>Find the roots of the equation {@eqn@}.</p>
  <p>[[input:ans1]] [[validation:ans1]] [[feedback:prt1]]</p>
[[qpart]]

[[qpart]]
  <p>Hence solve the equation {@eqn2@].</p>
  <p>[[input:ans2]] [[validation:ans2]] [[feedback:prt2]]</p>
[[qpart]]

[[/question_parts]]
  • This would be turned into a <ol> with each [[qpart]] becoming a <li>.
  • The optional id fields would be passed on to the ol/li elements, prepended by the quid so that they are unique on the page. This could be handy for accessing them through STACK-JS (and see also Proposal: New question block adapt #975).
  • I'm not sure about the labels field, but I imagined it would accept a finite list of options like a. and (1) - perhaps any of a. | (a) | a) where a could be any of a/A/i/I/1, with matching CSS definitions provided for each of those (along similar lines to .HELM_parts). Longer-term, I see that there is a new way of specifying list numbering through CSS (https://developer.mozilla.org/en-US/docs/Web/CSS/@counter-style) - so once that is a bit more widely-supported in browsers, it could be nice to allow use of a whole range of styles suited to different languages (e.g. https://www.w3.org/TR/predefined-counter-styles/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant