Moodle
  1. Moodle
  2. MDL-27165

Show unconfirmed users displays 0 when in fact unconfirmed users exist

    Details

    • Rank:
      16818

      Description

      As an admin it is possible to browse a list of all Moodle system users:

      Home > Site administration > Users > Accounts > Browse list of users

      One of the filters on this page is 'Confirmed', with a choice of No or Yes.

      When selecting 'No' and then clicking on the [Add filter] button, the screen loads. Even when there are unconfirmed users, the top of the page indicates:

      0 / 2281 Users

      but does also list the users who are unconfirmed.

      So not a serious issue, but annoying,

        Activity

        Peter Ruthven-Stuart created issue -
        Hide
        Charles Fulton added a comment -

        Bug confirmed in Moodle 2.0.2+ (Build: 20110406) and I think I know what the problem is. The $usersearchcount variable (admin/user.php:152) is set from a separate call to get_users(). That call uses a different signature than what's defined in lib/datalib.php, and has a hard-coded value of "true" for the third parameter, which is whether or not the user is confirmed. So if you're doing this particular search it's a no-op; it'll never return a number other than 0. I was thinking you could just count() the results from get_user_listing() but that's paginated, isn't it?

        Show
        Charles Fulton added a comment - Bug confirmed in Moodle 2.0.2+ (Build: 20110406) and I think I know what the problem is. The $usersearchcount variable (admin/user.php:152) is set from a separate call to get_users(). That call uses a different signature than what's defined in lib/datalib.php, and has a hard-coded value of "true" for the third parameter, which is whether or not the user is confirmed. So if you're doing this particular search it's a no-op; it'll never return a number other than 0. I was thinking you could just count() the results from get_user_listing() but that's paginated, isn't it?
        Martin Dougiamas made changes -
        Field Original Value New Value
        Workflow MDL Workflow [ 69249 ] MDL Full Workflow [ 76346 ]
        Peter Ruthven-Stuart made changes -
        Labels things_that_worked_in_1.9_but_not_in_2
        Hide
        Helen Foster added a comment -

        Peter, thanks for your report, and Charles, thanks for confirming it.

        Show
        Helen Foster added a comment - Peter, thanks for your report, and Charles, thanks for confirming it.
        Helen Foster made changes -
        Fix Version/s STABLE backlog [ 10463 ]
        Priority Minor [ 4 ] Major [ 3 ]
        Labels things_that_worked_in_1.9_but_not_in_2 things_that_worked_in_1.9_but_not_in_2 triaged
        Assignee Helen Foster [ tsala ] moodle.com [ moodle.com ]
        Component/s Administration [ 10050 ]
        Petr Škoda made changes -
        Assignee moodle.com [ moodle.com ] Petr Škoda (skodak) [ skodak ]
        Hide
        Petr Škoda added a comment -

        Hello, I will work on this next week after my current fixes get integrated, thanks.

        Show
        Petr Škoda added a comment - Hello, I will work on this next week after my current fixes get integrated, thanks.
        Petr Škoda made changes -
        Status Open [ 1 ] Waiting for integration review [ 10010 ]
        Pull Master Diff URL https://github.com/skodak/moodle/compare/master...w03_MDL-27165_m23_confirmed
        Pull Master Branch w03_MDL-27165_m23_confirmed
        Pull from Repository git://github.com/skodak/moodle.git
        Fix Version/s 2.1.5 [ 11553 ]
        Fix Version/s 2.2.2 [ 11552 ]
        Fix Version/s 2.3 [ 10657 ]
        Fix Version/s STABLE backlog [ 10463 ]
        Testing Instructions see description

        1/ create some users
        2/ edit DB to make some of them unconfirmed
        3/ try the user management UI filtering by confirmed flag
        Pull 2.1 Branch w03_MDL-27165_m21_confirmed
        Pull 2.2 Diff URL https://github.com/skodak/moodle/compare/MOODLE_22_STABLE...w03_MDL-27165_m22_confirmed
        Pull 2.1 Diff URL https://github.com/skodak/moodle/compare/MOODLE_21_STABLE...w03_MDL-27165_m21_confirmed
        Pull 2.2 Branch w03_MDL-27165_m22_confirmed
        Hide
        Petr Škoda added a comment -

        Thanks a lot for the report.

        Show
        Petr Škoda added a comment - Thanks a lot for the report.
        Eloy Lafuente (stronk7) made changes -
        Currently in integration Yes [ 10041 ]
        Sam Hemelryk made changes -
        Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
        Integrator samhemelryk
        Hide
        Sam Hemelryk added a comment -

        Thanks Petr - this has been integrated now

        Show
        Sam Hemelryk added a comment - Thanks Petr - this has been integrated now
        Sam Hemelryk made changes -
        Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
        Fix Version/s 2.3 [ 10657 ]
        Ankit Agarwal made changes -
        Tester ankit_frenz
        Ankit Agarwal made changes -
        Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
        Hide
        Ankit Agarwal added a comment -

        Hi,
        This is working great!!
        Passing
        Thanks

        Show
        Ankit Agarwal added a comment - Hi, This is working great!! Passing Thanks
        Ankit Agarwal made changes -
        Status Testing in progress [ 10011 ] Tested [ 10006 ]
        Hide
        Eloy Lafuente (stronk7) added a comment -

        This is now available in the git and cvs repositories.

        Consider the responsibility of your fingerprints engraved there for future generations!

        Thanks for the work, closing, ciao

        Show
        Eloy Lafuente (stronk7) added a comment - This is now available in the git and cvs repositories. Consider the responsibility of your fingerprints engraved there for future generations! Thanks for the work, closing, ciao
        Eloy Lafuente (stronk7) made changes -
        Status Tested [ 10006 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Currently in integration Yes [ 10041 ]
        Integration date 19/Jan/12

          People

          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: