Commit 23b5c129 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Merged d9da69ed71105bacadbdd413c97e38c5b3837a45

parent 48a8d576
......@@ -141,13 +141,13 @@ $addtowatchliststr = get_string('addtowatchlist', 'activity');
//$tutor = (int)($membership && ($membership != COMMUNITY_MEMBERSHIP_MEMBER));
$controlled = (int)($community->jointype == 'controlled');
$request = (int)($community->jointype == 'request');
$tutor = (int)($membership & COMMUNITY_MEMBERSHIP_TUTOR);
$admin = (int)($membership & COMMUNITY_MEMBERSHIP_ADMIN);
$staff = (int)($membership & COMMUNITY_MEMBERSHIP_STAFF);
$owner = (int)($membership & COMMUNITY_MEMBERSHIP_OWNER);
$canupdate = (int)($tutor || $staff || $admin || $owner);
$canpromote = (int)(($staff || $admin) && $controlled);
$canremove = (int)(($tutor && $controlled) || $staff || $admin || $owner);
$tutor = (bool)($membership & COMMUNITY_MEMBERSHIP_TUTOR);
$admin = (bool)($membership & COMMUNITY_MEMBERSHIP_ADMIN);
$staff = (bool)($membership & COMMUNITY_MEMBERSHIP_STAFF);
$owner = (bool)($membership & COMMUNITY_MEMBERSHIP_OWNER);
$canupdate = (bool)($tutor || $staff || $admin || $owner);
$canpromote = (bool)(($staff || $admin) && $controlled);
$canremove = (bool)(($tutor && $controlled) || $staff || $admin || $owner);
$canleave = ($ismember && !$controlled);
$canrequestjoin = (!$ismember && empty($invited) && empty($requested) && $community->jointype == 'request');
$canjoin = (!$ismember && $community->jointype == 'open');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment