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

tag/lib.php todo: Amend code to work with the new Moodle 2.0 tag_instance table structure

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 2.2
    • Tags

      This issue is creating an associated MDL for an orphan TODO in tag/lib.php, which I came across while working on [MDL-30992]...

      tag/lib.php

      if ( array_key_exists($tag->ordering, $tag_ids) ) {
          // until we can add a unique constraint, in table tag_instance,
          // on (itemtype, itemid, ordering), this is needed to prevent a bug
          // TODO : modify database in 2.0
          $tag->ordering++;
      }

      The above code is an extract from the tag_get_tags_ids() function in tag/lib.php. Having a quick look at the tag_instance instance table it appears that there is still no unique id on itemtype, itemid and ordering, so this will need to be added before this todo can be resolved. However I did not write the TODO and it does not say what bug it is trying to prevent. It was last touched by scyrma, who I'm sure would have a much better idea of what needs to be done.

            Unassigned Unassigned
            gerry Gerard Caulfield
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.