Moodle
  1. Moodle
  2. MDL-12226

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

    Details

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

      Description

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

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

        Activity

        Hide
        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
        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
        Derek Woolhead added a comment -

        Following review by Sam Marshall

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: