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

Tag API review

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.8.6, 2.9
    • Fix Version/s: None
    • Component/s: Tags
    • Labels:
      None
    • Affected Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE

      Description

      This issue is a follow-up of the MDL-25138, I've noticed the Tag API needs a extensive review and re-factoring.

      I've noticed few problems, but certainly there are others.
      Firstly, the tag_get_related_tags method calls two other methods: tag_get_tags() and tag_get_correlated() methods which has the same problematic SQL query on both methods, returning duplicates tags. This is due mostly because of the ordering and taginstanceid columns. It's not clear what's the purpose of both columns and a review should be done to see what's the usage and if those columns can be removed. A nice solution would be a query that get all tags and deprecate useless methods.

      Also, unit tests for the API must be created as an assurance.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              lameze Simey Lameze
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: