Commit c93660b0 authored by Eugene Venter's avatar Eugene Venter
Browse files

added 'Pending Members' functionality to Group member view (bug #654860)

parent 798237e1
......@@ -121,6 +121,30 @@ addLoadEvent(function () {
EOF;
$smarty = smarty(array('paginator'));
if ($role == 'admin') {
$membershiptypes = array();
$membershiptypes[] = array(
'name' => get_string('current', 'group'),
'link' => empty($membershiptype) ? '' : $CFG->wwwroot.'group/members.php?id='.$group->id
);
if ($group->jointype == 'request' && count_records('group_member_request')) {
$membershiptypes[] = array(
'name' => get_string('requests', 'group'),
'link' => $membershiptype == 'request' ? '' : $CFG->wwwroot.'group/members.php?id='.$group->id.'&membershiptype=request'
);
}
if ($group->jointype == 'invite' && count_records('group_member_invite')) {
$membershiptypes[] = array(
'name' => get_string('invites', 'group'),
'link' => $membershiptype == 'invite' ? '' : $CFG->wwwroot.'group/members.php?id='.$group->id.'&membershiptype=invite'
);
}
if (count($membershiptypes) > 1) {
$smarty->assign('membershiptypes', $membershiptypes);
}
}
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('heading', $group->name);
$smarty->assign('form', $searchform);
......
......@@ -92,6 +92,9 @@ $string['addedtogroupsmessage'] = "%s has added you to the group(s):\n\n%s\n\n";
$string['removedfromgroupsmessage'] = "%s has removed you from the group(s):\n\n%s\n\n";
$string['cantremoveuserisadmin'] = "Tutor cannot remove admins and other tutorsmembers.";
$string['cantremovemember'] = "Tutor cannot remove members.";
$string['current'] = "Current";
$string['requests'] = "Requests";
$string['invites'] = "Invites";
// Used to refer to all the members of a group - NOT a "member" group role!
$string['member'] = 'member';
......
{include file="header.tpl"}
{if $membershiptypes}
<div id="memberoptions" class="right">
{foreach from=$membershiptypes item=item implode="&nbsp;&nbsp;|&nbsp;&nbsp;"}
{if $item.link}
<a href="{$item.link}">{$item.name}</a>
{else}
{$item.name}
{/if}
{/foreach}
</div>
<br>
{/if}
{$form|safe}
<p>{$instructions|clean_html|safe}</p>
{if $membershiptype}<h3>{str tag=pendingmembers section=group}</h3>{/if}
......
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