Moodle

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

Details

  • Type: Bug Bug
  • Status: Closed 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

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
    17/Nov/07 12:58 AM
    2 kB
    Derek Woolhead
  1. after.png
    10 kB
    17/Nov/07 12:58 AM
  2. before.png
    7 kB
    17/Nov/07 12:46 AM

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

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: