Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9, 2.0, 2.6.1
    • Fix Version/s: None
    • Component/s: Tags
    • Labels:
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_26_STABLE

      Description

      Tag system needs a few improvements

        Gliffy Diagrams

        1. taglib.php
          38 kB
          Mathieu Petit-Clair
        2. tags_undo_HEAD.patch
          48 kB
          Petr Skoda
        3. tags_undo.patch
          123 kB
          Petr Skoda

          Issue Links

          1.
          Fix tag cron error Sub-task Closed Mathieu Petit-Clair
           
          2.
          Filter tag cloud by context Sub-task Closed Unassigned
           
          3.
          Make it possible to use numeric tags Sub-task Closed Mathieu Petit-Clair
           
          4.
          Ability to tag courses Sub-task Closed Mathieu Petit-Clair
           
          5.
          cannot rename tags - make it possible to merge tags Sub-task Closed Unassigned
           
          6.
          Correlation tags SQL is missing one condition.... Sub-task Closed Mathieu Petit-Clair
           
          7.
          Inconsistent tag display capitilisation Sub-task Closed Unassigned
           
          8.
          Make a one-time upgrade path to remove old (non-official) tags that are not in use anymore Sub-task Closed Mathieu Petit-Clair
           
          9.
          Using an apostrophe in a tag name eg "De l'aprez" Sub-task Closed Mathieu Petit-Clair
           
          10.
          limit size of tags Sub-task Closed Martin Dougiamas
           
          11.
          clean up the public api Sub-task Closed Mathieu Petit-Clair
           
          12.
          block/tags and block/blog_tags Sub-task Closed Unassigned
           
          13.
          Rework the tag management screen and make it part of the admin sub-system Sub-task Closed Unassigned
           
          14.
          Ensure tag improvements are correctly documented Sub-task Closed Helen Foster
           
          15.
          Display the count or relations of each related tag, on "link:hover" Sub-task Closed Martin Dougiamas
           
          16.
          Add a link to the search page Sub-task Closed moodle.com
           
          17.
          Suggestion: Put link to next page of tags at the bottom of the page, too. Sub-task Closed Unassigned
           
          18.
          Create hook system to let other module show their tagged content Sub-task Closed Unassigned
           
          19.
          transfer capability checks from tagging library to calling scripts Sub-task Closed Unassigned
           
          20.
          Improve tags help files Sub-task Closed Helen Foster
           
          21.
          Course tags improvements Sub-task Closed Jenny Gray
           

            Activity

            Hide
            Mathieu Petit-Clair added a comment -

            I just attached the file "tag/taglib.php" to this bug, and sent a big patch to http://moodle.pastebin.com/m3849f2a5 ... These two things together should apply to 19_STABLE (as of 21/02).

            Many fixes, changes and probably a few bugs still.

            Show
            Mathieu Petit-Clair added a comment - I just attached the file "tag/taglib.php" to this bug, and sent a big patch to http://moodle.pastebin.com/m3849f2a5 ... These two things together should apply to 19_STABLE (as of 21/02). Many fixes, changes and probably a few bugs still.
            Hide
            Mathieu Petit-Clair added a comment -

            I was in a hurry last night, so here's a bit more information about the patch... It solves the "tag cron error" and the "correlation sql error" and it makes it possible to use any character in a tag (letters, numbers, symbols, anything unicode).

            It also removes a bit of code in a few files, using tag_* functions instead.

            Show
            Mathieu Petit-Clair added a comment - I was in a hurry last night, so here's a bit more information about the patch... It solves the "tag cron error" and the "correlation sql error" and it makes it possible to use any character in a tag (letters, numbers, symbols, anything unicode). It also removes a bit of code in a few files, using tag_* functions instead.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Hi Mathieu,

            yesterday I was looking to the pastebin code above and I found it quite interesting, causing more clean and readable code, for sure. B-)

            Anyway one think I personally disagree y the use of arrays to pass parameters to functions and I've seen some of them in your code. Wouldn't it better to use "standard" multiple parameters instead of relying in arrays of them?

            Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Hi Mathieu, yesterday I was looking to the pastebin code above and I found it quite interesting, causing more clean and readable code, for sure. B-) Anyway one think I personally disagree y the use of arrays to pass parameters to functions and I've seen some of them in your code. Wouldn't it better to use "standard" multiple parameters instead of relying in arrays of them? Ciao
            Hide
            Eloy Lafuente (stronk7) added a comment -

            And another, really minor comment is about WHERE the taglib.php should be? Within /tag ? Or within /lib, leaving /tag for interface and so on... uhm... not critical at all but I love to have libraries in /lib. For your consideration.

            Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - And another, really minor comment is about WHERE the taglib.php should be? Within /tag ? Or within /lib, leaving /tag for interface and so on... uhm... not critical at all but I love to have libraries in /lib. For your consideration. Ciao
            Hide
            Mathieu Petit-Clair added a comment -

            Thanks for the comments Eloy! Martin also commented on both things.. so, I changed the parameters (removed the array thingy) for the two "public" functions (tag_set and tag_set_add). It wouldn't be so much work to remove all the arrays, and actually, I was trying to come up for a good reason to use them after all while talking with Martin, but couldn't really... so I think I might modify it all, next week.

            I had named the file taglib.php to make it obvious, while using moodle, which files depended on tag/lib.php. I renamed it lib.php, and separated a few "tag_print_*" functions in tag/locallib.php. I think that, as tags become more a part of "core moodle", the file should be moved to /lib/taglib.php, but this would require some work on making sure the right files get included .. and I won't attack this on a Friday night.

            This is not perfect, though. The tag management interface needs a lot of work, among others...

            Show
            Mathieu Petit-Clair added a comment - Thanks for the comments Eloy! Martin also commented on both things.. so, I changed the parameters (removed the array thingy) for the two "public" functions (tag_set and tag_set_add). It wouldn't be so much work to remove all the arrays, and actually, I was trying to come up for a good reason to use them after all while talking with Martin, but couldn't really... so I think I might modify it all, next week. I had named the file taglib.php to make it obvious, while using moodle, which files depended on tag/lib.php. I renamed it lib.php, and separated a few "tag_print_*" functions in tag/locallib.php. I think that, as tags become more a part of "core moodle", the file should be moved to /lib/taglib.php, but this would require some work on making sure the right files get included .. and I won't attack this on a Friday night. This is not perfect, though. The tag management interface needs a lot of work, among others...
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Great Mathieu,

            I really like the API itself, just were some "formal" details. You've done a good job reorganizing and fixing the tag system (I'm sure we'll use it intensively for 2.0 and so on). With arrays out from parameters next week... things will be really better!

            Happy weekend anyway, really Friday isn't a good timing to break things, hehe!

            Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Great Mathieu, I really like the API itself, just were some "formal" details. You've done a good job reorganizing and fixing the tag system (I'm sure we'll use it intensively for 2.0 and so on). With arrays out from parameters next week... things will be really better! Happy weekend anyway, really Friday isn't a good timing to break things, hehe! Ciao
            Hide
            Petr Skoda added a comment -

            unfortunately I had to revert the commit, because it was missing a file tag/locallib.php which was preventing admin login and breaking tags code. tried to use the functions from the file above but encountered some other problems.

            Show
            Petr Skoda added a comment - unfortunately I had to revert the commit, because it was missing a file tag/locallib.php which was preventing admin login and breaking tags code. tried to use the functions from the file above but encountered some other problems.
            Hide
            Petr Skoda added a comment -

            Mathieu please recommit it on Monday, I will have look at the code and we can polish the remaining details on Tuesday

            Show
            Petr Skoda added a comment - Mathieu please recommit it on Monday, I will have look at the code and we can polish the remaining details on Tuesday
            Hide
            Michael de Raadt added a comment -

            Thanks for reporting this issue.

            We have detected that this issue has been inactive for over a year. It was reported as affecting versions that are no longer supported.

            If you believe that this issue is still relevant to current versions (2.5 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

            Michael d.

            TW9vZGxlDQo=

            Show
            Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year. It was reported as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.5 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d. TW9vZGxlDQo=
            Hide
            Jenny Gray added a comment -

            As I've commented on some of the sub-tasks... these still seem relevant - unless you take the view that tagging has never taken off with general users, particularly in education, and is therefore not worth the effort.

            However, this issue strikes me that it should be an Epic not a task.

            Show
            Jenny Gray added a comment - As I've commented on some of the sub-tasks... these still seem relevant - unless you take the view that tagging has never taken off with general users, particularly in education, and is therefore not worth the effort. However, this issue strikes me that it should be an Epic not a task.
            Hide
            Helen Foster added a comment -

            Thanks Jenny, I agree with you that it would be better as an epic.

            Show
            Helen Foster added a comment - Thanks Jenny, I agree with you that it would be better as an epic.
            Hide
            Michael de Raadt added a comment -

            Closing this issue as all its sub-tasks are resolved.

            Show
            Michael de Raadt added a comment - Closing this issue as all its sub-tasks are resolved.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: