tag "lastinstitution:..." shows up for admin under "my tags"

Bug #1229660 reported by Kristina Hoeppner
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Unassigned

Bug Description

When you are an admin on a multitenannted Mahara site, you see tags of "lastinstitution:..." in your list of tags when users have left an institution.

These are for the functionality of allowing the admin to see "People who have left a given institution" on the "Administration -> Institutions -> Members" screen.

This tag should not show up in an admin's list of tags though as they are not that admin's tags and he shouldn't really hand those tags out.

To replicate:

1. Clean Mahara install. Log in as admin.
2. Create Institution A
3. Create User 1
4. Go to User 1's account settings page, go down to the "Institution Settings" section at the bottom, and add them to Institution A.
5. Return to User 1's account settings page, and remove them from Institution A.
6. Go to admin's Portfolio section and create a page.
7. On the "Edit title and description" screen, at the "Tags" field, click the "Show my tags" link.

Result: "lastinstitution:institutiona" shows up as one of the tags.
Expected result: "lastinstitution:institutiona" should not be listed as one of the tags.

Tags: admin tags
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: none → 1.8.0
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8.0 → 1.8.1
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8.1 → 1.8.2
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 1.8.2 → 1.8.3
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8.3 → 1.9.2
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 1.9.2 → 1.9.3
Changed in mahara:
milestone: 1.9.3 → 1.10.0
no longer affects: mahara/1.10
Revision history for this message
Aaron Wells (u-aaronw) wrote :

This bug is still present in 15.04dev. It's worth noting that the "lastinstitution:" tags do not show up in your tags page (mahara.example.com/tags.php). So perhaps whatever logic is being used there, needs to be shared by the tags pieform element.

tags: added: tags
tags: added: admin
description: updated
Revision history for this message
Aaron Wells (u-aaronw) wrote :

To expand on this some more, the "lastinstitution:" is an example of the obscure feature of "user tags". These were added in Mahara 1.5 (See Bug 800926), but we never wrote any code that uses them except for the "members who have left an institution" feature.

You can manually set and view user tags via the account settings page. Just log in as an admin, go to a user's account settings, and you'll have a tag selector!

So the specific problem here is that a user shouldn't be able to add the "lastinstitution:" tag manually like that. It's supposed to be hidden.

There are two ways we could fix this.

1. The hacky way: Edit the SQL in taglist.php (which is the JSON script that generates the list of tags for the tag selector pieform element) so that it is hardcoded to ignore tags that start with "lastinstitution:"

2. The more robust way: Add a "hidden" flag column to the usr_tag table. Then alter taglist.php (and all the other places that access usr_tag) so that they don't display tags marked as "hidden". This will replace the existing code that has "lastinstitution:" hardcoded in.

Robert Lyon (robertl-9)
Changed in mahara:
milestone: 16.04.1 → 16.10.0
no longer affects: mahara/16.04
no longer affects: mahara/15.04
no longer affects: mahara/15.10
Revision history for this message
Robert Lyon (robertl-9) wrote :

Removing milestone as this is not as important to get fixed now we use select2 for tags

Changed in mahara:
milestone: 16.10.0 → none
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

This was fixed a while ago.

Changed in mahara:
status: Confirmed → Invalid
status: Invalid → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.