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

Add ability to search/filter users by Last IP Address

XMLWordPrintable

    • MOODLE_36_STABLE
    • MOODLE_38_STABLE
    • MDL-63643-master
    • 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.

      This was raised during Moodle Moot Africa 2018 by heliguy.

      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.

            lameze Simey Lameze
            lameze Simey Lameze
            Mihail Geshoski Mihail Geshoski
            Jun Pataleta Jun Pataleta
            Janelle Barcega Janelle Barcega
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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