Description:
Current behavior:
When landing on the report_editdates page, the "Activity Type" dropdown filter automatically selects the first item in the list based on alphabetical order.
However, the report initially displays all activities by default, regardless of what the dropdown shows. This creates a mismatch between the UI filter state and the actual data displayed.
The Localization Issue:
- In English: The filter appears correct because "All activities" starts with "A" and sits at the top of the list.
- In other languages (e.g., Catalan or Spanish): The first item changes (e.g., "Àrea de text..." in Catalan or "Archivo" in Spanish). As a result, the user sees a specific activity type selected in the dropdown, even though the list below is still showing every activity.
Expected behavior:
The dropdown filter should explicitly default to the value all ("All activities") upon the first page load, regardless of the interface language or alphabetical sorting. The UI state must always reflect the data currently being displayed in the report.
Steps to reproduce:
- Set the site or user language to Catalan or Spanish.
- Navigate to the "Dates" report of any course (
/report/editdates/index.php).
- Observe that the dropdown shows a specific activity (the first one alphabetically), but the table below shows all course activities.
Suggested fix:
Force the activitytype select element to default to the all value during the initial page render in the PHP/Output component, rather than relying on the browser's default selection of the first index.
Description:
Current behavior:
When landing on the
report_editdatespage, the "Activity Type" dropdown filter automatically selects the first item in the list based on alphabetical order.However, the report initially displays all activities by default, regardless of what the dropdown shows. This creates a mismatch between the UI filter state and the actual data displayed.
The Localization Issue:
Expected behavior:
The dropdown filter should explicitly default to the value
all("All activities") upon the first page load, regardless of the interface language or alphabetical sorting. The UI state must always reflect the data currently being displayed in the report.Steps to reproduce:
/report/editdates/index.php).Suggested fix:
Force the
activitytypeselect element to default to theallvalue during the initial page render in the PHP/Output component, rather than relying on the browser's default selection of the first index.