Moodle
  1. Moodle
  2. MDL-9072

Forum displays links to group page even when user cannot view participants

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8, 1.9
    • Fix Version/s: 1.8, 1.9
    • Component/s: Forum
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Rank:
      28916

      Description

      On the forum discussion header list, when a forum is in group mode, it displays the group of each post as a link to the participants list for the group.

      This is fine except that when users do not have the 'viewparticipants' capability, the link basically takes them to an error message.

      Correct behaviour would be to display the group name only (not make it a link) when this capability is not present.

        Activity

        Hide
        Sam Marshall added a comment -

        I fixed this as follows:

        • Added check to print_latest_discussions that does the same capability check (basically) as used in user/index.php where the link goes.
        • Passed this as parameter to print_discussion_header and, if it's false (default true) displays only the group name instead of the whole link.
        Show
        Sam Marshall added a comment - I fixed this as follows: Added check to print_latest_discussions that does the same capability check (basically) as used in user/index.php where the link goes. Passed this as parameter to print_discussion_header and, if it's false (default true) displays only the group name instead of the whole link.

          People

          • Assignee:
            Sam Marshall
            Reporter:
            Sam Marshall
            Tester:
            Nobody
            Participants:
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: