Commit 3ae1c917 authored by Nigel McNie's avatar Nigel McNie
Browse files

I18n-ise 'tutor' and 'member' on user/view.php when seeing what groups the user is in.

Fixes bug #1332.
parent 8b7717ce
......@@ -161,10 +161,13 @@ function get_associated_groups($userid=0) {
FROM {group_member_request} gm WHERE gm.member = ?
UNION
SELECT gm.group, 'member' AS type
FROM {group_member} gm WHERE gm.member = ?
FROM {group_member} gm WHERE gm.member = ? AND gm.tutor = 0
UNION
SELECT gm.group, 'tutor' AS type
FROM {group_member} gm WHERE gm.member = ? AND gm.tutor = 1
) AS a ON a.group = g.id";
return get_records_sql_assoc($sql, array($userid, $userid, $userid));
return get_records_sql_assoc($sql, array($userid, $userid, $userid, $userid));
}
......
......@@ -32,7 +32,7 @@
</td></tr></thead>
<tbody>
{foreach from=$USERGROUPS item=item}
<tr><td><a href="{$WWWROOT}group/view.php?id={$item->id}">{$item->name|escape}</a></td><td>{$item->type|escape}</td></tr>
<tr><td><a href="{$WWWROOT}group/view.php?id={$item->id}">{$item->name|escape}</a></td><td>{str tag=$item->type}</td></tr>
{/foreach}
</tbody></table>
{/if}
......
Supports Markdown
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