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

Add ability to search/filter users by Last IP Address

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      Setup
      • For this test, you need access to your database.
      • You need a few users in your moodle.
      • On the mdl_users table, search for the lastip column and update few users records adding an IP address.. can be any (192.168.1.1 and 192.168.0.1 for example). Note that users who have not yet logged in will have their last IP address set to "0.0.0.0".
      • Set the "lastip" of other users to an empty string as well.
      Test Last IP Address filtering.
      1. Log in as admin.
        # Go to Site administration > Users > Accounts > Browse list of users
      2. Click on Show more... link to expand all the filtering options.
      3. Scroll down and make sure a new option Last IP address has been added.
      4. Play with the various combinations of the filter operator (the select box between the Last IP address filter and the text box for the filter value) and the filter value. For example:
        Filter operator Filter value Expected
        contains 168 Only users with "168" on their "lastip" will be shown
        does not contain 168 Only users without "168" on their "lastip" will be shown
        is equal to 0.0.0.0 Only users with "0.0.0.0" on their "lastip" will be shown
        starts with 192.168.1 Only users with a "lastip" that starts with "192.168.1" will be shown
        ends with 0.1 Only users with a "lastip" that ends with "0.1" will be shown
        is empty N/A text field will be disabled Only users with an empty IP address will be shown

      Note: Make sure to press "Remove all filters" after each scenario to clear the applied Last IP address filter.

      Show
      Setup For this test, you need access to your database. You need a few users in your moodle. On the mdl_users table, search for the lastip column and update few users records adding an IP address.. can be any (192.168.1.1 and 192.168.0.1 for example). Note that users who have not yet logged in will have their last IP address set to "0.0.0.0". Set the " lastip " of other users to an empty string as well. Test Last IP Address filtering. Log in as admin. # Go to Site administration > Users > Accounts > Browse list of users Click on Show more... link to expand all the filtering options. Scroll down and make sure a new option Last IP address has been added. Play with the various combinations of the filter operator (the select box between the Last IP address filter and the text box for the filter value) and the filter value. For example: Filter operator Filter value Expected contains 168 Only users with "168" on their " lastip " will be shown does not contain 168 Only users without "168" on their " lastip " will be shown is equal to 0.0.0.0 Only users with "0.0.0.0" on their " lastip " will be shown starts with 192.168.1 Only users with a " lastip " that starts with "192.168.1" will be shown ends with 0.1 Only users with a " lastip " that ends with "0.1" will be shown is empty N/A text field will be disabled Only users with an empty IP address will be shown Note: Make sure to press " Remove all filters " after each scenario to clear the applied Last IP address filter.
    • Affected Branches:
      MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-63643-master

      Description

      This was raised during Moodle Moot Africa 2018 by Heli Guy.

      Would be great if we could filter by Last IP address on the browse list of users page since we display that information on the user profile page.

      I had a quick look on the code and we would need to add another filter type to the Filter API.

        Attachments

          Activity

            People

            Assignee:
            lameze Simey Lameze
            Reporter:
            lameze Simey Lameze
            Peer reviewer:
            Mihail Geshoski
            Integrator:
            Jun Pataleta
            Tester:
            Janelle Barcega
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              18/Nov/19

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 33 minutes
                3h 33m