// Numbas version: finer_feedback_settings {"name": "Katrin's copy of Frame: Free Body Diagrams", "extensions": [], "custom_part_types": [], "resources": [["question-resources/fbd-0.png", "/srv/numbas/media/question-resources/fbd-0.png"], ["question-resources/fbd-1.png", "/srv/numbas/media/question-resources/fbd-1.png"], ["question-resources/fbd-2.png", "/srv/numbas/media/question-resources/fbd-2.png"], ["question-resources/fbd-3.png", "/srv/numbas/media/question-resources/fbd-3.png"], ["question-resources/fbd-4.png", "/srv/numbas/media/question-resources/fbd-4.png"], ["question-resources/fbd-5.png", "/srv/numbas/media/question-resources/fbd-5.png"], ["question-resources/fbd-6.png", "/srv/numbas/media/question-resources/fbd-6.png"], ["question-resources/fbd-7.png", "/srv/numbas/media/question-resources/fbd-7.png"], ["question-resources/fbd-8.png", "/srv/numbas/media/question-resources/fbd-8.png"], ["question-resources/fbd-9.png", "/srv/numbas/media/question-resources/fbd-9.png"], ["question-resources/fbd-10.png", "/srv/numbas/media/question-resources/fbd-10.png"], ["question-resources/fbd-11.png", "/srv/numbas/media/question-resources/fbd-11.png"], ["question-resources/fbd-12.png", "/srv/numbas/media/question-resources/fbd-12.png"], ["question-resources/fbd-13.png", "/srv/numbas/media/question-resources/fbd-13.png"], ["question-resources/fbd-14.png", "/srv/numbas/media/question-resources/fbd-14.png"], ["question-resources/fbd-15.png", "/srv/numbas/media/question-resources/fbd-15.png"], ["question-resources/fbd-16.png", "/srv/numbas/media/question-resources/fbd-16.png"], ["question-resources/fbd-17.png", "/srv/numbas/media/question-resources/fbd-17.png"], ["question-resources/fbd-18.png", "/srv/numbas/media/question-resources/fbd-18.png"], ["question-resources/fbd-19.png", "/srv/numbas/media/question-resources/fbd-19.png"], ["question-resources/fbd-20.png", "/srv/numbas/media/question-resources/fbd-20.png"], ["question-resources/fbd-21.png", "/srv/numbas/media/question-resources/fbd-21.png"], ["question-resources/fbd-22.png", "/srv/numbas/media/question-resources/fbd-22.png"], ["question-resources/fbd-23.png", "/srv/numbas/media/question-resources/fbd-23.png"], ["question-resources/fbd-24.png", "/srv/numbas/media/question-resources/fbd-24.png"], ["question-resources/fbd-25.png", "/srv/numbas/media/question-resources/fbd-25.png"], ["question-resources/fbd-26.png", "/srv/numbas/media/question-resources/fbd-26.png"], ["question-resources/fbd-27.png", "/srv/numbas/media/question-resources/fbd-27.png"], ["question-resources/fbd-28.png", "/srv/numbas/media/question-resources/fbd-28.png"], ["question-resources/fbd-29.png", "/srv/numbas/media/question-resources/fbd-29.png"], ["question-resources/fbd-30.png", "/srv/numbas/media/question-resources/fbd-30.png"], ["question-resources/fbd-31.png", "/srv/numbas/media/question-resources/fbd-31.png"], ["question-resources/fbd-32.png", "/srv/numbas/media/question-resources/fbd-32.png"], ["question-resources/fbd-33.png", "/srv/numbas/media/question-resources/fbd-33.png"], ["question-resources/fbd-34.png", "/srv/numbas/media/question-resources/fbd-34.png"], ["question-resources/fbd-35.png", "/srv/numbas/media/question-resources/fbd-35.png"], ["question-resources/fbd-36.png", "/srv/numbas/media/question-resources/fbd-36.png"], ["question-resources/fbd-37.png", "/srv/numbas/media/question-resources/fbd-37.png"], ["question-resources/fbd-38.png", "/srv/numbas/media/question-resources/fbd-38.png"], ["question-resources/fbd-39.png", "/srv/numbas/media/question-resources/fbd-39.png"], ["question-resources/fbd-40.png", "/srv/numbas/media/question-resources/fbd-40.png"], ["question-resources/fbd-41.png", "/srv/numbas/media/question-resources/fbd-41.png"], ["question-resources/fbd-42.png", "/srv/numbas/media/question-resources/fbd-42.png"], ["question-resources/fbd-43.png", "/srv/numbas/media/question-resources/fbd-43.png"], ["question-resources/fbd-44.png", "/srv/numbas/media/question-resources/fbd-44.png"], ["question-resources/fbd-45.png", "/srv/numbas/media/question-resources/fbd-45.png"], ["question-resources/fbd-46.png", "/srv/numbas/media/question-resources/fbd-46.png"], ["question-resources/fbd-47.png", "/srv/numbas/media/question-resources/fbd-47.png"], ["question-resources/fbd-48.png", "/srv/numbas/media/question-resources/fbd-48.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"this": {"group": "Ungrouped variables", "templateType": "anything", "description": "
the current fbd and mistakes
", "name": "this", "definition": "fbds[index]"}, "fbds": {"group": "Ungrouped variables", "templateType": "json", "description": "array containing problem image file name and cooresponding errors
", "name": "fbds", "definition": "json_decode(safe(\"[\\n {\\n \\\"filename\\\": \\\"fbd-0.png\\\",\\n \\\"errors\\\": [\\\"Missing arrowheads\\\", \\\"Extra forces or moments\\\", \\\"Inconsistent forces at C\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-2.png\\\",\\n \\\"errors\\\": [\\\"Extra forces or moments\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-3.png\\\",\\n \\\"errors\\\": [\\\"Missing forces or moments\\\", \\\"Incorrect line of action\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-7.png\\\",\\n \\\"errors\\\": [\\\"Inconsistent forces at C\\\", \\\"Incorrect line of action\\\", \\\"Inconsistent forces at B\\\", \\\"Missing forces or moments\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-6.png\\\",\\n \\\"errors\\\": [\\\"Extra forces or moments\\\", \\\"Inconsistent forces at C\\\", \\\"Missing or incorrect labels\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-4.png\\\",\\n \\\"errors\\\": [\\\"Extra forces or moments\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-5.png\\\",\\n \\\"errors\\\": [\\\"No errors\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-16.png\\\",\\n \\\"errors\\\": [\\\"Inconsistent forces at B\\\", \\\"Extra forces or moments\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-17.png\\\",\\n \\\"errors\\\": [\\\"Extra forces or moments\\\", \\\"Incorrect line of action\\\", \\\"Inconsistent forces at B\\\", \\\"Inconsistent forces at C\\\", \\\"Inconsistent forces at D\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-29.png\\\",\\n \\\"errors\\\": [\\\"Inconsistent forces at B\\\", \\\"Missing forces or moments\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-15.png\\\",\\n \\\"errors\\\": [\\\"Inconsistent forces at A\\\", \\\"Inconsistent forces at C\\\", \\\"Missing forces or moments\\\", \\\"Extra forces or moments\\\", \\\"Incorrect line of action\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-14.png\\\",\\n \\\"errors\\\": [\\\"No errors\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-28.png\\\",\\n \\\"errors\\\": [\\\"Extra forces or moments\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-10.png\\\",\\n \\\"errors\\\": [\\\"No errors\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-38.png\\\",\\n \\\"errors\\\": [\\\"Inconsistent forces at A\\\", \\\"Inconsistent forces at C\\\", \\\"Missing forces or moments\\\", \\\"Inconsistent forces at D\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-39.png\\\",\\n \\\"errors\\\": [\\\"Inconsistent forces at A\\\", \\\"Inconsistent forces at C\\\", \\\"Inconsistent forces at D\\\", \\\"Incorrect line of action\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-11.png\\\",\\n \\\"errors\\\": [\\\"Extra forces or moments\\\", \\\"Inconsistent forces at B\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-13.png\\\",\\n \\\"errors\\\": [\\\"No errors\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-12.png\\\",\\n \\\"errors\\\": [\\\"Missing forces or moments\\\", \\\"Incorrect line of action\\\", \\\"Missing or incorrect labels\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-37.png\\\",\\n \\\"errors\\\": [\\\"Inconsistent forces at A\\\", \\\"Incorrect line of action\\\", \\\"Inconsistent forces at C\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-36.png\\\",\\n \\\"errors\\\": [\\\"Inconsistent forces at A\\\", \\\"Extra forces or moments\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-22.png\\\",\\n \\\"errors\\\": [\\\"Missing or incorrect labels\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-34.png\\\",\\n \\\"errors\\\": [\\\"Missing forces or moments\\\", \\\"Inconsistent forces at B\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-20.png\\\",\\n \\\"errors\\\": [\\\"Missing forces or moments\\\", \\\"Extra forces or moments\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-21.png\\\",\\n \\\"errors\\\": [\\\"Extra forces or moments\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-35.png\\\",\\n \\\"errors\\\": [\\\"No errors\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-31.png\\\",\\n \\\"errors\\\": [\\\"Extra forces or moments\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-25.png\\\",\\n \\\"errors\\\": [\\\"No errors\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-19.png\\\",\\n \\\"errors\\\": [\\\"Missing forces or moments\\\", \\\"Incorrect line of action\\\", \\\"Inconsistent forces at B\\\", \\\"Extra forces or moments\\\", \\\"Missing or incorrect labels\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-18.png\\\",\\n \\\"errors\\\": [\\\"Inconsistent forces at A\\\", \\\"Inconsistent forces at C\\\", \\\"Missing or incorrect labels\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-24.png\\\",\\n \\\"errors\\\": [\\\"Extra forces or moments\\\", \\\"Inconsistent forces at B\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-26.png\\\",\\n \\\"errors\\\": [\\\"Inconsistent forces at C\\\", \\\"Incorrect line of action\\\", \\\"Inconsistent forces at B\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-32.png\\\",\\n \\\"errors\\\": [\\\"Extra forces or moments\\\", \\\"Inconsistent forces at B\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-27.png\\\",\\n \\\"errors\\\": [\\\"Missing forces or moments\\\", \\\"Inconsistent forces at C\\\", \\\"Inconsistent forces at A\\\", \\\"Incorrect line of action\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-40.png\\\",\\n \\\"errors\\\": [\\\"Extra forces or moments\\\", \\\"Incorrect line of action\\\", \\\"Missing forces or moments\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-8.png\\\",\\n \\\"errors\\\": [\\\"Extra forces or moments\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-9.png\\\",\\n \\\"errors\\\": [\\\"Inconsistent Moment\\\", \\\"Incorrect line of action\\\", \\\"Missing forces or moments\\\", \\\"Inconsistent forces at B\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-41.png\\\",\\n \\\"errors\\\": [\\\"force with known direction shown as components\\\", \\\"Extra forces or moments\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-43.png\\\",\\n \\\"errors\\\": [\\\"Inconsistent forces at C\\\", \\\"Inconsistent forces at B\\\", \\\"Missing forces or moments\\\", \\\"Extra forces or moments\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-42.png\\\",\\n \\\"errors\\\": [\\\"No errors\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-46.png\\\",\\n \\\"errors\\\": [\\\"Inconsistent forces at D\\\", \\\"Inconsistent forces at C\\\", \\\"Inconsistent forces at A\\\", \\\"Extra forces or moments\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-47.png\\\",\\n \\\"errors\\\": [\\\"Missing or incorrect labels\\\", \\\"Incorrect line of action\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-45.png\\\",\\n \\\"errors\\\": [\\\"Extra forces or moments\\\"]\\n },\\n {\\n \\\"filename\\\": \\\"fbd-44.png\\\",\\n \\\"errors\\\": [\\\"Missing arrowheads\\\"]\\n }\\n]\"))"}, "choices": {"group": "Ungrouped variables", "templateType": "anything", "description": "list of possible mistakes -- checkbox labels
", "name": "choices", "definition": "[\"Missing or incorrect labels\",\n\"Missing arrowheads\",\n\"Extra forces or moments\",\n\"Missing forces or moments\",\n\"Inconsistent forces at A\",\n\"Inconsistent forces at B\",\n\"Inconsistent forces at C\",\n\"Inconsistent forces at D\",\n\"Inconsistent moment\",\n\"Force with known direction shown as components\",\n\"Incorrect line of action\",\n\"No errors\"]\n"}, "marks": {"group": "Ungrouped variables", "templateType": "anything", "description": "custom marking matrix
\nuses custom check() function
", "name": "marks", "definition": "map(check(mistakes,choices[k]),k,0..11)"}, "mistakes": {"group": "Ungrouped variables", "templateType": "anything", "description": "the student's mistakes
", "name": "mistakes", "definition": "this['errors']"}, "index": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "index", "definition": "random(0..length(fbds)-1)"}}, "variable_groups": [], "rulesets": {}, "statement": "Identify the errors (if any) in the student's free body diagrams.
\n{image('resources/question-resources/'+this['filename'])}
\n(#{index}. Click image to enlarge. )
\n", "advice": "{mistakes}
", "ungrouped_variables": ["fbds", "this", "mistakes", "choices", "marks", "index"], "parts": [{"variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "matrix": "marks", "customMarkingAlgorithm": "mark:\n assert(marks>0,correct()); // any answer is correct when 0 marks are available\n assert(numTicks>0,\n warn(translate(\"part.marking.nothing entered\"));\n fail(translate(\"part.marking.nothing entered\"))\n );\n apply(same_ticks)\n\nshould_be_ticked (A chocie should be ticked if it's awarded ap ositive number of marks):\n map(map(y>0,y,row),row,settings[\"matrix\"])\n\nsame_ticks (Did the student tick the same choices as the expected answer?):\n correctif(studentanswer=should_be_ticked)\n\n", "prompt": "Check {length(mistakes)} {pluralise(length(mistakes),\"box\",\"boxes\")}.
", "unitTests": [], "minAnswers": "length(mistakes)", "displayColumns": "2", "extendBaseMarkingAlgorithm": true, "warningType": "prevent", "useCustomName": false, "showCellAnswerState": true, "showFeedbackIcon": true, "maxAnswers": "length(mistakes)", "displayType": "checkbox", "type": "m_n_2", "minMarks": "5", "shuffleChoices": false, "variableReplacements": [], "choices": "choices", "marks": 0, "scripts": {}, "customName": "", "maxMarks": "5"}], "preamble": {"js": "", "css": "img{width:600px;}"}, "tags": ["Free Body Diagrams", "mechanics", "Mechanics", "statics", "Statics"], "name": "Katrin's copy of Frame: Free Body Diagrams", "metadata": {"description": "Identify errors in student-drawn free body diagrams of a frame.", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "extensions": [], "functions": {"check": {"language": "javascript", "type": "boolean", "parameters": [["student_mistakes", "list"], ["this_mistake", "string"]], "definition": "mistakes = student_mistakes.map(item=>item.toLowerCase())\nreturn mistakes.contains(this_mistake.toLowerCase())?1:0\n"}}, "variablesTest": {"maxRuns": 100, "condition": ""}, "type": "question", "contributors": [{"name": "William Haynes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2530/"}, {"name": "Katrin Thomson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3424/"}]}]}], "contributors": [{"name": "William Haynes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2530/"}, {"name": "Katrin Thomson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3424/"}]}