// Numbas version: finer_feedback_settings {"name": "Does this graph contain a cycle?", "extensions": [], "custom_part_types": [{"source": {"pk": 1, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/1/edit"}, "name": "Yes/no", "short_name": "yes-no", "description": "
The student is shown two radio choices: \"Yes\" and \"No\". One of them is correct.
", "help_url": "", "input_widget": "radios", "input_options": {"correctAnswer": "if(eval(settings[\"correct_answer_expr\"]), 0, 1)", "hint": {"static": true, "value": ""}, "choices": {"static": true, "value": ["Yes", "No"]}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\nif(studentanswer=correct_answer,\n correct(),\n incorrect()\n)\n\ninterpreted_answer:\nstudentAnswer=0\n\ncorrect_answer:\nif(eval(settings[\"correct_answer_expr\"]),0,1)", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=correct_answer,\n correct(),\n incorrect()\n)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "studentAnswer=0"}, {"name": "correct_answer", "description": "", "definition": "if(eval(settings[\"correct_answer_expr\"]),0,1)"}], "settings": [{"name": "correct_answer_expr", "label": "Is the answer \"Yes\"?", "help_url": "", "hint": "An expression which evaluates totrue
or false
.", "input_type": "mathematical_expression", "default_value": "true", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [["question-resources/network1_LR82gRu.png", "/srv/numbas/media/question-resources/network1_LR82gRu.png"], ["question-resources/disconnected.png", "/srv/numbas/media/question-resources/disconnected.png"], ["question-resources/network8_nm7c105.png", "/srv/numbas/media/question-resources/network8_nm7c105.png"], ["question-resources/tree01.png", "/srv/numbas/media/question-resources/tree01.png"], ["question-resources/tree02.png", "/srv/numbas/media/question-resources/tree02.png"], ["question-resources/housenetwork.png", "/srv/numbas/media/question-resources/housenetwork.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Does this graph contain a cycle?", "tags": [], "metadata": {"description": "This question displays one of 6 graphs and asks the yes/no question, \"Does this graph contain a cycle\"?
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "{image('resources/question-resources/'+imagelist[imagechoice])}
", "advice": "A cycle is a loop. This network {doesdoesnot} contain a cycle
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"imagelist": {"name": "imagelist", "group": "Ungrouped variables", "definition": "[\n \"housenetwork.png\",\"network8_nm7c105.png\",\"network1_LR82gRu.png\",\n \"disconnected.png\",\"tree01.png\",\"tree02.png\"\n ]", "description": "", "templateType": "anything", "can_override": false}, "imagechoice": {"name": "imagechoice", "group": "Ungrouped variables", "definition": "random(0..5)", "description": "", "templateType": "anything", "can_override": false}, "answerlist": {"name": "answerlist", "group": "Ungrouped variables", "definition": "[true, true, true, false, false, false]", "description": "", "templateType": "anything", "can_override": false}, "doesdoesnot": {"name": "doesdoesnot", "group": "Ungrouped variables", "definition": "if(imagechoice<3,\"does\",\"does not\")", "description": "", "templateType": "anything", "can_override": false}, "answer": {"name": "answer", "group": "Ungrouped variables", "definition": "answerlist[imagechoice]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["imagelist", "imagechoice", "answerlist", "doesdoesnot", "answer"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "yes-no", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Does this network contain a cycle?
", "settings": {"correct_answer_expr": "{answer}"}}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}