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

Link to user profile in comments block fails

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.3, 2.1.4, 2.2.1
    • 2.1.6, 2.2.3
    • Comments
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • MDL-28952-master
    • 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

    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.

      Attachments

        Issue Links

          Activity

            People

              ankit_frenz Ankit Agarwal
              abias Alexander Bias
              Rossiani Wijaya Rossiani Wijaya
              Sam Hemelryk Sam Hemelryk
              Adrian Greeve Adrian Greeve
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/May/12