This is the main parent task for all work related the 'country selection' feature. Subtasks and more detail will be added here after the final plan has been confirmed.
**This option is only applicable for campaigns that have been set as a "Wiki Loves campaign" by the campaign manager** (a tick box option on the Create/Update pages).
When the manager sets this option, they must **only include 'main' Wiki Loves categories** in the campaign settings. The system must assume that it will find ONLY country subcategories directly within the chosen categories. The country name can then be found as the final word in the category name.
**USER INTERFACE**
- Tick box on the Create/Update campaign pages to allow manager to set as a "Wiki Loves" campaign
- A dropdown option is shown on the Campaign page, allowing the user to optionally choose single country to work during their Participate session (triggered when they click the 'get started' button).
**EXTRACTION LOGIC**
**When user arrives on the Campaign page**:
- {T224109}
**When user starts a Participate Campaign session**:
- check value selected in country dropdown
- If the user has selected a country, we only search in that country subcategory when live generating the list to work on (instead of the /root/ category chosen in the campaign settings). As the campaign may have **multiple** root Wiki-Loves categories, we need to combine the results from each category.
e.g. If campaign categories are "Images from Wiki Loves Africa" and "Images from Wiki Loves art" and the user selects "Nigeria" from the dropdown, we need to:
> # Query contents of "Nigeria" subcategory in "Images from Wiki Loves Africa"
> # Query contents of "Nigeria" subcategory in "Images from Wiki Loves art"
> # Combine the results into the participate list to work on and load the first image
> # Fill out hidden form elements to indicate the "country" that will be saved with each contribution (see [T224111])
**When the user click "save" on either depicts or captions form**
- Submit the edit as normal, but including value in the new "country" hidden form element