// Numbas version: exam_results_page_options {"name": "The \"Random person\" extension", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "The \"Random person\" extension", "tags": [], "metadata": {"description": "

Shows how to use the \"random person\" extension to pick random names for people in your questions.

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

The \"random person\" extension can produce random people, weighted by popularity of names in England and Wales between 1996 and 2015.

\n

The following sentence stars a random person. Note that the verbs are conjugated differently following gender-neutral pronouns.

\n

{person['name']} puts {person['pronouns']['their']} things where {person['pronouns']['they']} like{if(person['gender']='neutral','','s')}.

\n

When people show things to {person['pronouns']['them']}, {person['pronouns']['they']} want{if(person['gender']='neutral','','s')} them for {person['pronouns']['themself']}.

\n
\n

It can be more convenient, if you've only got one person, to set variables for the pronouns.

\n

{name} put{s} {their} things where {they} like{s}.

\n

When people show things to {them}, {they} want{s} them for {themself}.

\n
\n

Some random people.

\n

{join(map(x['name']+' ('+x['pronouns']['they']+')',x,people),', ')}

\n
\n

Some random gender-neutral names.

\n

{neutrals}

\n
\n

Two random people with different names, so you can differentiate them.

\n

{people[0]['name']} gave {people[0]['pronouns']['their']} book to {people[1]['name']}, which {people[1]['pronouns']['they']} liked.

\n

", "advice": "", "rulesets": {}, "extensions": ["random_person"], "variables": {"person": {"name": "person", "group": "A person", "definition": "random_person()", "description": "

A random person

", "templateType": "anything"}, "name": {"name": "name", "group": "A person", "definition": "person['name']", "description": "

The random person's name.

", "templateType": "anything"}, "people": {"name": "people", "group": "Ungrouped variables", "definition": "random_people(30)", "description": "

Some random people

", "templateType": "anything"}, "ee": {"name": "ee", "group": "Ungrouped variables", "definition": "if(people[0][\"gender\"]=\"female\",\"e\",\"\")", "description": "", "templateType": "anything"}, "their": {"name": "their", "group": "A person", "definition": "person[\"pronouns\"][\"their\"]", "description": "", "templateType": "anything"}, "them": {"name": "them", "group": "A person", "definition": "person[\"pronouns\"][\"them\"]", "description": "", "templateType": "anything"}, "they": {"name": "they", "group": "A person", "definition": "person[\"pronouns\"][\"they\"]", "description": "", "templateType": "anything"}, "themself": {"name": "themself", "group": "A person", "definition": "person[\"pronouns\"][\"themself\"]", "description": "", "templateType": "anything"}, "s": {"name": "s", "group": "A person", "definition": "if(neutral,'','s')", "description": "", "templateType": "anything"}, "theirs": {"name": "theirs", "group": "A person", "definition": "person['pronouns']['theirs']", "description": "", "templateType": "anything"}, "neutral": {"name": "neutral", "group": "A person", "definition": "person['gender']='neutral'", "description": "", "templateType": "anything"}, "neutrals": {"name": "neutrals", "group": "Ungrouped variables", "definition": "join(map(x['name'],x,random_people_with_gender('neutral',3)),', ')", "description": "", "templateType": "anything"}, "woman": {"name": "woman", "group": "Ungrouped variables", "definition": "random_person_with_gender('female')", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["people", "ee", "neutrals", "woman"], "variable_groups": [{"name": "A person", "variables": ["person", "name", "their", "theirs", "them", "they", "themself", "neutral", "s"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [], "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/"}]}