// Numbas version: exam_results_page_options {"name": "Numbas demo: match text pattern part type", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Numbas demo: match text pattern part type", "tags": [], "metadata": {"description": "

A demo of the match text pattern part and its options.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

The match text pattern part type asks the student to enter a short string of text. It is marked correct if it matches the given pattern, or if it exactly matches the expected string.

\n

See this question on the public editor.

", "advice": "", "rulesets": {}, "extensions": [], "variables": {"titlecase_pattern": {"name": "titlecase_pattern", "group": "Ungrouped variables", "definition": "safe(\"(\\\\p{Lu}|\\\\p{N})(\\\\p{L}|\\\\p{P}|\\\\p{N})*(\\\\s+(\\\\p{Lu}|\\\\p{N})(\\\\p{L}|\\\\p{P}|\\\\p{N})*)*\")", "description": "

The regular expression for the title case part. The \\p escape characters select unicode character properties.

", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["titlecase_pattern"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "patternmatch", "useCustomName": true, "customName": "Exact match", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

In this part, the student's string must exactly match the expected string.

\n

Write e-assessment.

", "answer": "e-assessment", "displayAnswer": "e-assessment", "matchMode": "exact"}, {"type": "patternmatch", "useCustomName": true, "customName": "Require letter case to match", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You can require that the case of the characters in the student's answer matches the expected answer.

\n

Write \"Numbas\".

\n

Try Numbas and NUMBAS.

", "answer": "Numbas", "displayAnswer": "Numbas", "caseSensitive": true, "partialCredit": "50", "matchMode": "exact"}, {"type": "patternmatch", "useCustomName": true, "customName": "Match a regular expression pattern", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You can accept any string which matches a given regular expression pattern.

\n

Write a headline in title case.

\n

Try Numbas Marks Answer Correctly, Student informed of mistake and Family von Trapp Outraged.

", "answer": "{titlecase_pattern}", "displayAnswer": "Example Answer Displayed Next To Student's Answer", "caseSensitive": true, "partialCredit": 0, "matchMode": "regex"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}