Custom Html (collapsibles/accordions) - only 1 per unit (vertical)?

Hi - I’m not a developer, so please excuse any inaccuracy or lack of clarity.

We want to use some custom html for some low-level layout-interactions: collapsibles/accordions, sliders etc.
(It is just layout, not for more complex/interactive code such as Python, own-grader etc.)

Our technical supplier has told us that in Nutmeg only allows use of one X-block with this functionality in a unit (vertical).
This seems odd as we were not constrained in this way with Ironwood.

Any suggestions as to what is / is not possible?
Or links to previous suggestions in this Forum or ReadTheDocs / GitHub?


Hi @PatM!

We would need to understand what exactly is being attempted before trying to figure out whether it’s possible or not. Would you be able to provide step-by-step instructions to reproduce the problem? Or better yet, to do so in a new issue in edx-platform?

That said, this does not surprise me. It’s not the first I hear of the HTML block no longer working for advanced use cases: the zooming tool has been broken for a while, for instance.

Hi Adolfo (we met briefly in Lisbon at the end of your “EdX timeline” talk)

I think I have resolved the problem - the supplier is repeating the same set of content-tags in the Html without renaming for each Xblock.
So, the expected action by the browser for something in the 2nd Xblock mistakenly acts on the first occurrence of that content-tag (which is in the first Xblock).

I think using a variation of the content-tag for the repeated element should avoid the problem.

It does not seem to be any problem/limitation with the Html Xblock, just a consequence of using repetitions of the same set of content-names and expecting the browser miraculously to do some intuitive magic and work out on which same-labelled parts of the unit to carry out the intended action!

1 Like