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

Course tags are being incorrectly weighted

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4, 2.4.5, 2.5.1
    • Fix Version/s: 2.6
    • Component/s: Tags
    • Labels:
    • Testing Instructions:
      Hide

      enable course tags
      create a course
      add the tag block to it
      add four different tags: fred, zoe, gamma, delta
      log on as a different user
      go to the same course and add two tags: fred and zoe
      log on as a different user
      go to the same course and add tag fred
      log on as a different user
      go to the same course and add tag fred

      Now you should have a tag cloud with fred 4 entries, zoe 2 entries, gamma 1 entry, delta 1 entry. You would expect "fred" to be biggest, then "zoe", then the other two. That's not the case though - delta and gamma are biggest.

      If you inspect the html you'll see Delta has class s20, Fred has class s80, gamma has class s20 and zoe has class s40.

      The correct html would have Fred with s20, Zoe with s10 and gamma and delta both with s5.

      Show
      enable course tags create a course add the tag block to it add four different tags: fred, zoe, gamma, delta log on as a different user go to the same course and add two tags: fred and zoe log on as a different user go to the same course and add tag fred log on as a different user go to the same course and add tag fred Now you should have a tag cloud with fred 4 entries, zoe 2 entries, gamma 1 entry, delta 1 entry. You would expect "fred" to be biggest, then "zoe", then the other two. That's not the case though - delta and gamma are biggest. If you inspect the html you'll see Delta has class s20, Fred has class s80, gamma has class s20 and zoe has class s40. The correct html would have Fred with s20, Zoe with s10 and gamma and delta both with s5.
    • Workaround:
      Hide

      Alter the theme for the sXX font sizes to cope with additional s values that are bigger.

      Show
      Alter the theme for the sXX font sizes to cope with additional s values that are bigger.
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL_39800_squashed

      Description

      See https://moodle.org/mod/forum/discuss.php?d=229071

      The user has given her tag cloud HTML and screenshots of the differing display between the course home page and the "more tags" page.

      You can see from the html that the more frequently used tags have weights greater than 20 which do not then have corresponding styles in the base theme.

      The weight is calculated in tag_print_cloud assuming that the most popular tag is being supplied to the function first. In this user's case the least popular tag is being supplied first, hence the odd display.

      So, there are two problems to investigate further:

      a) why is the tag cloud sending the tags in the wrong order to the more page.

      b) would the sort by options of "alphabetical" and "date" ever work on that page anyway.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    18/Nov/13