Closed christianp closed 1 year ago
Can I try for this issue?
@lawrencetheabhorrence thanks for offering! Please have a look at our guide on contributing to Numbas, and instructions on setting up a development environment
I see that this issue has been open for quite a while. So is it ok if I take this up?
Hi @prakha thanks for offering! Yes, please have a go at this.
In HTML which has JME values substituted into it, such as the question statement, you can set an attribute on a tag from a JME expression by adding
eval-
to the attribute name.For example, in
the
class
attribute will use the value of theclassname
question variable.For images, the
alt
attribute is set by the rich text editor, but it'd be nice to have it sub in variable values instead.So, in
DOMcontentsubber.sub_element
, I think that the attributealt
should have the same behaviour as attributes matching the regexeval-(.*)