Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.8, 2.0, 2.1.4, 2.2.1, 2.3
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Tags
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide
      1. Login as admin and goto navigation>Tags
      2. Create a few tags if you dont already have a few.
      3. In another browser login as a student and goto Tags page and search for tags
      4. click on any tag from the result
      5. Flag the tag by clicking on "Flag as inappropriate" as a student
      6. As admin goto site administration>reports>Logs
      7. Make sure you see the flagging action in the report.
      8. Make sure all information in the logs report is correct (user name,profile link,tag name, link to tag page etc)
      9. Mark this issue as passed
      Show
      Login as admin and goto navigation>Tags Create a few tags if you dont already have a few. In another browser login as a student and goto Tags page and search for tags click on any tag from the result Flag the tag by clicking on "Flag as inappropriate" as a student As admin goto site administration>reports>Logs Make sure you see the flagging action in the report. Make sure all information in the logs report is correct (user name,profile link,tag name, link to tag page etc) Mark this issue as passed
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-27891-master
    • Rank:
      18096

      Description

      Context: an occasional problem we have is that users will find it amusing to flag perfectly innocent tags (or all the tags) as "inappropriate". Since this action is not logged, we have no way to know who is doing it and ask them to desist.

      Solution: log "flag as inappropriate" actions

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          Thanks for reporting this.

          I've put it on our backlog and we'll try to get to it as soon as we can.

          In the meantime adding more information, such as replication instructions, fix test instructions, a workaround or even a code solution, will help us and other users.

          Show
          Michael de Raadt added a comment - Thanks for reporting this. I've put it on our backlog and we'll try to get to it as soon as we can. In the meantime adding more information, such as replication instructions, fix test instructions, a workaround or even a code solution, will help us and other users.
          Hide
          Rossiani Wijaya added a comment -

          This looks good Ankit.

          Show
          Rossiani Wijaya added a comment - This looks good Ankit.
          Hide
          Ankit Agarwal added a comment -

          Thanks Rosie for the review.
          Submitting for integration.

          Show
          Ankit Agarwal added a comment - Thanks Rosie for the review. Submitting for integration.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Ankit Agarwal added a comment -

          rebased
          Thanks

          Show
          Ankit Agarwal added a comment - rebased Thanks
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Sorry but:

          • 'Flagged tag '.tag_get_name($tagid)

          cannot be used there. There are 2 options (for the info field/param):

          1) put the tag name there.

          2) put the tag id there and then add one one more line to lib/db/log.php, so it will return the name for the tag flag action.

          While 2) seems to be the correct one, looking to code, it seems that other tag actions are using 1) so... perhaps we should go with the later. Or, alternatively, go with 2) and create new issue to fix the rest of bad uses.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Sorry but: 'Flagged tag '.tag_get_name($tagid) cannot be used there. There are 2 options (for the info field/param): 1) put the tag name there. 2) put the tag id there and then add one one more line to lib/db/log.php, so it will return the name for the tag flag action. While 2) seems to be the correct one, looking to code, it seems that other tag actions are using 1) so... perhaps we should go with the later. Or, alternatively, go with 2) and create new issue to fix the rest of bad uses. Ciao
          Hide
          Ankit Agarwal added a comment -

          Hi Eloy,
          I have made changes as per your suggestion.
          Re-submitting for integration.

          @tester and @integrator
          This contains upgrade code. So wont work unless there is a version bump.
          Thanks

          Show
          Ankit Agarwal added a comment - Hi Eloy, I have made changes as per your suggestion. Re-submitting for integration. @tester and @integrator This contains upgrade code. So wont work unless there is a version bump. Thanks
          Hide
          Ankit Agarwal added a comment -

          PS:- I have created MDL-31547 to review logging actions in rest of the tags module
          Thanks

          Show
          Ankit Agarwal added a comment - PS:- I have created MDL-31547 to review logging actions in rest of the tags module Thanks
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Looks perfect, I'm adding mini-bump extra commit, to guarantee testing will have everything in place.

          Also, surely as part of MDL-31547, some actions like "unflag" from the managing tags UI, should also be introducing log entries... for your consideration to be added there.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Looks perfect, I'm adding mini-bump extra commit, to guarantee testing will have everything in place. Also, surely as part of MDL-31547 , some actions like "unflag" from the managing tags UI, should also be introducing log entries... for your consideration to be added there. Ciao
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated (21, 22 & master), thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated (21, 22 & master), thanks!
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Tested under 22 and master, both before and after the patch and version update. All woks as expected, yay!

          Passing...

          Show
          Eloy Lafuente (stronk7) added a comment - Tested under 22 and master, both before and after the patch and version update. All woks as expected, yay! Passing...
          Hide
          Ankit Agarwal added a comment -

          Thanks Eloy!
          Surely I will add "unflag" logging action along with MDL-31457
          Thanks

          Show
          Ankit Agarwal added a comment - Thanks Eloy! Surely I will add "unflag" logging action along with MDL-31457 Thanks
          Hide
          Eloy Lafuente (stronk7) added a comment -

          A bit later this week, but finally your changes have been accepted and are now available in all the upstream git/cvs servers.

          Many thanks & ciao

          Show
          Eloy Lafuente (stronk7) added a comment - A bit later this week, but finally your changes have been accepted and are now available in all the upstream git/cvs servers. Many thanks & ciao

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: