// Numbas version: exam_results_page_options {"name": "Anthony's copy of Fraction input with custom CSS", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["f", "a1", "b2", "g", "a", "b"], "name": "Anthony's copy of Fraction input with custom CSS", "tags": [], "preamble": {"css": ".fraction .matrix-input .matrix-wrapper .left-bracket, .fraction .matrix-input .matrix-wrapper .right-bracket {\n display: none;\n}\n.fraction .matrix-input .matrix td input {\n text-align: center;\n}\n.fraction .matrix-input .matrix tr:first-child td {\n padding-bottom: 5px !important;\n border-bottom: 1px solid black;\n}\n.fraction .matrix-input .matrix tr:last-child td {\n padding-top: 5px !important;\n}", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"prompt": "

This is a matrix input. The gapfill is wrapped in a tag with the class \"fraction\".

\n

$\\displaystyle{\\frac{\\var{a}}{\\var{b}}} = $ [[0]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"numRows": "2", "numColumns": "2", "allowResize": true, "allowFractions": false, "variableReplacements": [], "markPerCell": true, "variableReplacementStrategy": "originalfirst", "tolerance": 0, "correctAnswerFractions": false, "showCorrectAnswer": true, "correctAnswer": "matrix([[a/f],[b/f]])", "scripts": {}, "marks": "2", "type": "matrix"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": [], "statement": "", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "a1*f/g", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "b": {"definition": "b2*f/g", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "g": {"definition": "gcd(a1,b2)", "templateType": "anything", "group": "Ungrouped variables", "name": "g", "description": ""}, "f": {"definition": "random(2..10)", "templateType": "anything", "group": "Ungrouped variables", "name": "f", "description": ""}, "a1": {"definition": "random(1..13)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "b2": {"definition": "random(1..10)+a1", "templateType": "anything", "group": "Ungrouped variables", "name": "b2", "description": ""}}, "metadata": {"description": "

Some custom CSS restyles the matrix input so it looks like a fraction, with input boxes on top and bottom.

\n

Ideally, there should be a fraction input part type, or an option for the number entry part to display a fraction input.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Anthony Brown", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/799/"}]}]}], "contributors": [{"name": "Anthony Brown", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/799/"}]}