Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-62068

Exporting user tags exports too much for tag instances and not enough for tags

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.5, 3.4.2
    • Fix Version/s: 3.3.6, 3.4.3
    • Component/s: Privacy, Tags
    • Labels:
    • Testing Instructions:
      Hide
      1. As admin create any tag (go to Site administration>Appearance>Manage tags>Default collection)
      2. As a regular user edit your profile and add some interests, make sure to use tags that were never used before. Also add a tag that admin created above
      3. As admin go to Manage tags, the new tag should have user's name next to it
      4. Edit one of his tags and add description with pictures
      5. Request and complete data export for this user
      6. Inspect "System>Tags" folder (this is NOT user interests, this is a list of tags that belong to this user). Make sure that the tag created by admin was not exported but tags created by user are exported together with description and files
      Show
      As admin create any tag (go to Site administration>Appearance>Manage tags>Default collection) As a regular user edit your profile and add some interests, make sure to use tags that were never used before. Also add a tag that admin created above As admin go to Manage tags, the new tag should have user's name next to it Edit one of his tags and add description with pictures Request and complete data export for this user Inspect "System>Tags" folder (this is NOT user interests, this is a list of tags that belong to this user). Make sure that the tag created by admin was not exported but tags created by user are exported together with description and files
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull Master Branch:
      wip-MDL-62068-master

      Description

      core_tag\privacy\provider::export_item_tags() exports too much information about the tags themselves.
      Just because user A have tagged something with tag X, it does not mean that he anyhow owns any other information about this tag except for its name. In fact, some fields like 'tagcollid', 'isstandard' and 'flagged' may not be even available for him.

      I would only export "rawname" of each tag and nothing else. The field 'name' is just lowercased 'rawname'

      At the same time core_tag does not export tags "belonging" to the user and does not remove userid from tags on user deletion request. The name of the person who first created the tag is shown on "Manage tags" page. It does not have much value. We can anonymise such tags when processing user deletion request. They will be removed automatically by cron if the tag is no longer used by anybody.

      Examples:

      1. User added "birdwatching" as his interest. The tag was automatically created and tag.userid points to this user. Nobody else used this tag. User has requested to be forgotten. The tag "birdwatching" is modified to set userid=0. The user is deleted. Next cron will remove records in tag_instance table that point to interests of deleted users. When there are no tag_instance records linking to the tag , the tag "birdwatching" will also be deleted.

      2. User added "computers" as his interest. The tag was automatically created and tag.userid points to this user. Another user also added "computers" as his interest. The record in 'tag' table is not changed, new record in tag_instance table was added. The first user has requested to be forgotten, we set userid=0 for the tag "computers", however the tag is not removed because it is used elsewhere. When manager views "Manage tags" page the column "User name" is empty for this tag.

        Attachments

          Activity

            People

            • Assignee:
              marina Marina Glancy
              Reporter:
              marina Marina Glancy
              Peer reviewer:
              Juan Leyva
              Integrator:
              Andrew Nicols
              Tester:
              Janelle Barcega
              Participants:
              Component watchers:
              Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                17/May/18

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 40 minutes
                40m