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

Multiple problems in glossary_count_unrated_entries()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.4, 2.2, 2.3
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Glossary
    • Labels:

      Description

      Multiple problems in glossary_count_unrated_entries()

      • /mod/glossary/lib.php glossary_count_unrated_entries() uses undefined $context->id
      • {ratings}
      • invalid use of count_sql

      Luckily this function is not used

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Integrated, thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Tested with:

            <?php
            require_once('config.php');
            require_once('mod/glossary/lib.php');
             
            print_object(glossary_count_unrated_entries(2, 2));

            (with 2, 2 being valid glossary->id and user->id)

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Tested with: <?php require_once('config.php'); require_once('mod/glossary/lib.php');   print_object(glossary_count_unrated_entries(2, 2)); (with 2, 2 being valid glossary->id and user->id)
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            It works ok, so passing...ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - It works ok, so passing...ciao
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Your nice code represents only 1/46 of the issues that have been sent upstream this week, so thanks, but not many.

            Nah, joking, many thanks! Closing this a fixed, ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Your nice code represents only 1/46 of the issues that have been sent upstream this week, so thanks, but not many. Nah, joking, many thanks! Closing this a fixed, ciao

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Mar/12