Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-67917

Create a single filter for tables and the AMD structure behind this

XMLWordPrintable

    • MOODLE_39_STABLE
    • MOODLE_39_STABLE
    • MDL-67917-master
    • Hide

      Prerequisites

      1. Have a course with multiple users enrolled
      2. Suspend at least one student in the course

      Testing

      1. Log in as a admin
      2. Navigate to the participants page of the course
        1. Confirm that you see the new Participants filter
        2. Confirm that you are able to select the following options from the "Match" dropdown:
          1. None
          2. Any
          3. All
        3. Confirm that the second dropdown has a title ("Select")
        4. Confirm that you can select "Status" from the dropdown
      3. Select "Status"
        1. Confirm that an autocomplete selection is created when you do so
      4. Open the autocomplete box
        1. Confirm that the following options are available:
          1. Active
          2. Inactive
      5. Filter the list by searching for "in"
        1. Confirm that only the "Inactive" option is shown
      6. Select the "Inactive" option
        1. Confirm that it is displayed to the right of the dropdown
      7. Type "Suspended"
        1. Confirm that there are no options
      8. Press [Enter] key
        1. Confirm that no new selection is provided
      9. Clear the entered text
        1. Confirm that the only option left is "Active"
      10. Select "Active"
        1. Confirm that both the Active, and Inactive options are now shown to the right of the select box
      11. Delete the "Active" option"
      12. Press the "Apply filters" button
        1. Confirm that the table updates
        2. Confirm that all active users were removed from view
      13. Click the 'x' icon at the far right of the filter row.
        1. Confirm that the filter has been returned to its default state of just having "All" and "Select filter" dropdowns
        2. Confirm that the table updates
        3. Confirm that all users are now visible again
      14. Select the Status option again
      15. Press "Add row"
        1. Confirm that you are not able to select a second "Status" field
      16. Delete the empty row
      17. Select just the "Active" option from the Status row
      18. Apply the filters
        1. Confirm that the table updates
        2. Confirm that any inactive users were removed
      19. Remove the top row with the [x] button again
        1. Confirm that the table updates
        2. Confirm that all users are now visible again
        3. Confirm that you can now select "Status" from the remaining row"
      20. Select the Status option again
      21. Select just the "Active" option
      22. Apply the filters
      23. Press the "Clear filters button"
        1. Confirm that all filters were removed and that there is now only a single filter shown with no values set
      Show
      Prerequisites Have a course with multiple users enrolled Suspend at least one student in the course Testing Log in as a admin Navigate to the participants page of the course Confirm that you see the new Participants filter Confirm that you are able to select the following options from the "Match" dropdown: None Any All Confirm that the second dropdown has a title ("Select") Confirm that you can select "Status" from the dropdown Select "Status" Confirm that an autocomplete selection is created when you do so Open the autocomplete box Confirm that the following options are available: Active Inactive Filter the list by searching for "in" Confirm that only the "Inactive" option is shown Select the "Inactive" option Confirm that it is displayed to the right of the dropdown Type "Suspended" Confirm that there are no options Press [Enter] key Confirm that no new selection is provided Clear the entered text Confirm that the only option left is "Active" Select "Active" Confirm that both the Active, and Inactive options are now shown to the right of the select box Delete the "Active" option" Press the "Apply filters" button Confirm that the table updates Confirm that all active users were removed from view Click the 'x' icon at the far right of the filter row. Confirm that the filter has been returned to its default state of just having "All" and "Select filter" dropdowns Confirm that the table updates Confirm that all users are now visible again Select the Status option again Press "Add row" Confirm that you are not able to select a second "Status" field Delete the empty row Select just the "Active" option from the Status row Apply the filters Confirm that the table updates Confirm that any inactive users were removed Remove the top row with the [x] button again Confirm that the table updates Confirm that all users are now visible again Confirm that you can now select "Status" from the remaining row" Select the Status option again Select just the "Active" option Apply the filters Press the "Clear filters button" Confirm that all filters were removed and that there is now only a single filter shown with no values set
    • 1
    • International 3.9 - Sprint 6, International 3.9 - Sprint 9

      The following is an approximation of the filter language used:

      filterset       = jointtype (filter *(", " filter))
      jointype        = "All" / "Any" / "None"
      filter          = ([jointype] filterthing ?= filtervalues)
      filterthing     = "Group" / "Role" / "Keyword" / ...
      filtervalues    = filtervalue *("," filtervalue)
      filtervalue     = quoted-string
      

      The initial part of the project will be to create a single filter. That is to say:

      1. A dropdown to select a pre-defined enumerated list for the Join Type (All, Any, None) for the current filter
      2. A dropdown to select a pre-defined enumerated list for the filterthing (Group, Role, etc.) for the current filter
      3. A way to select the values

      For the initial work:

      1. we will only be creating a working interface, it will not have any effect on the data. Purely visual.
      2. I would advise chosing Status as this is a simple, enumerated list, with static values and low complexity;
      3. We will only create the initial filter. Not a full filterset

      The follow-on work will then comprise of:

      1. Adding the remaining enumerated types (Groups, Roles, Enrolment methods)
      2. combining multiple filters into a filterset
      3. Adding the date since type. This is a single value filter ([number] days) and no jointype
      4. Adding support for non-enumerated types (date since, keyword)

      The initial work will not be plumbed in. It will be an isolated interface until the backend is ready to receive it.

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Michael Hawkins Michael Hawkins
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 weeks, 3 days, 2 hours, 36 minutes
                2w 3d 2h 36m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.