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

Trying to view a forum without the capability may lead you to a broken page.

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Reproduce:

      1) View a forum ( mod/forum/view.php?id=xxx ) with a user that does not have the correct capability ( mod/forum:viewdiscussion )

      2) See the message 'You do not have the permission to view discussions in this forum'.

      3) Click the 'Continue' button.

      4) Error: Invalid parameter

      Show
      Reproduce: 1) View a forum ( mod/forum/view.php?id=xxx ) with a user that does not have the correct capability ( mod/forum:viewdiscussion ) 2) See the message 'You do not have the permission to view discussions in this forum'. 3) Click the 'Continue' button. 4) Error: Invalid parameter
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-57246-33-forumredirect

      Description

      Reproduce:

      1) View a forum ( mod/forum/view.php?id=xxx ) with a user that does not have the correct capability ( mod/forum:viewdiscussion )

      2) See the message 'You do not have the permission to view discussions in this forum'.

      3) Click the 'Continue' button.

      4) Error: Invalid parameter

      Cause:

      The button on step 3 does not have a valid link, so it redirects to the same page without the query string '?id=xxx'. The error comes from the missing query string.

      Suggested solution:

      Redirect to $CFG->wwwroot.'/index.php' as usual.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              roperto Daniel Thee Roperto
              Reporter:
              roperto Daniel Thee Roperto
              Peer reviewer:
              Ankit Agarwal
              Integrator:
              Andrew Nicols
              Tester:
              Adrian Greeve
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Sep/17