// Numbas version: exam_results_page_options {"name": "Set an HTML element's attributes based on a question variable", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"rulesets": {}, "ungrouped_variables": ["class", "color", "size"], "statement": "
This paragraph has class {class}.
\neval-class=\"{class}\"
The text in this paragraph is {color} and {size} times bigger than normal.
\neval-style=\"color: {color}; font-size: {size}em\"
Use attributes of the form eval-<name>
to dynamically set an attribute on an element based on question variables.
a
", "type": "question", "extensions": [], "functions": {}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}