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

forum index page not always displaying forum links or [un]subscribed buttons

    Details

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

      Description

      The forum index page does not always display the forum column links or the subscribed column buttons for the forum tables.

        Gliffy Diagrams

          Attachments

          1. after.png
            after.png
            10 kB
          2. before.png
            before.png
            7 kB
          3. MDL-12226.patch
            2 kB

            Activity

            Hide
            derekw Derek Woolhead added a comment -

            Issue due to $cantaccessagroup being set incorrectly:

            $cantaccessagroup = $groupmode and !has_capability('moodle/site:accessallgroups', $context) and !mygroupid($course->id);

            Problem is order of precedence between 'and' and '=' where '=' is higher precedence than 'and'. Changed 'and' to '&&' which has higher precedence then '=' to resolve issue, i.e.

            $cantaccessagroup = $groupmode && !has_capability('moodle/site:accessallgroups', $context) && !mygroupid($course->id);

            Patch attached to bug for review by Sam Marshall

            Show
            derekw Derek Woolhead added a comment - Issue due to $cantaccessagroup being set incorrectly: $cantaccessagroup = $groupmode and !has_capability('moodle/site:accessallgroups', $context) and !mygroupid($course->id); Problem is order of precedence between 'and' and '=' where '=' is higher precedence than 'and'. Changed 'and' to '&&' which has higher precedence then '=' to resolve issue, i.e. $cantaccessagroup = $groupmode && !has_capability('moodle/site:accessallgroups', $context) && !mygroupid($course->id); Patch attached to bug for review by Sam Marshall
            Hide
            derekw Derek Woolhead added a comment -

            Following review by Sam Marshall

            Show
            derekw Derek Woolhead added a comment - Following review by Sam Marshall

              People

              • Assignee:
                derekw Derek Woolhead
                Reporter:
                derekw Derek Woolhead
                Tester:
                Nobody
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: