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) { ...@@ -161,10 +161,13 @@ function get_associated_groups($userid=0) {
FROM {group_member_request} gm WHERE gm.member = ? FROM {group_member_request} gm WHERE gm.member = ?
UNION UNION
SELECT gm.group, 'member' AS type 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"; ) 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 @@ ...@@ -32,7 +32,7 @@
</td></tr></thead> </td></tr></thead>
<tbody> <tbody>
{foreach from=$USERGROUPS item=item} {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} {/foreach}
</tbody></table> </tbody></table>
{/if} {/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