// Numbas version: finer_feedback_settings
{"name": "Posting a parcel", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Posting a parcel", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "http://localhost:8000/accounts/profile/1/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "tags": [], "metadata": {"description": "An interactive activity: the student enters the dimensions of a parcel, then has to calculate its volume, and classify its size by comparing against a table of maximum dimensions.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "variables": {"width": {"name": "width", "group": "Ungrouped variables", "definition": "10", "description": "", "templateType": "anything"}, "length": {"name": "length", "group": "Ungrouped variables", "definition": "10", "description": "", "templateType": "anything"}, "height": {"name": "height", "group": "Ungrouped variables", "definition": "3", "description": "", "templateType": "anything"}, "volume": {"name": "volume", "group": "Ungrouped variables", "definition": "width*length*height", "description": "", "templateType": "anything"}, "sizes": {"name": "sizes", "group": "Ungrouped variables", "definition": "[\n [name: \"Small\", width: 20, length: 20, height: 5, volume: 300],\n [name: \"Medium\", width: 40, length: 40, height: 30, volume: 6000],\n [name: \"Large\", width: 60, length: 60, height: 60, volume: 27000],\n [name: \"Too large\", width: infinity, length: infinity, height: infinity, volume: infinity]\n]", "description": "", "templateType": "anything"}, "valid_sizes": {"name": "valid_sizes", "group": "Ungrouped variables", "definition": "map(\n let(\n sdims,sort([size[\"width\"],size[\"height\"],size[\"length\"]])+[size[\"volume\"]],\n all(map(x<=y,[x,y],zip(dimensions,sdims)))\n )\n ,\n size,\n sizes\n)", "description": "", "templateType": "anything"}, "dimensions": {"name": "dimensions", "group": "Ungrouped variables", "definition": "sort([width,length,height])+[volume]", "description": "", "templateType": "anything"}, "best_size": {"name": "best_size", "group": "Ungrouped variables", "definition": "filter(valid_sizes[j],j,0..len(sizes)-1)[0]", "description": "", "templateType": "anything"}, "size_table": {"name": "size_table", "group": "Ungrouped variables", "definition": "table(\n map(\n [size[\"name\"],size[\"width\"],size[\"length\"],size[\"height\"], separateThousands(size[\"volume\"],\",\")],\n size,\n sizes[0..len(sizes)-1]\n ),\n [\"Size\", \"Max. width (cm)\", \"Max. length (cm)\", \"Max. height (cm)\", \"Max. volume (cm\u00b3)\"]\n)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["width", "length", "height", "volume", "dimensions", "sizes", "valid_sizes", "best_size", "size_table"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "information", "useCustomName": true, "customName": "Introduction", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Enter the parcel's measurements", "rawLabel": "", "otherPart": 1, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "
You would like to post a parcel. The cost of postage depends on the size of your parcel.
"}, {"type": "gapfill", "useCustomName": true, "customName": "Enter the parcel's measurements", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Calculate volume", "rawLabel": "", "otherPart": 2, "variableReplacements": [{"variable": "width", "definition": "interpreted_answer[0]"}, {"variable": "height", "definition": "interpreted_answer[1]"}, {"variable": "length", "definition": "interpreted_answer[2]"}], "availabilityCondition": "answered", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Enter the dimensions of your parcel, in centimetres.
\nWidth: [[0]]
\nLength: [[1]]
\nHeight: [[2]]
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "Width", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "0", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Length", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "0", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Height", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "0", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "numberentry", "useCustomName": true, "customName": "Calculate volume", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Pick the appropriate size", "rawLabel": "", "otherPart": 3, "variableReplacements": [], "availabilityCondition": "answered", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Calculate the parcel's volume", "prompt": "Your parcel measures $\\var{width} \\times \\var{length} \\times \\var{height}$cm.
\nWhat is the volume of your parcel, in cubic centimetres?
", "minValue": "volume", "maxValue": "volume", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "1_n_2", "useCustomName": true, "customName": "Pick the appropriate size", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Pick the size of the parcel", "prompt": "The post company categorises parcels according to the following table:
\n{size_table}
\nWhat size is your parcel?
", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": "map(size[\"name\"],size,sizes)", "matrix": "map(award(1,x=best_size), x, 0..len(sizes)-1)"}], "partsMode": "explore", "maxMarks": 0, "objectives": [{"name": "Calculate the parcel's volume", "limit": "1", "mode": "sum"}, {"name": "Pick the size of the parcel", "limit": "1", "mode": "sum"}], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "exam"}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "http://localhost:8000/accounts/profile/1/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}