// Numbas version: exam_results_page_options {"name": "Trigonometry Year 2", "extensions": [], "custom_part_types": [{"source": {"pk": 122, "author": {"name": "Merryn Horrocks", "pk": 4052}, "edit_page": "/part_type/122/edit"}, "name": "List with partial marks", "short_name": "list-with-partial-marks", "description": "

The answer is a comma-separated list.

\n

The list is marked correct if each element occurs the same number of times as in the expected answer, and no extra elements are present.

\n

You get part marks if you get at least half of the required elements and no extra elements. You get part marks if you get all the elements but include extra elements. You get part marks if you get at least half and add one or more extras.

\n

You can choose whether or not the input is case-sensitive, and you can choose the proportion of marks the student gets if they give a partially correct answer.

", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "join(\n if(settings[\"caseSensitive\"],\n settings[\"correctAnswer\"],\n map(lower(x),x,settings[\"correctAnswer\"])\n )\n ,\n \", \"\n)", "hint": {"static": true, "value": "Enter your answers (in any order) separated by commas. e.g. a,b,c"}, "allowEmpty": {"static": true, "value": false}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\nif(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(included);\napply(no_extras);\nswitch(\n all_included and no_extras, \n correct(),\n all_included and not no_extras, \n set_credit(settings[\"extraPenalty\"],\"You included all the required elements, but you also included extra elements that should not be included.\"),\n half_included and no_extras, \n set_credit(settings[\"missingPenalty\"],\"You included at least half of the required elements, but you missed some elements you needed to include.\"),\n half_included and not no_extras,\n set_credit(combined_penalty,\n \"You included at least half of the required elements, but you missed some elements you needed to include and you also included some elements that you should not have.\"),\n incorrect()\n)\n\ninterpreted_answer:\nif(settings[\"caseSensitive\"],\n bits,\n lower_bits\n )\n\nraw_bits:\nfilter(x<>\"\",x,split(studentAnswer,\",\"))\n\nbits:\nmap(trim(x),x,raw_bits)\n\nexpected_numbers:\nif(settings[\"caseSensitive\"],\n settings[\"correctAnswer\"],\n map(lower(x),x,settings[\"correctAnswer\"])\n )\n\nis_sorted:\nassert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )\n\nincluded:\nmap(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_student= length(expected_numbers)\n\nhalf_included:\nif(over_half and not all_included,true,false)\n\nno_extras:\nif(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n feedback(filter(not (x in expected_numbers),x,interpreted_answer)[0]+\" is not in the list.\");\n false\n )\n\nnotationStyles:\n[\"en\"]\n\nlower_bits:\nmap(lower(x),x,bits)\n\ncombined_penalty:\nmin(settings[\"extraPenalty\"],settings[\"missingPenalty\"])", "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=\"\",fail(\"You have not entered an answer\"),false);\napply(included);\napply(no_extras);\nswitch(\n all_included and no_extras, \n correct(),\n all_included and not no_extras, \n set_credit(settings[\"extraPenalty\"],\"You included all the required elements, but you also included extra elements that should not be included.\"),\n half_included and no_extras, \n set_credit(settings[\"missingPenalty\"],\"You included at least half of the required elements, but you missed some elements you needed to include.\"),\n half_included and not no_extras,\n set_credit(combined_penalty,\n \"You included at least half of the required elements, but you missed some elements you needed to include and you also included some elements that you should not have.\"),\n incorrect()\n)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "if(settings[\"caseSensitive\"],\n bits,\n lower_bits\n )"}, {"name": "raw_bits", "description": "", "definition": "filter(x<>\"\",x,split(studentAnswer,\",\"))"}, {"name": "bits", "description": "", "definition": "map(trim(x),x,raw_bits)"}, {"name": "expected_numbers", "description": "", "definition": "if(settings[\"caseSensitive\"],\n settings[\"correctAnswer\"],\n map(lower(x),x,settings[\"correctAnswer\"])\n )"}, {"name": "is_sorted", "description": "", "definition": "assert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )"}, {"name": "included", "description": "", "definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_student= length(expected_numbers)"}, {"name": "half_included", "description": "", "definition": "if(over_half and not all_included,true,false)"}, {"name": "no_extras", "description": "", "definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n feedback(filter(not (x in expected_numbers),x,interpreted_answer)[0]+\" is not in the list.\");\n false\n )"}, {"name": "notationStyles", "description": "", "definition": "[\"en\"]"}, {"name": "lower_bits", "description": "", "definition": "map(lower(x),x,bits)"}, {"name": "combined_penalty", "description": "", "definition": "min(settings[\"extraPenalty\"],settings[\"missingPenalty\"])"}], "settings": [{"name": "correctAnswer", "label": "correct answer", "help_url": "", "hint": "The list of elements that the student should enter. The order does not matter.
You need to enter it like this: [\"a\",\"5\",\"zoo\"], but the students enter it as a,5,zoo (without the square brackets and without the \")", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "caseSensitive", "label": "Case sensitive?", "help_url": "", "hint": "If this is checked, the student must give the answer in the correct case.", "input_type": "checkbox", "default_value": false}, {"name": "extraPenalty", "label": "penalty for including extra elements", "help_url": "", "hint": "This penalty is applied if students give all the requisite elements, but include extra elements. For example, if it is set to 25%, then the student will only receive 25% of the available marks.", "input_type": "percent", "default_value": 0}, {"name": "missingPenalty", "label": "penalty for omitting elements", "help_url": "", "hint": "This penalty is applied if students give at least half, but not all, the requisite elements. For example, if it is set to 25%, then the student will only receive 25% of the available marks.", "input_type": "percent", "default_value": 0}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Trigonometry Year 2", "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

The solutions of the equation $\\sin(60^{\\circ} + \\theta) = \\cos \\theta$ for $0^{\\circ} \\leqslant \\theta \\leqslant 360^{\\circ}$ are?

", "advice": "", "rulesets": {}, "extensions": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "list-with-partial-marks", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Give your answers as whole numbers or to 1 d.p. as appropriate, lower first, separated by commas

", "settings": {"correctAnswer": "[\"15\",\"195\"]", "caseSensitive": false, "extraPenalty": 0, "missingPenalty": "25"}}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Thanasis Bourliakas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/9924/"}]}]}], "contributors": [{"name": "Thanasis Bourliakas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/9924/"}]}