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

Link to user profile in comments block fails

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.3, 2.1.4, 2.2.1
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: Comments
    • Labels:
    • Testing Instructions:
      Hide
      1. Goto a course>turn editing> add a comment block
      2. Add few comments as admin, make sure the correct course urls are displayed to you along with the comment
      3. Refresh the page, make sure links are still correct
      4. login as a student and make a comment and refresh
      5. make sure all commenter names are linked to correct profile urls
      Show
      Goto a course>turn editing> add a comment block Add few comments as admin, make sure the correct course urls are displayed to you along with the comment Refresh the page, make sure links are still correct login as a student and make a comment and refresh make sure all commenter names are linked to correct profile urls
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-28952-master

      Description

      Prerequisite:

      In the comments block, there are links to each commenting user's profile of this type:
      http://MYMOODLEDOMAIN/user/view.php?id=USERID&course=COURSEID

      But: "&" should be "&".

      Now, if a user clicks this link, the course parameter isn't recognized and the user is forwarded to
      http://MYMOODLEDOMAIN/user/profile.php?id=USERID
      which he may or may not be able to view.

      Replacing in /comment/lib.php, line 598
      $c->profileurl = $url->out();
      with
      $c->profileurl = $url->out(false);
      solves the problem, the user is shown view.php as desired, but I don't know which side-effects this has.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/May/12