Moodle
  1. Moodle
  2. MDL-36103

All tables output using tablelib.php use the wrong user profile link

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.2
    • Fix Version/s: 2.2.6, 2.3.3
    • Component/s: Libraries
    • Labels:
      None
    • Testing Instructions:
      Hide

      1. As a teacher, go to a report in a course that is generated using tablelib.php. For example a quiz report for a quiz that some students have attempted.

      2. Verify that the user name links to user/view.php including the coursed, and that you can see the user's course-specific profile there.

      3. Now go to a site-wide report that is generated using tablelib.php, e.g. /user/index.php?id=1

      4. Verify that the profile links go to the user's public profile user/profile.php?id=

      {userid}

      .

      Show
      1. As a teacher, go to a report in a course that is generated using tablelib.php. For example a quiz report for a quiz that some students have attempted. 2. Verify that the user name links to user/view.php including the coursed, and that you can see the user's course-specific profile there. 3. Now go to a site-wide report that is generated using tablelib.php, e.g. /user/index.php?id=1 4. Verify that the profile links go to the user's public profile user/profile.php?id= {userid} .
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      44865

      Description

      The User link on the quiz report (mod/quiz/report.php) appears to link to /user/profile.php. This seems to be odd as with other user profile links within a class point at /user/view.php which can be viewed by the same user

      Both instances include the course as a parameter so I'm just wondering why this was the case?

      Bug linked to this discussion post - https://moodle.org/mod/forum/discuss.php?d=213845#p932459

      Thanks

      Andrea

        Activity

        Hide
        Tim Hunt added a comment -

        Actually, this applies to all tables output using tablelib (which include user names).

        Show
        Tim Hunt added a comment - Actually, this applies to all tables output using tablelib (which include user names).
        Hide
        Tim Hunt added a comment -

        I think this is the right logic.

        Show
        Tim Hunt added a comment - I think this is the right logic.
        Hide
        Sam Hemelryk added a comment -

        Thanks Tim, logic looks spot on, these changes have been integrated now.

        Show
        Sam Hemelryk added a comment - Thanks Tim, logic looks spot on, these changes have been integrated now.
        Hide
        Adrian Greeve added a comment -

        I'm not sure whether to pass this test or not.
        when I go to user/index.php?id=1 and hover over the participants name you see a url for view.php?id=X&course=1 but it does direct to user/profile.php?id=X
        This behaviour is the same on 2.2, 2.3 and the master integration branches.

        Show
        Adrian Greeve added a comment - I'm not sure whether to pass this test or not. when I go to user/index.php?id=1 and hover over the participants name you see a url for view.php?id=X&course=1 but it does direct to user/profile.php?id=X This behaviour is the same on 2.2, 2.3 and the master integration branches.
        Hide
        Tim Hunt added a comment -

        Ah, user/index.php does weird things. It does not use the flexible_table class properly. admin/user.php suffers from a similar problem.

        Therefore, to test this fix, you need to use a different page ... but I can't find a suitable one. Perhaps you need to add a quiz to the site front page, make some attempts there, then look at the quiz reports.

        I don't know if we should have a new MDL about cleaning up user/index.php, etc.

        Show
        Tim Hunt added a comment - Ah, user/index.php does weird things. It does not use the flexible_table class properly. admin/user.php suffers from a similar problem. Therefore, to test this fix, you need to use a different page ... but I can't find a suitable one. Perhaps you need to add a quiz to the site front page, make some attempts there, then look at the quiz reports. I don't know if we should have a new MDL about cleaning up user/index.php, etc.
        Hide
        Adrian Greeve added a comment -

        I retested this with the further instructions that Tim gave. I can see now what the issue is and can verify that this works on 2.2, 2.3 and master.
        Thanks.

        Test passed.

        Show
        Adrian Greeve added a comment - I retested this with the further instructions that Tim gave. I can see now what the issue is and can verify that this works on 2.2, 2.3 and master. Thanks. Test passed.
        Hide
        Dan Poltawski added a comment -

        Hurray!

        You did it, congratulations! You have on Mojito credit to redeem after the release of Moodle 2.4

        Show
        Dan Poltawski added a comment - Hurray! You did it, congratulations! You have on Mojito credit to redeem after the release of Moodle 2.4

          People

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

            Dates

            • Created:
              Updated:
              Resolved: