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.
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